dlang-community / libdparse

Library for lexing and parsing D source code
https://libdparse.dlang.io
Boost Software License 1.0
114 stars 56 forks source link

Support 'throw' as a function attribute #424

Closed Hackerpilot closed 3 years ago

Hackerpilot commented 3 years ago

See https://github.com/dlang-community/libdparse/issues/423

Hackerpilot commented 3 years ago

The example file produces the correct AST, but this could probably use a bit more testing.

Hackerpilot commented 3 years ago

After thinking about it a bit more, I think it's better to get this change merged in so that the various tools that depend on libdparse can support this syntax when the next compiler release comes out. Testing that the parser produces the correct AST (See https://github.com/dlang-community/libdparse/issues/143) is a much bigger issue and makes sense to do separately from this.

codecov[bot] commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@ddafc62). Click here to learn what that means. The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #424   +/-   ##
=========================================
  Coverage          ?   79.79%           
=========================================
  Files             ?       10           
  Lines             ?     7818           
  Branches          ?        0           
=========================================
  Hits              ?     6238           
  Misses            ?     1580           
  Partials          ?        0           
Impacted Files Coverage Δ
src/dparse/parser.d 91.13% <83.33%> (ø)
src/dparse/trivia.d 99.45% <0.00%> (ø)
src/dparse/formatter.d 37.94% <0.00%> (ø)
src/dparse/strings.d 98.72% <0.00%> (ø)
src/dparse/ast.d 65.85% <0.00%> (ø)
test/tester.d 100.00% <0.00%> (ø)
src/dparse/lexer.d 84.93% <0.00%> (ø)
src/std/experimental/lexer.d 84.78% <0.00%> (ø)
src/dparse/rollback_allocator.d 91.02% <0.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ddafc62...d8e3515. Read the comment docs.