-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Define DecimalLiteral in DSL v2 using the DSL v1 rules (#643)
Otherwise, the following rule: ```rust // An integer (without a dot or a fraction) is enabled in all versions: TokenDefinition( scanner = TrailingContext( scanner = Sequence([ Fragment(DecimalDigits), Optional(Fragment(DecimalExponent)) ]), not_followed_by = Fragment(IdentifierStart) ) ), ``` was a catch-all rule that could successfully lex "1.2" as "1" in all versions. Instead, this mimicks the following version from the DSL v1: ```rust scanner DecimalLiteral = ( ( ( { removed in "0.5.0" (DecimalDigits (("." (DecimalDigits ?) ) ?)) } | { introduced in "0.5.0" (DecimalDigits (("." DecimalDigits ) ?)) } | ('.' DecimalDigits) ) (DecimalExponent ?) ) not followed by IdentifierStart ) ; ``` and fixed a case in https://github.com/Xanewok/slang/tree/codegen-use-dslv2 when using parts of the DSLv2 for the codegen but I didn't open the PR yet. Ref #638
- Loading branch information
Showing
7 changed files
with
47 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 15 additions & 21 deletions
36
crates/solidity/outputs/cargo/crate/src/generated/language.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 15 additions & 21 deletions
36
crates/solidity/outputs/npm/crate/src/generated/language.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
...ing/snapshots/cst_output/NumericExpression/float_no_fraction/generated/0.6.11-failure.yml
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
...ting/snapshots/cst_output/NumericExpression/float_no_fraction/generated/0.7.0-failure.yml
This file was deleted.
Oops, something went wrong.