JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
272 stars 35 forks source link

Always `emit()` nodes with zero children, don't `bump()` them #371

Closed c42f closed 11 months ago

c42f commented 11 months ago

Cleanup weird cases where the parser would bump() interior nodes into the output stream rather than emit()ing them. Emitting all interior nodes explicitly means we can remove some special cases which occurred during tree building.

As part of this, fix some errors converting broken expressions like x var"y" from SyntaxNode to Expr.

Fixes #330

codecov[bot] commented 11 months ago

Codecov Report

Merging #371 (295b422) into main (96137ed) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #371      +/-   ##
==========================================
+ Coverage   96.56%   96.58%   +0.02%     
==========================================
  Files          14       14              
  Lines        4161     4160       -1     
==========================================
  Hits         4018     4018              
+ Misses        143      142       -1     
Files Coverage Δ
src/expr.jl 99.69% <100.00%> (-0.01%) :arrow_down:
src/literal_parsing.jl 98.78% <100.00%> (+0.42%) :arrow_up:
src/parse_stream.jl 93.87% <100.00%> (-0.02%) :arrow_down:
src/parser.jl 98.10% <100.00%> (+0.06%) :arrow_up:
src/syntax_tree.jl 95.27% <100.00%> (-0.10%) :arrow_down:

... and 1 file with indirect coverage changes