diff --git a/.changeset/afraid-shoes-yell.md b/.changeset/afraid-shoes-yell.md new file mode 100644 index 0000000000..1403ed93d5 --- /dev/null +++ b/.changeset/afraid-shoes-yell.md @@ -0,0 +1,5 @@ +--- +"@nomicfoundation/slang": patch +--- + +Restrict the grammar to correctly only allow an identifier in Yul variable declaration diff --git a/crates/solidity/inputs/language/src/definition.rs b/crates/solidity/inputs/language/src/definition.rs index ce11af78e8..8586078397 100644 --- a/crates/solidity/inputs/language/src/definition.rs +++ b/crates/solidity/inputs/language/src/definition.rs @@ -4209,7 +4209,7 @@ codegen_language_macros::compile!(Language( name = YulVariableDeclarationStatement, fields = ( let_keyword = Required(YulLetKeyword), - names = Required(YulPaths), + names = Required(YulIdentifier), value = Optional(reference = YulVariableDeclarationValue) ) ), diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs index 574ff8a631..56e3b9da4b 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs @@ -6862,7 +6862,13 @@ impl Language { TokenKind::YulLetKeyword, ), )?; - seq.elem_labeled(NodeLabel::Names, self.yul_paths(input))?; + seq.elem_labeled( + NodeLabel::Names, + self.parse_token_with_trivia::( + input, + TokenKind::YulIdentifier, + ), + )?; seq.elem_labeled( NodeLabel::Value, OptionalHelper::transform(self.yul_variable_declaration_value(input)), diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/ast_selectors.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/ast_selectors.rs index 27a7b6ba7b..efd4c3e218 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/ast_selectors.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/ast_selectors.rs @@ -1349,7 +1349,7 @@ impl Selector { ) -> Result>>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::YulLetKeyword))?), - Some(self.select(|node| node.is_rule_with_kind(RuleKind::YulPaths))?), + Some(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?), self.try_select(|node| node.is_rule_with_kind(RuleKind::YulVariableDeclarationValue))?, ]) } diff --git a/crates/solidity/outputs/npm/package/src/ast/generated/ast_types.ts b/crates/solidity/outputs/npm/package/src/ast/generated/ast_types.ts index 5405220821..2ac6a251df 100644 --- a/crates/solidity/outputs/npm/package/src/ast/generated/ast_types.ts +++ b/crates/solidity/outputs/npm/package/src/ast/generated/ast_types.ts @@ -3358,7 +3358,7 @@ export class YulVariableDeclarationStatement { return { letKeyword: $letKeyword as TokenNode, - names: new YulPaths($names as RuleNode), + names: $names as TokenNode, value: $value === null ? undefined : new YulVariableDeclarationValue($value as RuleNode), }; }); @@ -3371,7 +3371,7 @@ export class YulVariableDeclarationStatement { return this.fetch().letKeyword; } - public get names(): YulPaths { + public get names(): TokenNode { return this.fetch().names; } diff --git a/crates/solidity/outputs/spec/generated/grammar.ebnf b/crates/solidity/outputs/spec/generated/grammar.ebnf index a100bd838f..d6df242d61 100644 --- a/crates/solidity/outputs/spec/generated/grammar.ebnf +++ b/crates/solidity/outputs/spec/generated/grammar.ebnf @@ -1372,7 +1372,7 @@ YulReturnsDeclaration = MINUS_GREATER_THAN YulReturnVariables = YUL_IDENTIFIER (COMMA YUL_IDENTIFIER)*; YulVariableDeclarationStatement = YUL_LET_KEYWORD - YulPaths + YUL_IDENTIFIER YulVariableDeclarationValue?; YulVariableDeclarationValue = YulAssignmentOperator diff --git a/crates/solidity/outputs/spec/generated/public/06-yul/01-yul-statements.md b/crates/solidity/outputs/spec/generated/public/06-yul/01-yul-statements.md index 168615c383..4d942aad02 100644 --- a/crates/solidity/outputs/spec/generated/public/06-yul/01-yul-statements.md +++ b/crates/solidity/outputs/spec/generated/public/06-yul/01-yul-statements.md @@ -56,7 +56,7 @@ ``` -
YulVariableDeclarationStatement = YUL_LET_KEYWORD
YulPaths
YulVariableDeclarationValue?;
+
YulVariableDeclarationStatement = YUL_LET_KEYWORD
YUL_IDENTIFIER
YulVariableDeclarationValue?;
```{ .ebnf #YulVariableDeclarationValue } diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/colon_equal_separated/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/colon_equal_separated/generated/0.4.11-success.yml index f0fbf78146..226199bcad 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/colon_equal_separated/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/colon_equal_separated/generated/0.4.11-success.yml @@ -11,11 +11,8 @@ Tree: - (leading_trivia꞉ SingleLineComment): '// ColonEqual was two separate tokens before "0.5....' # (0..53) - (leading_trivia꞉ EndOfLine): "\n" # (53..54) - (let_keyword꞉ YulLetKeyword): "let" # (54..57) - - (names꞉ YulPaths): # " foo" (57..61) - - (item꞉ YulPath): # " foo" (57..61) - - (item꞉ YulPathComponent): # " foo" (57..61) - - (leading_trivia꞉ Whitespace): " " # (57..58) - - (variant꞉ YulIdentifier): "foo" # (58..61) + - (leading_trivia꞉ Whitespace): " " # (57..58) + - (names꞉ YulIdentifier): "foo" # (58..61) - (value꞉ YulVariableDeclarationValue): # " : = 0\n" (61..68) - (assignment꞉ YulAssignmentOperator) ► (variant꞉ YulColonAndEqual): # " : =" (61..65) - (leading_trivia꞉ Whitespace): " " # (61..62) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/colon_equal_separated/generated/0.5.5-failure.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/colon_equal_separated/generated/0.5.5-failure.yml index a43376396a..448e37bfad 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/colon_equal_separated/generated/0.5.5-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/colon_equal_separated/generated/0.5.5-failure.yml @@ -19,10 +19,7 @@ Tree: - (leading_trivia꞉ SingleLineComment): '// ColonEqual was two separate tokens before "0.5....' # (0..53) - (leading_trivia꞉ EndOfLine): "\n" # (53..54) - (let_keyword꞉ YulLetKeyword): "let" # (54..57) - - (names꞉ YulPaths): # " foo" (57..61) - - (item꞉ YulPath): # " foo" (57..61) - - (item꞉ YulPathComponent): # " foo" (57..61) - - (leading_trivia꞉ Whitespace): " " # (57..58) - - (variant꞉ YulIdentifier): "foo" # (58..61) + - (leading_trivia꞉ Whitespace): " " # (57..58) + - (names꞉ YulIdentifier): "foo" # (58..61) - (leading_trivia꞉ Whitespace): " " # (61..62) - (SKIPPED): ": = 0\n" # (62..68) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.4.11-failure.yml new file mode 100644 index 0000000000..0e6d7c3e0e --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.4.11-failure.yml @@ -0,0 +1,21 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ let a.b.c := 1 │ 0..14 + +Errors: # 1 total + - > + Error: Expected Colon or ColonEqual. + ╭─[crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/input.sol:1:6] + │ + 1 │ let a.b.c := 1 + │ ─────┬──── + │ ╰────── Error occurred here. + ───╯ + +Tree: + - (YulVariableDeclarationStatement): # "let a.b.c := 1\n" (0..15) + - (let_keyword꞉ YulLetKeyword): "let" # (0..3) + - (leading_trivia꞉ Whitespace): " " # (3..4) + - (names꞉ YulIdentifier): "a" # (4..5) + - (SKIPPED): ".b.c := 1\n" # (5..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.4.11-success.yml deleted file mode 100644 index d50d622dee..0000000000 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.4.11-success.yml +++ /dev/null @@ -1,27 +0,0 @@ -# This file is generated automatically by infrastructure scripts. Please don't edit by hand. - -Source: > - 1 │ let a.b.c := 1 │ 0..14 - -Errors: [] - -Tree: - - (YulVariableDeclarationStatement): # "let a.b.c := 1\n" (0..15) - - (let_keyword꞉ YulLetKeyword): "let" # (0..3) - - (names꞉ YulPaths): # " a.b.c" (3..9) - - (item꞉ YulPath): # " a.b.c" (3..9) - - (item꞉ YulPathComponent): # " a" (3..5) - - (leading_trivia꞉ Whitespace): " " # (3..4) - - (variant꞉ YulIdentifier): "a" # (4..5) - - (separator꞉ Period): "." # (5..6) - - (item꞉ YulPathComponent) ► (variant꞉ YulIdentifier): "b" # (6..7) - - (separator꞉ Period): "." # (7..8) - - (item꞉ YulPathComponent) ► (variant꞉ YulIdentifier): "c" # (8..9) - - (value꞉ YulVariableDeclarationValue): # " := 1\n" (9..15) - - (assignment꞉ YulAssignmentOperator): # " :=" (9..12) - - (leading_trivia꞉ Whitespace): " " # (9..10) - - (variant꞉ ColonEqual): ":=" # (10..12) - - (expression꞉ YulExpression) ► (variant꞉ YulLiteral): # " 1\n" (12..15) - - (leading_trivia꞉ Whitespace): " " # (12..13) - - (variant꞉ YulDecimalLiteral): "1" # (13..14) - - (trailing_trivia꞉ EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.5-failure.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.5-failure.yml new file mode 100644 index 0000000000..a2c68deb8f --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.5-failure.yml @@ -0,0 +1,21 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ let a.b.c := 1 │ 0..14 + +Errors: # 1 total + - > + Error: Expected ColonEqual. + ╭─[crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/input.sol:1:6] + │ + 1 │ let a.b.c := 1 + │ ─────┬──── + │ ╰────── Error occurred here. + ───╯ + +Tree: + - (YulVariableDeclarationStatement): # "let a.b.c := 1\n" (0..15) + - (let_keyword꞉ YulLetKeyword): "let" # (0..3) + - (leading_trivia꞉ Whitespace): " " # (3..4) + - (names꞉ YulIdentifier): "a" # (4..5) + - (SKIPPED): ".b.c := 1\n" # (5..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.8-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.8-success.yml index 988037db60..8769f989de 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.8-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.8-success.yml @@ -8,11 +8,8 @@ Errors: [] Tree: - (YulVariableDeclarationStatement): # "let a.b.c := 1\n" (0..15) - (let_keyword꞉ YulLetKeyword): "let" # (0..3) - - (names꞉ YulPaths): # " a.b.c" (3..9) - - (item꞉ YulPath): # " a.b.c" (3..9) - - (item꞉ YulPathComponent): # " a.b.c" (3..9) - - (leading_trivia꞉ Whitespace): " " # (3..4) - - (variant꞉ YulIdentifier): "a.b.c" # (4..9) + - (leading_trivia꞉ Whitespace): " " # (3..4) + - (names꞉ YulIdentifier): "a.b.c" # (4..9) - (value꞉ YulVariableDeclarationValue): # " := 1\n" (9..15) - (assignment꞉ YulAssignmentOperator): # " :=" (9..12) - (leading_trivia꞉ Whitespace): " " # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-failure.yml new file mode 100644 index 0000000000..a2c68deb8f --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-failure.yml @@ -0,0 +1,21 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ let a.b.c := 1 │ 0..14 + +Errors: # 1 total + - > + Error: Expected ColonEqual. + ╭─[crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/input.sol:1:6] + │ + 1 │ let a.b.c := 1 + │ ─────┬──── + │ ╰────── Error occurred here. + ───╯ + +Tree: + - (YulVariableDeclarationStatement): # "let a.b.c := 1\n" (0..15) + - (let_keyword꞉ YulLetKeyword): "let" # (0..3) + - (leading_trivia꞉ Whitespace): " " # (3..4) + - (names꞉ YulIdentifier): "a" # (4..5) + - (SKIPPED): ".b.c := 1\n" # (5..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-success.yml deleted file mode 100644 index d50d622dee..0000000000 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-success.yml +++ /dev/null @@ -1,27 +0,0 @@ -# This file is generated automatically by infrastructure scripts. Please don't edit by hand. - -Source: > - 1 │ let a.b.c := 1 │ 0..14 - -Errors: [] - -Tree: - - (YulVariableDeclarationStatement): # "let a.b.c := 1\n" (0..15) - - (let_keyword꞉ YulLetKeyword): "let" # (0..3) - - (names꞉ YulPaths): # " a.b.c" (3..9) - - (item꞉ YulPath): # " a.b.c" (3..9) - - (item꞉ YulPathComponent): # " a" (3..5) - - (leading_trivia꞉ Whitespace): " " # (3..4) - - (variant꞉ YulIdentifier): "a" # (4..5) - - (separator꞉ Period): "." # (5..6) - - (item꞉ YulPathComponent) ► (variant꞉ YulIdentifier): "b" # (6..7) - - (separator꞉ Period): "." # (7..8) - - (item꞉ YulPathComponent) ► (variant꞉ YulIdentifier): "c" # (8..9) - - (value꞉ YulVariableDeclarationValue): # " := 1\n" (9..15) - - (assignment꞉ YulAssignmentOperator): # " :=" (9..12) - - (leading_trivia꞉ Whitespace): " " # (9..10) - - (variant꞉ ColonEqual): ":=" # (10..12) - - (expression꞉ YulExpression) ► (variant꞉ YulLiteral): # " 1\n" (12..15) - - (leading_trivia꞉ Whitespace): " " # (12..13) - - (variant꞉ YulDecimalLiteral): "1" # (13..14) - - (trailing_trivia꞉ EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes/generated/0.7.1-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes/generated/0.7.1-success.yml index 886259f923..dbca055b22 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes/generated/0.7.1-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes/generated/0.7.1-success.yml @@ -11,9 +11,6 @@ Tree: - (leading_trivia꞉ SingleLineComment): "// Unreserved in Yul specifically since 0.7.1:" # (0..46) - (leading_trivia꞉ EndOfLine): "\n" # (46..47) - (let_keyword꞉ YulLetKeyword): "let" # (47..50) - - (names꞉ YulPaths): # " bytes\n" (50..57) - - (item꞉ YulPath): # " bytes\n" (50..57) - - (item꞉ YulPathComponent): # " bytes\n" (50..57) - - (leading_trivia꞉ Whitespace): " " # (50..51) - - (variant꞉ YulIdentifier): "bytes" # (51..56) - - (trailing_trivia꞉ EndOfLine): "\n" # (56..57) + - (leading_trivia꞉ Whitespace): " " # (50..51) + - (names꞉ YulIdentifier): "bytes" # (51..56) + - (trailing_trivia꞉ EndOfLine): "\n" # (56..57) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes1/generated/0.7.1-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes1/generated/0.7.1-success.yml index 2f41417f15..a9aa2ee722 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes1/generated/0.7.1-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes1/generated/0.7.1-success.yml @@ -11,9 +11,6 @@ Tree: - (leading_trivia꞉ SingleLineComment): "// Unreserved in Yul specifically since 0.7.1:" # (0..46) - (leading_trivia꞉ EndOfLine): "\n" # (46..47) - (let_keyword꞉ YulLetKeyword): "let" # (47..50) - - (names꞉ YulPaths): # " bytes1\n" (50..58) - - (item꞉ YulPath): # " bytes1\n" (50..58) - - (item꞉ YulPathComponent): # " bytes1\n" (50..58) - - (leading_trivia꞉ Whitespace): " " # (50..51) - - (variant꞉ YulIdentifier): "bytes1" # (51..57) - - (trailing_trivia꞉ EndOfLine): "\n" # (57..58) + - (leading_trivia꞉ Whitespace): " " # (50..51) + - (names꞉ YulIdentifier): "bytes1" # (51..57) + - (trailing_trivia꞉ EndOfLine): "\n" # (57..58) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes11/generated/0.7.1-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes11/generated/0.7.1-success.yml index 74b88a4843..de2f66444c 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes11/generated/0.7.1-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_bytes11/generated/0.7.1-success.yml @@ -11,9 +11,6 @@ Tree: - (leading_trivia꞉ SingleLineComment): "// Unreserved in Yul specifically since 0.7.1:" # (0..46) - (leading_trivia꞉ EndOfLine): "\n" # (46..47) - (let_keyword꞉ YulLetKeyword): "let" # (47..50) - - (names꞉ YulPaths): # " bytes11\n" (50..59) - - (item꞉ YulPath): # " bytes11\n" (50..59) - - (item꞉ YulPathComponent): # " bytes11\n" (50..59) - - (leading_trivia꞉ Whitespace): " " # (50..51) - - (variant꞉ YulIdentifier): "bytes11" # (51..58) - - (trailing_trivia꞉ EndOfLine): "\n" # (58..59) + - (leading_trivia꞉ Whitespace): " " # (50..51) + - (names꞉ YulIdentifier): "bytes11" # (51..58) + - (trailing_trivia꞉ EndOfLine): "\n" # (58..59) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed184x80/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed184x80/generated/0.4.11-success.yml index 6bcff37ae5..e08ad0057b 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed184x80/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed184x80/generated/0.4.11-success.yml @@ -11,9 +11,6 @@ Tree: - (leading_trivia꞉ SingleLineComment): "// This form is reserved only since 0.4.14 until 0..." # (0..62) - (leading_trivia꞉ EndOfLine): "\n" # (62..63) - (let_keyword꞉ YulLetKeyword): "let" # (63..66) - - (names꞉ YulPaths): # " ufixed184x80\n" (66..80) - - (item꞉ YulPath): # " ufixed184x80\n" (66..80) - - (item꞉ YulPathComponent): # " ufixed184x80\n" (66..80) - - (leading_trivia꞉ Whitespace): " " # (66..67) - - (variant꞉ YulIdentifier): "ufixed184x80" # (67..79) - - (trailing_trivia꞉ EndOfLine): "\n" # (79..80) + - (leading_trivia꞉ Whitespace): " " # (66..67) + - (names꞉ YulIdentifier): "ufixed184x80" # (67..79) + - (trailing_trivia꞉ EndOfLine): "\n" # (79..80) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed184x80/generated/0.7.1-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed184x80/generated/0.7.1-success.yml index 6bcff37ae5..e08ad0057b 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed184x80/generated/0.7.1-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed184x80/generated/0.7.1-success.yml @@ -11,9 +11,6 @@ Tree: - (leading_trivia꞉ SingleLineComment): "// This form is reserved only since 0.4.14 until 0..." # (0..62) - (leading_trivia꞉ EndOfLine): "\n" # (62..63) - (let_keyword꞉ YulLetKeyword): "let" # (63..66) - - (names꞉ YulPaths): # " ufixed184x80\n" (66..80) - - (item꞉ YulPath): # " ufixed184x80\n" (66..80) - - (item꞉ YulPathComponent): # " ufixed184x80\n" (66..80) - - (leading_trivia꞉ Whitespace): " " # (66..67) - - (variant꞉ YulIdentifier): "ufixed184x80" # (67..79) - - (trailing_trivia꞉ EndOfLine): "\n" # (79..80) + - (leading_trivia꞉ Whitespace): " " # (66..67) + - (names꞉ YulIdentifier): "ufixed184x80" # (67..79) + - (trailing_trivia꞉ EndOfLine): "\n" # (79..80) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x0/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x0/generated/0.4.11-success.yml index 33fccf9205..a0c0c9cde7 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x0/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x0/generated/0.4.11-success.yml @@ -11,9 +11,6 @@ Tree: - (leading_trivia꞉ SingleLineComment): "// This form is reserved only since 0.4.14 until 0..." # (0..62) - (leading_trivia꞉ EndOfLine): "\n" # (62..63) - (let_keyword꞉ YulLetKeyword): "let" # (63..66) - - (names꞉ YulPaths): # " ufixed8x0\n" (66..77) - - (item꞉ YulPath): # " ufixed8x0\n" (66..77) - - (item꞉ YulPathComponent): # " ufixed8x0\n" (66..77) - - (leading_trivia꞉ Whitespace): " " # (66..67) - - (variant꞉ YulIdentifier): "ufixed8x0" # (67..76) - - (trailing_trivia꞉ EndOfLine): "\n" # (76..77) + - (leading_trivia꞉ Whitespace): " " # (66..67) + - (names꞉ YulIdentifier): "ufixed8x0" # (67..76) + - (trailing_trivia꞉ EndOfLine): "\n" # (76..77) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x0/generated/0.7.1-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x0/generated/0.7.1-success.yml index 33fccf9205..a0c0c9cde7 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x0/generated/0.7.1-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x0/generated/0.7.1-success.yml @@ -11,9 +11,6 @@ Tree: - (leading_trivia꞉ SingleLineComment): "// This form is reserved only since 0.4.14 until 0..." # (0..62) - (leading_trivia꞉ EndOfLine): "\n" # (62..63) - (let_keyword꞉ YulLetKeyword): "let" # (63..66) - - (names꞉ YulPaths): # " ufixed8x0\n" (66..77) - - (item꞉ YulPath): # " ufixed8x0\n" (66..77) - - (item꞉ YulPathComponent): # " ufixed8x0\n" (66..77) - - (leading_trivia꞉ Whitespace): " " # (66..67) - - (variant꞉ YulIdentifier): "ufixed8x0" # (67..76) - - (trailing_trivia꞉ EndOfLine): "\n" # (76..77) + - (leading_trivia꞉ Whitespace): " " # (66..67) + - (names꞉ YulIdentifier): "ufixed8x0" # (67..76) + - (trailing_trivia꞉ EndOfLine): "\n" # (76..77) diff --git a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x8/generated/0.7.1-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x8/generated/0.7.1-success.yml index 1a8a42806b..1ea50acca6 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x8/generated/0.7.1-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/keyword_ufixed8x8/generated/0.7.1-success.yml @@ -11,9 +11,6 @@ Tree: - (leading_trivia꞉ SingleLineComment): "// This form is always reserved until 0.7.1 in Yul..." # (0..51) - (leading_trivia꞉ EndOfLine): "\n" # (51..52) - (let_keyword꞉ YulLetKeyword): "let" # (52..55) - - (names꞉ YulPaths): # " ufixed8x8\n" (55..66) - - (item꞉ YulPath): # " ufixed8x8\n" (55..66) - - (item꞉ YulPathComponent): # " ufixed8x8\n" (55..66) - - (leading_trivia꞉ Whitespace): " " # (55..56) - - (variant꞉ YulIdentifier): "ufixed8x8" # (56..65) - - (trailing_trivia꞉ EndOfLine): "\n" # (65..66) + - (leading_trivia꞉ Whitespace): " " # (55..56) + - (names꞉ YulIdentifier): "ufixed8x8" # (56..65) + - (trailing_trivia꞉ EndOfLine): "\n" # (65..66)