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
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 ) ; ```
- Loading branch information