JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
274 stars 33 forks source link

Fixes for `SourceFile` byte offsets #311

Closed c42f closed 1 year ago

c42f commented 1 year ago

This fixes a crash formatting error messages when core_parse_hook is used to parse a piece of broken code with a nontrivial byte offset.

codecov[bot] commented 1 year ago

Codecov Report

Merging #311 (325a850) into main (ec51994) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
+ Coverage   96.78%   96.80%   +0.01%     
==========================================
  Files          14       14              
  Lines        4111     4125      +14     
==========================================
+ Hits         3979     3993      +14     
  Misses        132      132              
Impacted Files Coverage Δ
src/diagnostics.jl 100.00% <ø> (ø)
src/expr.jl 100.00% <100.00%> (ø)
src/parse_stream.jl 95.41% <100.00%> (+0.03%) :arrow_up:
src/parser.jl 98.03% <100.00%> (-0.30%) :arrow_down:
src/parser_api.jl 93.75% <100.00%> (ø)
src/source_files.jl 97.36% <100.00%> (ø)
src/syntax_tree.jl 95.36% <100.00%> (+0.09%) :arrow_up:

... and 2 files with indirect coverage changes