Files
Claire Foster 7c5d789932 Fix line numbers with source fragments (JuliaLang/JuliaSyntax.jl#310)
When parsing source code fragments incrementally with

* `Meta.parse(str, index)` or
* `parsestmt(str, index)`

we must avoid scanning the rest of `str` for line numbers for
efficiency. In this mode, the user is expected to provide `first_line`
to "manually" specify which line number we're counting from.

Admittedly this is a bit clunky and should be integrated better with
SourceFile (which should also be renamed - see issue JuliaLang/JuliaSyntax.jl#190) but for now
seems to be the most consistent way to approach things here.

As part of the refactoring here, switch over to using `Vector{UInt8}`
for literal parsing which makes parsing to `ParseStream` and
`GreenNode` around 10% faster.
2023-06-17 09:09:02 +10:00
..