From ce5d942e1a4b08df83eaa90a2137144aae01976b Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Thu, 25 Apr 2024 13:01:01 +0100 Subject: [PATCH] Add a regression test first --- .../yul_variable_declaration_statement.rs | 5 ++++ .../generated/0.4.11-success.yml | 27 +++++++++++++++++++ .../generated/0.5.8-success.yml | 23 ++++++++++++++++ .../generated/0.7.0-success.yml | 27 +++++++++++++++++++ .../identifier_with_dots/input.sol | 1 + 5 files changed, 83 insertions(+) create mode 100644 crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.4.11-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.8-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/input.sol diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/yul_variable_declaration_statement.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/yul_variable_declaration_statement.rs index c975946a3a..4f8008c175 100644 --- a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/yul_variable_declaration_statement.rs +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/yul_variable_declaration_statement.rs @@ -9,6 +9,11 @@ fn colon_equal_separated() -> Result<()> { run("YulVariableDeclarationStatement", "colon_equal_separated") } +#[test] +fn identifier_with_dots() -> Result<()> { + run("YulVariableDeclarationStatement", "identifier_with_dots") +} + #[test] fn keyword_bytes() -> Result<()> { run("YulVariableDeclarationStatement", "keyword_bytes") 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 new file mode 100644 index 0000000000..d50d622dee --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.4.11-success.yml @@ -0,0 +1,27 @@ +# 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.8-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.8-success.yml new file mode 100644 index 0000000000..988037db60 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.5.8-success.yml @@ -0,0 +1,23 @@ +# 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.b.c" (3..9) + - (leading_trivia꞉ Whitespace): " " # (3..4) + - (variant꞉ YulIdentifier): "a.b.c" # (4..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.7.0-success.yml b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-success.yml new file mode 100644 index 0000000000..d50d622dee --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/generated/0.7.0-success.yml @@ -0,0 +1,27 @@ +# 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/input.sol b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/input.sol new file mode 100644 index 0000000000..b94c546920 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulVariableDeclarationStatement/identifier_with_dots/input.sol @@ -0,0 +1 @@ +let a.b.c := 1