Remove offset_map from source_text to indexed_source_text
Summary:
offset_map is added for quickly converting offset to row/column number, it is used after parsing. Rust also provides API for scanning trivia and parse mode, Ocaml calls these APIs with a pointer to source text and Rust references it without memory copy. After offset_map added to source_text, constructing source_text becomes O(n), n is text size.
This fix adds a new struct which references source text and owns line break map, APIs require indexing should be exposed through IndexedSourceText.
Reviewed By: dabek
Differential Revision:
D17000526
fbshipit-source-id:
2a918fe27d457287536d292c97817001a97a958b