From a561fb161eb7c18c838c85f71d132764d1d04050 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Tue, 23 Apr 2024 15:09:48 +0100 Subject: [PATCH] Upgrade Solidity to 0.8.25 (#943) See commit description for each change. We should probably release a patch version and use it in the extension, as there are quite a few "unsupported version" errors reported by the users. --- .changeset/witty-adults-sleep.md | 5 + .../inputs/language/src/definition.rs | 61 ++++++++- .../slang_solidity/src/generated/kinds.rs | 5 + .../slang_solidity/src/generated/language.rs | 126 +++++++++++++++++- .../generated/napi_interface/ast_selectors.rs | 5 + .../tests/src/cst_output/generated/mod.rs | 3 +- .../generated/yul_function_call_expression.rs | 25 ++++ .../package/src/ast/generated/ast_types.ts | 5 + .../npm/package/src/generated/index.d.ts | 5 + .../outputs/spec/generated/grammar.ebnf | 27 +++- .../public/06-yul/02-yul-expressions.md | 2 +- .../public/06-yul/03-yul-keywords.md | 30 +++++ .../generated/public/supported-versions.md | 8 +- .../generated/0.8.24-failure.yml | 81 +++++++++++ .../generated/0.8.24-failure.yml | 17 +++ .../generated/0.8.24-failure.yml | 17 +++ .../generated/0.4.11-success.yml | 15 +++ .../generated/0.8.24-success.yml | 14 ++ .../built_in_blobbasefee/input.sol | 1 + .../generated/0.4.11-success.yml | 15 +++ .../generated/0.8.24-success.yml | 14 ++ .../built_in_blobhash/input.sol | 1 + .../generated/0.8.24-failure.yml | 17 +++ .../generated/0.4.11-success.yml | 15 +++ .../generated/0.8.24-success.yml | 14 ++ .../built_in_mcopy/input.sol | 1 + .../generated/0.4.11-success.yml | 15 +++ .../generated/0.8.24-success.yml | 14 ++ .../built_in_tload/input.sol | 1 + .../generated/0.4.11-success.yml | 15 +++ .../generated/0.8.24-success.yml | 14 ++ .../built_in_tstore/input.sol | 1 + 32 files changed, 578 insertions(+), 11 deletions(-) create mode 100644 .changeset/witty-adults-sleep.md create mode 100644 crates/solidity/testing/snapshots/cst_output/YulBlock/ignore_unknown_delim/generated/0.8.24-failure.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulExpression/decimal_trailing_ident_start/generated/0.8.24-failure.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulExpression/hex_trailing_ident_start/generated/0.8.24-failure.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/generated/0.4.11-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/generated/0.8.24-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/input.sol create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/generated/0.4.11-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/generated/0.8.24-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/input.sol create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/generated/0.8.24-failure.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/generated/0.4.11-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/generated/0.8.24-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/input.sol create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/generated/0.4.11-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/generated/0.8.24-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/input.sol create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/generated/0.4.11-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/generated/0.8.24-success.yml create mode 100644 crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/input.sol diff --git a/.changeset/witty-adults-sleep.md b/.changeset/witty-adults-sleep.md new file mode 100644 index 0000000000..6132b22204 --- /dev/null +++ b/.changeset/witty-adults-sleep.md @@ -0,0 +1,5 @@ +--- +"@nomicfoundation/slang": patch +--- + +Support Solidity 0.8.25 diff --git a/crates/solidity/inputs/language/src/definition.rs b/crates/solidity/inputs/language/src/definition.rs index ea36c22408..53471ab936 100644 --- a/crates/solidity/inputs/language/src/definition.rs +++ b/crates/solidity/inputs/language/src/definition.rs @@ -28,7 +28,7 @@ codegen_language_macros::compile!(Language( "0.6.12", "0.7.0", "0.7.1", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6", "0.8.7", "0.8.8", "0.8.9", "0.8.10", "0.8.11", "0.8.12", "0.8.13", "0.8.14", "0.8.15", "0.8.16", "0.8.17", "0.8.18", "0.8.19", "0.8.20", - "0.8.21", "0.8.22" + "0.8.21", "0.8.22", "0.8.23", "0.8.24", "0.8.25" ], sections = [ Section( @@ -4479,7 +4479,19 @@ codegen_language_macros::compile!(Language( EnumVariant( reference = YulPrevRandaoKeyword, enabled = From("0.8.18") - ) + ), + // 'Cancun' hard-fork updates: + EnumVariant( + reference = YulBlobBaseFeeKeyword, + enabled = From("0.8.24") + ), + EnumVariant( + reference = YulBlobHashKeyword, + enabled = From("0.8.24") + ), + EnumVariant(reference = YulTLoadKeyword, enabled = From("0.8.24")), + EnumVariant(reference = YulTStoreKeyword, enabled = From("0.8.24")), + EnumVariant(reference = YulMCopyKeyword, enabled = From("0.8.24")) ] ), Enum( @@ -4633,6 +4645,24 @@ codegen_language_macros::compile!(Language( value = Atom("basefee") )] ), + Keyword( + name = YulBlobBaseFeeKeyword, + identifier = YulIdentifier, + definitions = [KeywordDefinition( + enabled = From("0.8.24"), + reserved = From("0.8.24"), + value = Atom("blobbasefee") + )] + ), + Keyword( + name = YulBlobHashKeyword, + identifier = YulIdentifier, + definitions = [KeywordDefinition( + enabled = From("0.8.24"), + reserved = From("0.8.24"), + value = Atom("blobhash") + )] + ), Keyword( name = YulBlockHashKeyword, identifier = YulIdentifier, @@ -5593,6 +5623,15 @@ codegen_language_macros::compile!(Language( value = Atom("minutes") )] ), + Keyword( + name = YulMCopyKeyword, + identifier = YulIdentifier, + definitions = [KeywordDefinition( + enabled = From("0.8.24"), + reserved = From("0.8.24"), + value = Atom("mcopy") + )] + ), Keyword( name = YulMLoadKeyword, identifier = YulIdentifier, @@ -6054,11 +6093,29 @@ codegen_language_macros::compile!(Language( value = Atom("throw") )] ), + Keyword( + name = YulTLoadKeyword, + identifier = YulIdentifier, + definitions = [KeywordDefinition( + enabled = From("0.8.24"), + reserved = From("0.8.24"), + value = Atom("tload") + )] + ), Keyword( name = YulTrueKeyword, identifier = YulIdentifier, definitions = [KeywordDefinition(value = Atom("true"))] ), + Keyword( + name = YulTStoreKeyword, + identifier = YulIdentifier, + definitions = [KeywordDefinition( + enabled = From("0.8.24"), + reserved = From("0.8.24"), + value = Atom("tstore") + )] + ), Keyword( name = YulTryKeyword, identifier = YulIdentifier, diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/kinds.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/kinds.rs index 887df1cf41..e1621abd0f 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/kinds.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/kinds.rs @@ -594,6 +594,8 @@ pub enum TokenKind { YulAutoKeyword, YulBalanceKeyword, YulBaseFeeKeyword, + YulBlobBaseFeeKeyword, + YulBlobHashKeyword, YulBlockHashKeyword, YulBoolKeyword, YulBreakKeyword, @@ -677,6 +679,7 @@ pub enum TokenKind { YulLog3Keyword, YulLog4Keyword, YulLtKeyword, + YulMCopyKeyword, YulMLoadKeyword, YulMSizeKeyword, YulMStore8Keyword, @@ -743,6 +746,8 @@ pub enum TokenKind { YulSupportsKeyword, YulSwitchKeyword, YulSzaboKeyword, + YulTLoadKeyword, + YulTStoreKeyword, YulThrowKeyword, YulTimestampKeyword, YulTrueKeyword, 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 6db535c322..08e4570aed 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs @@ -61,6 +61,7 @@ pub struct Language { pub(crate) version_is_at_least_0_8_18: bool, pub(crate) version_is_at_least_0_8_19: bool, pub(crate) version_is_at_least_0_8_22: bool, + pub(crate) version_is_at_least_0_8_24: bool, } #[derive(thiserror::Error, Debug)] @@ -159,6 +160,9 @@ impl Language { Version::new(0, 8, 20), Version::new(0, 8, 21), Version::new(0, 8, 22), + Version::new(0, 8, 23), + Version::new(0, 8, 24), + Version::new(0, 8, 25), ]; pub fn new(version: Version) -> std::result::Result { @@ -194,6 +198,7 @@ impl Language { version_is_at_least_0_8_18: Version::new(0, 8, 18) <= version, version_is_at_least_0_8_19: Version::new(0, 8, 19) <= version, version_is_at_least_0_8_22: Version::new(0, 8, 22) <= version, + version_is_at_least_0_8_24: Version::new(0, 8, 24) <= version, version, }) } else { @@ -6288,6 +6293,41 @@ impl Language { ); choice.consider(input, result)?; } + if self.version_is_at_least_0_8_24 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::YulBlobBaseFeeKeyword, + ); + choice.consider(input, result)?; + } + if self.version_is_at_least_0_8_24 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::YulBlobHashKeyword, + ); + choice.consider(input, result)?; + } + if self.version_is_at_least_0_8_24 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::YulTLoadKeyword, + ); + choice.consider(input, result)?; + } + if self.version_is_at_least_0_8_24 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::YulTStoreKeyword, + ); + choice.consider(input, result)?; + } + if self.version_is_at_least_0_8_24 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::YulMCopyKeyword, + ); + choice.consider(input, result)?; + } choice.finish(input) }) .with_label(NodeLabel::Variant) @@ -11097,8 +11137,57 @@ impl Lexer for Language { None => KeywordScan::Absent, }, Some('l') => { - if scan_chars!(input, 'o', 'c', 'k', 'h', 'a', 's', 'h') { - KeywordScan::Reserved(TokenKind::YulBlockHashKeyword) + if scan_chars!(input, 'o') { + match input.next() { + Some('b') => match input.next() { + Some('b') => { + if scan_chars!(input, 'a', 's', 'e', 'f', 'e', 'e') + { + if self.version_is_at_least_0_8_24 { + KeywordScan::Reserved( + TokenKind::YulBlobBaseFeeKeyword, + ) + } else { + KeywordScan::Absent + } + } else { + KeywordScan::Absent + } + } + Some('h') => { + if scan_chars!(input, 'a', 's', 'h') { + if self.version_is_at_least_0_8_24 { + KeywordScan::Reserved( + TokenKind::YulBlobHashKeyword, + ) + } else { + KeywordScan::Absent + } + } else { + KeywordScan::Absent + } + } + Some(_) => { + input.undo(); + KeywordScan::Absent + } + None => KeywordScan::Absent, + }, + Some('c') => { + if scan_chars!(input, 'k', 'h', 'a', 's', 'h') { + KeywordScan::Reserved( + TokenKind::YulBlockHashKeyword, + ) + } else { + KeywordScan::Absent + } + } + Some(_) => { + input.undo(); + KeywordScan::Absent + } + None => KeywordScan::Absent, + } } else { KeywordScan::Absent } @@ -12099,6 +12188,17 @@ impl Lexer for Language { } None => KeywordScan::Absent, }, + Some('c') => { + if scan_chars!(input, 'o', 'p', 'y') { + if self.version_is_at_least_0_8_24 { + KeywordScan::Reserved(TokenKind::YulMCopyKeyword) + } else { + KeywordScan::Absent + } + } else { + KeywordScan::Absent + } + } Some('e') => { if scan_chars!(input, 'm', 'o', 'r', 'y') { if !self.version_is_at_least_0_7_1 { @@ -12929,6 +13029,17 @@ impl Lexer for Language { KeywordScan::Absent } } + Some('l') => { + if scan_chars!(input, 'o', 'a', 'd') { + if self.version_is_at_least_0_8_24 { + KeywordScan::Reserved(TokenKind::YulTLoadKeyword) + } else { + KeywordScan::Absent + } + } else { + KeywordScan::Absent + } + } Some('r') => match input.next() { Some('u') => { if scan_chars!(input, 'e') { @@ -12950,6 +13061,17 @@ impl Lexer for Language { } None => KeywordScan::Absent, }, + Some('s') => { + if scan_chars!(input, 't', 'o', 'r', 'e') { + if self.version_is_at_least_0_8_24 { + KeywordScan::Reserved(TokenKind::YulTStoreKeyword) + } else { + KeywordScan::Absent + } + } else { + KeywordScan::Absent + } + } Some('y') => { if scan_chars!(input, 'p', 'e') { match input.next() { 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 ddfd8d859d..daad7e00b1 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 @@ -2190,6 +2190,11 @@ impl Selector { TokenKind::YulBaseFeeKeyword, TokenKind::YulDifficultyKeyword, TokenKind::YulPrevRandaoKeyword, + TokenKind::YulBlobBaseFeeKeyword, + TokenKind::YulBlobHashKeyword, + TokenKind::YulTLoadKeyword, + TokenKind::YulTStoreKeyword, + TokenKind::YulMCopyKeyword, ]) }) } diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/mod.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/mod.rs index 2594d5f48b..a790845aa0 100644 --- a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/mod.rs +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/mod.rs @@ -54,7 +54,7 @@ mod yul_label; mod yul_leave_statement; mod yul_variable_declaration_statement; -pub const VERSION_BREAKS: [Version; 31] = [ +pub const VERSION_BREAKS: [Version; 32] = [ Version::new(0, 4, 11), Version::new(0, 4, 12), Version::new(0, 4, 14), @@ -86,4 +86,5 @@ pub const VERSION_BREAKS: [Version; 31] = [ Version::new(0, 8, 18), Version::new(0, 8, 19), Version::new(0, 8, 22), + Version::new(0, 8, 24), ]; diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/yul_function_call_expression.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/yul_function_call_expression.rs index 4bb309f33d..8fa3888bbe 100644 --- a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/yul_function_call_expression.rs +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/yul_function_call_expression.rs @@ -34,6 +34,16 @@ fn built_in_basefee() -> Result<()> { run("YulFunctionCallExpression", "built_in_basefee") } +#[test] +fn built_in_blobbasefee() -> Result<()> { + run("YulFunctionCallExpression", "built_in_blobbasefee") +} + +#[test] +fn built_in_blobhash() -> Result<()> { + run("YulFunctionCallExpression", "built_in_blobhash") +} + #[test] fn built_in_blockhash() -> Result<()> { run("YulFunctionCallExpression", "built_in_blockhash") @@ -204,6 +214,11 @@ fn built_in_lt() -> Result<()> { run("YulFunctionCallExpression", "built_in_lt") } +#[test] +fn built_in_mcopy() -> Result<()> { + run("YulFunctionCallExpression", "built_in_mcopy") +} + #[test] fn built_in_mload() -> Result<()> { run("YulFunctionCallExpression", "built_in_mload") @@ -379,6 +394,16 @@ fn built_in_timestamp() -> Result<()> { run("YulFunctionCallExpression", "built_in_timestamp") } +#[test] +fn built_in_tload() -> Result<()> { + run("YulFunctionCallExpression", "built_in_tload") +} + +#[test] +fn built_in_tstore() -> Result<()> { + run("YulFunctionCallExpression", "built_in_tstore") +} + #[test] fn built_in_xor() -> Result<()> { run("YulFunctionCallExpression", "built_in_xor") 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 38072a88c0..56cfeeae4c 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 @@ -5191,6 +5191,11 @@ export class YulBuiltInFunction { case TokenKind.YulBaseFeeKeyword: case TokenKind.YulDifficultyKeyword: case TokenKind.YulPrevRandaoKeyword: + case TokenKind.YulBlobBaseFeeKeyword: + case TokenKind.YulBlobHashKeyword: + case TokenKind.YulTLoadKeyword: + case TokenKind.YulTStoreKeyword: + case TokenKind.YulMCopyKeyword: return variant as TokenNode; default: diff --git a/crates/solidity/outputs/npm/package/src/generated/index.d.ts b/crates/solidity/outputs/npm/package/src/generated/index.d.ts index 1f4d7fd1d3..8a3ba48a45 100644 --- a/crates/solidity/outputs/npm/package/src/generated/index.d.ts +++ b/crates/solidity/outputs/npm/package/src/generated/index.d.ts @@ -553,6 +553,8 @@ export namespace kinds { YulAutoKeyword = "YulAutoKeyword", YulBalanceKeyword = "YulBalanceKeyword", YulBaseFeeKeyword = "YulBaseFeeKeyword", + YulBlobBaseFeeKeyword = "YulBlobBaseFeeKeyword", + YulBlobHashKeyword = "YulBlobHashKeyword", YulBlockHashKeyword = "YulBlockHashKeyword", YulBoolKeyword = "YulBoolKeyword", YulBreakKeyword = "YulBreakKeyword", @@ -636,6 +638,7 @@ export namespace kinds { YulLog3Keyword = "YulLog3Keyword", YulLog4Keyword = "YulLog4Keyword", YulLtKeyword = "YulLtKeyword", + YulMCopyKeyword = "YulMCopyKeyword", YulMLoadKeyword = "YulMLoadKeyword", YulMSizeKeyword = "YulMSizeKeyword", YulMStore8Keyword = "YulMStore8Keyword", @@ -702,6 +705,8 @@ export namespace kinds { YulSupportsKeyword = "YulSupportsKeyword", YulSwitchKeyword = "YulSwitchKeyword", YulSzaboKeyword = "YulSzaboKeyword", + YulTLoadKeyword = "YulTLoadKeyword", + YulTStoreKeyword = "YulTStoreKeyword", YulThrowKeyword = "YulThrowKeyword", YulTimestampKeyword = "YulTimestampKeyword", YulTrueKeyword = "YulTrueKeyword", diff --git a/crates/solidity/outputs/spec/generated/grammar.ebnf b/crates/solidity/outputs/spec/generated/grammar.ebnf index 815cd317e4..c4b9dc8ec7 100644 --- a/crates/solidity/outputs/spec/generated/grammar.ebnf +++ b/crates/solidity/outputs/spec/generated/grammar.ebnf @@ -1519,7 +1519,12 @@ YulBuiltInFunction = YUL_ADD_KEYWORD | YUL_SELF_BALANCE_KEYWORD | YUL_BASE_FEE_KEYWORD (* Introduced in 0.8.7 *) | YUL_DIFFICULTY_KEYWORD (* Deprecated in 0.8.18 *) - | YUL_PREV_RANDAO_KEYWORD; (* Introduced in 0.8.18 *) + | YUL_PREV_RANDAO_KEYWORD (* Introduced in 0.8.18 *) + | YUL_BLOB_BASE_FEE_KEYWORD (* Introduced in 0.8.24 *) + | YUL_BLOB_HASH_KEYWORD (* Introduced in 0.8.24 *) + | YUL_T_LOAD_KEYWORD (* Introduced in 0.8.24 *) + | YUL_T_STORE_KEYWORD (* Introduced in 0.8.24 *) + | YUL_M_COPY_KEYWORD; (* Introduced in 0.8.24 *) YulLiteral = YUL_TRUE_KEYWORD | YUL_FALSE_KEYWORD @@ -1572,6 +1577,14 @@ YUL_BALANCE_KEYWORD = "balance"; (* Reserved in 0.8.7 *) YUL_BASE_FEE_KEYWORD = "basefee"; +(* Introduced in 0.8.24 *) +(* Reserved in 0.8.24 *) +YUL_BLOB_BASE_FEE_KEYWORD = "blobbasefee"; + +(* Introduced in 0.8.24 *) +(* Reserved in 0.8.24 *) +YUL_BLOB_HASH_KEYWORD = "blobhash"; + YUL_BLOCK_HASH_KEYWORD = "blockhash"; (* Reserved until 0.5.10 *) @@ -1804,6 +1817,10 @@ YUL_MEMORY_KEYWORD = "memory"; (* Reserved until 0.7.1 *) YUL_MINUTES_KEYWORD = "minutes"; +(* Introduced in 0.8.24 *) +(* Reserved in 0.8.24 *) +YUL_M_COPY_KEYWORD = "mcopy"; + YUL_M_LOAD_KEYWORD = "mload"; YUL_MOD_KEYWORD = "mod"; @@ -1973,8 +1990,16 @@ YUL_TIMESTAMP_KEYWORD = "timestamp"; (* Reserved until 0.7.1 *) YUL_THROW_KEYWORD = "throw"; +(* Introduced in 0.8.24 *) +(* Reserved in 0.8.24 *) +YUL_T_LOAD_KEYWORD = "tload"; + YUL_TRUE_KEYWORD = "true"; +(* Introduced in 0.8.24 *) +(* Reserved in 0.8.24 *) +YUL_T_STORE_KEYWORD = "tstore"; + (* Reserved until 0.7.1 *) YUL_TRY_KEYWORD = "try"; diff --git a/crates/solidity/outputs/spec/generated/public/06-yul/02-yul-expressions.md b/crates/solidity/outputs/spec/generated/public/06-yul/02-yul-expressions.md index 2e6d890d79..5f8e47fc2c 100644 --- a/crates/solidity/outputs/spec/generated/public/06-yul/02-yul-expressions.md +++ b/crates/solidity/outputs/spec/generated/public/06-yul/02-yul-expressions.md @@ -38,7 +38,7 @@ ``` -
YulBuiltInFunction = YUL_ADD_KEYWORD
| YUL_ADD_MOD_KEYWORD
| YUL_ADDRESS_KEYWORD
| YUL_AND_KEYWORD
| YUL_BALANCE_KEYWORD
| YUL_BLOCK_HASH_KEYWORD
| YUL_BYTE_KEYWORD
| YUL_CALL_CODE_KEYWORD
| YUL_CALL_DATA_COPY_KEYWORD
| YUL_CALL_DATA_LOAD_KEYWORD
| YUL_CALL_DATA_SIZE_KEYWORD
| YUL_CALLER_KEYWORD
| YUL_CALL_KEYWORD
| YUL_CALL_VALUE_KEYWORD
| YUL_COIN_BASE_KEYWORD
| YUL_CREATE_KEYWORD
| YUL_DELEGATE_CALL_KEYWORD
| YUL_DIV_KEYWORD
| YUL_EQ_KEYWORD
| YUL_EXP_KEYWORD
| YUL_EXT_CODE_COPY_KEYWORD
| YUL_EXT_CODE_SIZE_KEYWORD
| YUL_GAS_KEYWORD
| YUL_GAS_LIMIT_KEYWORD
| YUL_GAS_PRICE_KEYWORD
| YUL_GT_KEYWORD
| YUL_INVALID_KEYWORD
| YUL_IS_ZERO_KEYWORD
| YUL_LOG_0_KEYWORD
| YUL_LOG_1_KEYWORD
| YUL_LOG_2_KEYWORD
| YUL_LOG_3_KEYWORD
| YUL_LOG_4_KEYWORD
| YUL_LT_KEYWORD
| YUL_M_LOAD_KEYWORD
| YUL_MOD_KEYWORD
| YUL_M_SIZE_KEYWORD
| YUL_M_STORE_8_KEYWORD
| YUL_M_STORE_KEYWORD
| YUL_MUL_KEYWORD
| YUL_MUL_MOD_KEYWORD
| YUL_NOT_KEYWORD
| YUL_NUMBER_KEYWORD
| YUL_ORIGIN_KEYWORD
| YUL_OR_KEYWORD
| YUL_POP_KEYWORD
| YUL_RETURN_KEYWORD
| YUL_REVERT_KEYWORD
| YUL_S_DIV_KEYWORD
| YUL_SELF_DESTRUCT_KEYWORD
| YUL_SGT_KEYWORD
| YUL_SIGN_EXTEND_KEYWORD
| YUL_S_LOAD_KEYWORD
| YUL_SLT_KEYWORD
| YUL_S_MOD_KEYWORD
| YUL_S_STORE_KEYWORD
| YUL_STOP_KEYWORD
| YUL_SUB_KEYWORD
| YUL_TIMESTAMP_KEYWORD
| YUL_XOR_KEYWORD
| YUL_KECCAK_256_KEYWORD (* Introduced in 0.4.12 *)
| YUL_SHA_3_KEYWORD (* Deprecated in 0.5.0 *)
| YUL_SUICIDE_KEYWORD (* Deprecated in 0.5.0 *)
| YUL_RETURN_DATA_COPY_KEYWORD (* Introduced in 0.4.12 *)
| YUL_RETURN_DATA_SIZE_KEYWORD (* Introduced in 0.4.12 *)
| YUL_STATIC_CALL_KEYWORD (* Introduced in 0.4.12 *)
| YUL_CREATE_2_KEYWORD (* Introduced in 0.4.12 *)
| YUL_EXT_CODE_HASH_KEYWORD (* Introduced in 0.5.0 *)
| YUL_SAR_KEYWORD
| YUL_SHL_KEYWORD
| YUL_SHR_KEYWORD
| YUL_CHAIN_ID_KEYWORD
| YUL_SELF_BALANCE_KEYWORD
| YUL_BASE_FEE_KEYWORD (* Introduced in 0.8.7 *)
| YUL_DIFFICULTY_KEYWORD (* Deprecated in 0.8.18 *)
| YUL_PREV_RANDAO_KEYWORD; (* Introduced in 0.8.18 *)
+
YulBuiltInFunction = YUL_ADD_KEYWORD
| YUL_ADD_MOD_KEYWORD
| YUL_ADDRESS_KEYWORD
| YUL_AND_KEYWORD
| YUL_BALANCE_KEYWORD
| YUL_BLOCK_HASH_KEYWORD
| YUL_BYTE_KEYWORD
| YUL_CALL_CODE_KEYWORD
| YUL_CALL_DATA_COPY_KEYWORD
| YUL_CALL_DATA_LOAD_KEYWORD
| YUL_CALL_DATA_SIZE_KEYWORD
| YUL_CALLER_KEYWORD
| YUL_CALL_KEYWORD
| YUL_CALL_VALUE_KEYWORD
| YUL_COIN_BASE_KEYWORD
| YUL_CREATE_KEYWORD
| YUL_DELEGATE_CALL_KEYWORD
| YUL_DIV_KEYWORD
| YUL_EQ_KEYWORD
| YUL_EXP_KEYWORD
| YUL_EXT_CODE_COPY_KEYWORD
| YUL_EXT_CODE_SIZE_KEYWORD
| YUL_GAS_KEYWORD
| YUL_GAS_LIMIT_KEYWORD
| YUL_GAS_PRICE_KEYWORD
| YUL_GT_KEYWORD
| YUL_INVALID_KEYWORD
| YUL_IS_ZERO_KEYWORD
| YUL_LOG_0_KEYWORD
| YUL_LOG_1_KEYWORD
| YUL_LOG_2_KEYWORD
| YUL_LOG_3_KEYWORD
| YUL_LOG_4_KEYWORD
| YUL_LT_KEYWORD
| YUL_M_LOAD_KEYWORD
| YUL_MOD_KEYWORD
| YUL_M_SIZE_KEYWORD
| YUL_M_STORE_8_KEYWORD
| YUL_M_STORE_KEYWORD
| YUL_MUL_KEYWORD
| YUL_MUL_MOD_KEYWORD
| YUL_NOT_KEYWORD
| YUL_NUMBER_KEYWORD
| YUL_ORIGIN_KEYWORD
| YUL_OR_KEYWORD
| YUL_POP_KEYWORD
| YUL_RETURN_KEYWORD
| YUL_REVERT_KEYWORD
| YUL_S_DIV_KEYWORD
| YUL_SELF_DESTRUCT_KEYWORD
| YUL_SGT_KEYWORD
| YUL_SIGN_EXTEND_KEYWORD
| YUL_S_LOAD_KEYWORD
| YUL_SLT_KEYWORD
| YUL_S_MOD_KEYWORD
| YUL_S_STORE_KEYWORD
| YUL_STOP_KEYWORD
| YUL_SUB_KEYWORD
| YUL_TIMESTAMP_KEYWORD
| YUL_XOR_KEYWORD
| YUL_KECCAK_256_KEYWORD (* Introduced in 0.4.12 *)
| YUL_SHA_3_KEYWORD (* Deprecated in 0.5.0 *)
| YUL_SUICIDE_KEYWORD (* Deprecated in 0.5.0 *)
| YUL_RETURN_DATA_COPY_KEYWORD (* Introduced in 0.4.12 *)
| YUL_RETURN_DATA_SIZE_KEYWORD (* Introduced in 0.4.12 *)
| YUL_STATIC_CALL_KEYWORD (* Introduced in 0.4.12 *)
| YUL_CREATE_2_KEYWORD (* Introduced in 0.4.12 *)
| YUL_EXT_CODE_HASH_KEYWORD (* Introduced in 0.5.0 *)
| YUL_SAR_KEYWORD
| YUL_SHL_KEYWORD
| YUL_SHR_KEYWORD
| YUL_CHAIN_ID_KEYWORD
| YUL_SELF_BALANCE_KEYWORD
| YUL_BASE_FEE_KEYWORD (* Introduced in 0.8.7 *)
| YUL_DIFFICULTY_KEYWORD (* Deprecated in 0.8.18 *)
| YUL_PREV_RANDAO_KEYWORD (* Introduced in 0.8.18 *)
| YUL_BLOB_BASE_FEE_KEYWORD (* Introduced in 0.8.24 *)
| YUL_BLOB_HASH_KEYWORD (* Introduced in 0.8.24 *)
| YUL_T_LOAD_KEYWORD (* Introduced in 0.8.24 *)
| YUL_T_STORE_KEYWORD (* Introduced in 0.8.24 *)
| YUL_M_COPY_KEYWORD; (* Introduced in 0.8.24 *)
```{ .ebnf #YulLiteral } diff --git a/crates/solidity/outputs/spec/generated/public/06-yul/03-yul-keywords.md b/crates/solidity/outputs/spec/generated/public/06-yul/03-yul-keywords.md index 1748c557d4..919104397e 100644 --- a/crates/solidity/outputs/spec/generated/public/06-yul/03-yul-keywords.md +++ b/crates/solidity/outputs/spec/generated/public/06-yul/03-yul-keywords.md @@ -88,6 +88,18 @@
(* Introduced in 0.8.7 *)
(* Reserved in 0.8.7 *)
YUL_BASE_FEE_KEYWORD = "basefee";
+```{ .ebnf #YulBlobBaseFeeKeyword } + +``` + +
(* Introduced in 0.8.24 *)
(* Reserved in 0.8.24 *)
YUL_BLOB_BASE_FEE_KEYWORD = "blobbasefee";
+ +```{ .ebnf #YulBlobHashKeyword } + +``` + +
(* Introduced in 0.8.24 *)
(* Reserved in 0.8.24 *)
YUL_BLOB_HASH_KEYWORD = "blobhash";
+ ```{ .ebnf #YulBlockHashKeyword } ``` @@ -598,6 +610,12 @@
(* Reserved until 0.7.1 *)
YUL_MINUTES_KEYWORD = "minutes";
+```{ .ebnf #YulMCopyKeyword } + +``` + +
(* Introduced in 0.8.24 *)
(* Reserved in 0.8.24 *)
YUL_M_COPY_KEYWORD = "mcopy";
+ ```{ .ebnf #YulMLoadKeyword } ``` @@ -976,12 +994,24 @@
(* Reserved until 0.7.1 *)
YUL_THROW_KEYWORD = "throw";
+```{ .ebnf #YulTLoadKeyword } + +``` + +
(* Introduced in 0.8.24 *)
(* Reserved in 0.8.24 *)
YUL_T_LOAD_KEYWORD = "tload";
+ ```{ .ebnf #YulTrueKeyword } ```
YUL_TRUE_KEYWORD = "true";
+```{ .ebnf #YulTStoreKeyword } + +``` + +
(* Introduced in 0.8.24 *)
(* Reserved in 0.8.24 *)
YUL_T_STORE_KEYWORD = "tstore";
+ ```{ .ebnf #YulTryKeyword } ``` diff --git a/crates/solidity/outputs/spec/generated/public/supported-versions.md b/crates/solidity/outputs/spec/generated/public/supported-versions.md index a81ad3a072..b299a186c5 100644 --- a/crates/solidity/outputs/spec/generated/public/supported-versions.md +++ b/crates/solidity/outputs/spec/generated/public/supported-versions.md @@ -1,9 +1,9 @@ -This specification compiles information from 77 publicly released versions of Solidity: +This specification compiles information from 80 publicly released versions of Solidity: -`0.4.11` `0.4.12` `0.4.13` `0.4.14` `0.4.15` `0.4.16` `0.4.17` `0.4.18` `0.4.19` `0.4.20` `0.4.21` `0.4.22` `0.4.23` `0.4.24` `0.4.25` `0.4.26` `0.5.0` `0.5.1` `0.5.2` `0.5.3` `0.5.4` `0.5.5` `0.5.6` `0.5.7` `0.5.8` `0.5.9` `0.5.10` `0.5.11` `0.5.12` `0.5.13` `0.5.14` `0.5.15` `0.5.16` `0.5.17` `0.6.0` `0.6.1` `0.6.2` `0.6.3` `0.6.4` `0.6.5` `0.6.6` `0.6.7` `0.6.8` `0.6.9` `0.6.10` `0.6.11` `0.6.12` `0.7.0` `0.7.1` `0.7.2` `0.7.3` `0.7.4` `0.7.5` `0.7.6` `0.8.0` `0.8.1` `0.8.2` `0.8.3` `0.8.4` `0.8.5` `0.8.6` `0.8.7` `0.8.8` `0.8.9` `0.8.10` `0.8.11` `0.8.12` `0.8.13` `0.8.14` `0.8.15` `0.8.16` `0.8.17` `0.8.18` `0.8.19` `0.8.20` `0.8.21` `0.8.22` +`0.4.11` `0.4.12` `0.4.13` `0.4.14` `0.4.15` `0.4.16` `0.4.17` `0.4.18` `0.4.19` `0.4.20` `0.4.21` `0.4.22` `0.4.23` `0.4.24` `0.4.25` `0.4.26` `0.5.0` `0.5.1` `0.5.2` `0.5.3` `0.5.4` `0.5.5` `0.5.6` `0.5.7` `0.5.8` `0.5.9` `0.5.10` `0.5.11` `0.5.12` `0.5.13` `0.5.14` `0.5.15` `0.5.16` `0.5.17` `0.6.0` `0.6.1` `0.6.2` `0.6.3` `0.6.4` `0.6.5` `0.6.6` `0.6.7` `0.6.8` `0.6.9` `0.6.10` `0.6.11` `0.6.12` `0.7.0` `0.7.1` `0.7.2` `0.7.3` `0.7.4` `0.7.5` `0.7.6` `0.8.0` `0.8.1` `0.8.2` `0.8.3` `0.8.4` `0.8.5` `0.8.6` `0.8.7` `0.8.8` `0.8.9` `0.8.10` `0.8.11` `0.8.12` `0.8.13` `0.8.14` `0.8.15` `0.8.16` `0.8.17` `0.8.18` `0.8.19` `0.8.20` `0.8.21` `0.8.22` `0.8.23` `0.8.24` `0.8.25` -Among which, 31 versions have breaking changes: +Among which, 32 versions have breaking changes: -`0.4.11` `0.4.12` `0.4.14` `0.4.16` `0.4.21` `0.4.22` `0.4.25` `0.5.0` `0.5.3` `0.5.5` `0.5.8` `0.5.10` `0.5.12` `0.5.14` `0.6.0` `0.6.2` `0.6.5` `0.6.7` `0.6.8` `0.6.11` `0.7.0` `0.7.1` `0.7.4` `0.8.0` `0.8.4` `0.8.7` `0.8.8` `0.8.13` `0.8.18` `0.8.19` `0.8.22` +`0.4.11` `0.4.12` `0.4.14` `0.4.16` `0.4.21` `0.4.22` `0.4.25` `0.5.0` `0.5.3` `0.5.5` `0.5.8` `0.5.10` `0.5.12` `0.5.14` `0.6.0` `0.6.2` `0.6.5` `0.6.7` `0.6.8` `0.6.11` `0.7.0` `0.7.1` `0.7.4` `0.8.0` `0.8.4` `0.8.7` `0.8.8` `0.8.13` `0.8.18` `0.8.19` `0.8.22` `0.8.24` diff --git a/crates/solidity/testing/snapshots/cst_output/YulBlock/ignore_unknown_delim/generated/0.8.24-failure.yml b/crates/solidity/testing/snapshots/cst_output/YulBlock/ignore_unknown_delim/generated/0.8.24-failure.yml new file mode 100644 index 0000000000..78390cd586 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulBlock/ignore_unknown_delim/generated/0.8.24-failure.yml @@ -0,0 +1,81 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ { │ 0..1 + 2 │ function mult(a, b) -> result { │ 2..34 + 3 │ result := mul(a, b) │ 35..56 + 4 │ result := [mul(a, b) │ 57..79 + 5 │ } │ 80..82 + 6 │ } │ 83..84 + +Errors: # 1 total + - > + Error: Expected CloseBrace or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or OpenBrace or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or YulAddKeyword or YulAddModKeyword or YulAddressKeyword or YulAndKeyword or YulBalanceKeyword or YulBaseFeeKeyword or YulBlobBaseFeeKeyword or YulBlobHashKeyword or YulBlockHashKeyword or YulBreakKeyword or YulByteKeyword or YulCallCodeKeyword or YulCallDataCopyKeyword or YulCallDataLoadKeyword or YulCallDataSizeKeyword or YulCallKeyword or YulCallValueKeyword or YulCallerKeyword or YulChainIdKeyword or YulCoinBaseKeyword or YulContinueKeyword or YulCreate2Keyword or YulCreateKeyword or YulDecimalLiteral or YulDelegateCallKeyword or YulDivKeyword or YulEqKeyword or YulExpKeyword or YulExtCodeCopyKeyword or YulExtCodeHashKeyword or YulExtCodeSizeKeyword or YulFalseKeyword or YulForKeyword or YulFunctionKeyword or YulGasKeyword or YulGasLimitKeyword or YulGasPriceKeyword or YulGtKeyword or YulHexLiteral or YulIdentifier or YulIfKeyword or YulInvalidKeyword or YulIsZeroKeyword or YulKeccak256Keyword or YulLeaveKeyword or YulLetKeyword or YulLog0Keyword or YulLog1Keyword or YulLog2Keyword or YulLog3Keyword or YulLog4Keyword or YulLtKeyword or YulMCopyKeyword or YulMLoadKeyword or YulMSizeKeyword or YulMStore8Keyword or YulMStoreKeyword or YulModKeyword or YulMulKeyword or YulMulModKeyword or YulNotKeyword or YulNumberKeyword or YulOrKeyword or YulOriginKeyword or YulPopKeyword or YulPrevRandaoKeyword or YulReturnDataCopyKeyword or YulReturnDataSizeKeyword or YulReturnKeyword or YulRevertKeyword or YulSDivKeyword or YulSLoadKeyword or YulSModKeyword or YulSStoreKeyword or YulSarKeyword or YulSelfBalanceKeyword or YulSelfDestructKeyword or YulSgtKeyword or YulShlKeyword or YulShrKeyword or YulSignExtendKeyword or YulSltKeyword or YulStaticCallKeyword or YulStopKeyword or YulSubKeyword or YulSwitchKeyword or YulTLoadKeyword or YulTStoreKeyword or YulTimestampKeyword or YulTrueKeyword or YulXorKeyword. + ╭─[crates/solidity/testing/snapshots/cst_output/YulBlock/ignore_unknown_delim/input.sol:4:10] + │ + 4 │ ╭─▶ result := [mul(a, b) + 5 │ ├─▶ } + │ │ + │ ╰─────────── Error occurred here. + ───╯ + +Tree: + - (YulBlock): # "{\n\tfunction mult(a, b) -> result {\n\t\tresult := mul..." (0..85) + - (open_brace꞉ OpenBrace): "{" # (0..1) + - (trailing_trivia꞉ EndOfLine): "\n" # (1..2) + - (statements꞉ YulStatements): # "\tfunction mult(a, b) -> result {\n\t\tresult := mul(a..." (2..83) + - (item꞉ YulStatement) ► (variant꞉ YulFunctionDefinition): # "\tfunction mult(a, b) -> result {\n\t\tresult := mul(a..." (2..83) + - (leading_trivia꞉ Whitespace): "\t" # (2..3) + - (function_keyword꞉ YulFunctionKeyword): "function" # (3..11) + - (leading_trivia꞉ Whitespace): " " # (11..12) + - (name꞉ YulIdentifier): "mult" # (12..16) + - (parameters꞉ YulParametersDeclaration): # "(a, b)" (16..22) + - (open_paren꞉ OpenParen): "(" # (16..17) + - (parameters꞉ YulParameters): # "a, b" (17..21) + - (item꞉ YulIdentifier): "a" # (17..18) + - (separator꞉ Comma): "," # (18..19) + - (leading_trivia꞉ Whitespace): " " # (19..20) + - (item꞉ YulIdentifier): "b" # (20..21) + - (close_paren꞉ CloseParen): ")" # (21..22) + - (returns꞉ YulReturnsDeclaration): # " -> result" (22..32) + - (leading_trivia꞉ Whitespace): " " # (22..23) + - (minus_greater_than꞉ MinusGreaterThan): "->" # (23..25) + - (variables꞉ YulReturnVariables): # " result" (25..32) + - (leading_trivia꞉ Whitespace): " " # (25..26) + - (item꞉ YulIdentifier): "result" # (26..32) + - (body꞉ YulBlock): # " {\n\t\tresult := mul(a, b)\n\t\tresult := [mul(a, b)\n\t}..." (32..83) + - (leading_trivia꞉ Whitespace): " " # (32..33) + - (open_brace꞉ OpenBrace): "{" # (33..34) + - (trailing_trivia꞉ EndOfLine): "\n" # (34..35) + - (statements꞉ YulStatements): # "\t\tresult := mul(a, b)\n\t\tresult" (35..65) + - (item꞉ YulStatement) ► (variant꞉ YulAssignmentStatement): # "\t\tresult := mul(a, b)\n" (35..57) + - (names꞉ YulIdentifierPaths): # "\t\tresult" (35..43) + - (item꞉ YulIdentifierPath): # "\t\tresult" (35..43) + - (leading_trivia꞉ Whitespace): "\t\t" # (35..37) + - (item꞉ YulIdentifier): "result" # (37..43) + - (assignment꞉ YulAssignmentOperator): # " :=" (43..46) + - (leading_trivia꞉ Whitespace): " " # (43..44) + - (variant꞉ ColonEqual): ":=" # (44..46) + - (expression꞉ YulExpression) ► (variant꞉ YulFunctionCallExpression): # " mul(a, b)\n" (46..57) + - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction): # " mul" (46..50) + - (leading_trivia꞉ Whitespace): " " # (46..47) + - (variant꞉ YulMulKeyword): "mul" # (47..50) + - (open_paren꞉ OpenParen): "(" # (50..51) + - (arguments꞉ YulArguments): # "a, b" (51..55) + - (item꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "a" (51..52) + - (item꞉ YulIdentifier): "a" # (51..52) + - (separator꞉ Comma): "," # (52..53) + - (item꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # " b" (53..55) + - (leading_trivia꞉ Whitespace): " " # (53..54) + - (item꞉ YulIdentifier): "b" # (54..55) + - (close_paren꞉ CloseParen): ")" # (55..56) + - (trailing_trivia꞉ EndOfLine): "\n" # (56..57) + - (item꞉ YulStatement) ► (variant꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "\t\tresult" (57..65) + - (leading_trivia꞉ Whitespace): "\t\t" # (57..59) + - (item꞉ YulIdentifier): "result" # (59..65) + - (leading_trivia꞉ Whitespace): " " # (65..66) + - (SKIPPED): ":= [mul(a, b)\n\t" # (66..81) + - (close_brace꞉ CloseBrace): "}" # (81..82) + - (trailing_trivia꞉ EndOfLine): "\n" # (82..83) + - (close_brace꞉ CloseBrace): "}" # (83..84) + - (trailing_trivia꞉ EndOfLine): "\n" # (84..85) diff --git a/crates/solidity/testing/snapshots/cst_output/YulExpression/decimal_trailing_ident_start/generated/0.8.24-failure.yml b/crates/solidity/testing/snapshots/cst_output/YulExpression/decimal_trailing_ident_start/generated/0.8.24-failure.yml new file mode 100644 index 0000000000..fbc760d100 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulExpression/decimal_trailing_ident_start/generated/0.8.24-failure.yml @@ -0,0 +1,17 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ 1a │ 0..2 + +Errors: # 1 total + - > + Error: Expected DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or YulAddKeyword or YulAddModKeyword or YulAddressKeyword or YulAndKeyword or YulBalanceKeyword or YulBaseFeeKeyword or YulBlobBaseFeeKeyword or YulBlobHashKeyword or YulBlockHashKeyword or YulByteKeyword or YulCallCodeKeyword or YulCallDataCopyKeyword or YulCallDataLoadKeyword or YulCallDataSizeKeyword or YulCallKeyword or YulCallValueKeyword or YulCallerKeyword or YulChainIdKeyword or YulCoinBaseKeyword or YulCreate2Keyword or YulCreateKeyword or YulDecimalLiteral or YulDelegateCallKeyword or YulDivKeyword or YulEqKeyword or YulExpKeyword or YulExtCodeCopyKeyword or YulExtCodeHashKeyword or YulExtCodeSizeKeyword or YulFalseKeyword or YulGasKeyword or YulGasLimitKeyword or YulGasPriceKeyword or YulGtKeyword or YulHexLiteral or YulIdentifier or YulInvalidKeyword or YulIsZeroKeyword or YulKeccak256Keyword or YulLog0Keyword or YulLog1Keyword or YulLog2Keyword or YulLog3Keyword or YulLog4Keyword or YulLtKeyword or YulMCopyKeyword or YulMLoadKeyword or YulMSizeKeyword or YulMStore8Keyword or YulMStoreKeyword or YulModKeyword or YulMulKeyword or YulMulModKeyword or YulNotKeyword or YulNumberKeyword or YulOrKeyword or YulOriginKeyword or YulPopKeyword or YulPrevRandaoKeyword or YulReturnDataCopyKeyword or YulReturnDataSizeKeyword or YulReturnKeyword or YulRevertKeyword or YulSDivKeyword or YulSLoadKeyword or YulSModKeyword or YulSStoreKeyword or YulSarKeyword or YulSelfBalanceKeyword or YulSelfDestructKeyword or YulSgtKeyword or YulShlKeyword or YulShrKeyword or YulSignExtendKeyword or YulSltKeyword or YulStaticCallKeyword or YulStopKeyword or YulSubKeyword or YulTLoadKeyword or YulTStoreKeyword or YulTimestampKeyword or YulTrueKeyword or YulXorKeyword. + ╭─[crates/solidity/testing/snapshots/cst_output/YulExpression/decimal_trailing_ident_start/input.sol:1:1] + │ + 1 │ 1a + │ ─┬─ + │ ╰─── Error occurred here. + ───╯ + +Tree: + - (SKIPPED): "1a\n" # (0..3) diff --git a/crates/solidity/testing/snapshots/cst_output/YulExpression/hex_trailing_ident_start/generated/0.8.24-failure.yml b/crates/solidity/testing/snapshots/cst_output/YulExpression/hex_trailing_ident_start/generated/0.8.24-failure.yml new file mode 100644 index 0000000000..bf10d1e36b --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulExpression/hex_trailing_ident_start/generated/0.8.24-failure.yml @@ -0,0 +1,17 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ 0x1$ │ 0..4 + +Errors: # 1 total + - > + Error: Expected DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or YulAddKeyword or YulAddModKeyword or YulAddressKeyword or YulAndKeyword or YulBalanceKeyword or YulBaseFeeKeyword or YulBlobBaseFeeKeyword or YulBlobHashKeyword or YulBlockHashKeyword or YulByteKeyword or YulCallCodeKeyword or YulCallDataCopyKeyword or YulCallDataLoadKeyword or YulCallDataSizeKeyword or YulCallKeyword or YulCallValueKeyword or YulCallerKeyword or YulChainIdKeyword or YulCoinBaseKeyword or YulCreate2Keyword or YulCreateKeyword or YulDecimalLiteral or YulDelegateCallKeyword or YulDivKeyword or YulEqKeyword or YulExpKeyword or YulExtCodeCopyKeyword or YulExtCodeHashKeyword or YulExtCodeSizeKeyword or YulFalseKeyword or YulGasKeyword or YulGasLimitKeyword or YulGasPriceKeyword or YulGtKeyword or YulHexLiteral or YulIdentifier or YulInvalidKeyword or YulIsZeroKeyword or YulKeccak256Keyword or YulLog0Keyword or YulLog1Keyword or YulLog2Keyword or YulLog3Keyword or YulLog4Keyword or YulLtKeyword or YulMCopyKeyword or YulMLoadKeyword or YulMSizeKeyword or YulMStore8Keyword or YulMStoreKeyword or YulModKeyword or YulMulKeyword or YulMulModKeyword or YulNotKeyword or YulNumberKeyword or YulOrKeyword or YulOriginKeyword or YulPopKeyword or YulPrevRandaoKeyword or YulReturnDataCopyKeyword or YulReturnDataSizeKeyword or YulReturnKeyword or YulRevertKeyword or YulSDivKeyword or YulSLoadKeyword or YulSModKeyword or YulSStoreKeyword or YulSarKeyword or YulSelfBalanceKeyword or YulSelfDestructKeyword or YulSgtKeyword or YulShlKeyword or YulShrKeyword or YulSignExtendKeyword or YulSltKeyword or YulStaticCallKeyword or YulStopKeyword or YulSubKeyword or YulTLoadKeyword or YulTStoreKeyword or YulTimestampKeyword or YulTrueKeyword or YulXorKeyword. + ╭─[crates/solidity/testing/snapshots/cst_output/YulExpression/hex_trailing_ident_start/input.sol:1:1] + │ + 1 │ 0x1$ + │ ──┬── + │ ╰──── Error occurred here. + ───╯ + +Tree: + - (SKIPPED): "0x1$\n" # (0..5) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/generated/0.4.11-success.yml new file mode 100644 index 0000000000..1c666a7158 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/generated/0.4.11-success.yml @@ -0,0 +1,15 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ blobbasefee() │ 0..13 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "blobbasefee()\n" (0..14) + - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "blobbasefee" (0..11) + - (item꞉ YulIdentifier): "blobbasefee" # (0..11) + - (open_paren꞉ OpenParen): "(" # (11..12) + - (arguments꞉ YulArguments): [] # (12..12) + - (close_paren꞉ CloseParen): ")" # (12..13) + - (trailing_trivia꞉ EndOfLine): "\n" # (13..14) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/generated/0.8.24-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/generated/0.8.24-success.yml new file mode 100644 index 0000000000..ab27f2e544 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/generated/0.8.24-success.yml @@ -0,0 +1,14 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ blobbasefee() │ 0..13 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "blobbasefee()\n" (0..14) + - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulBlobBaseFeeKeyword): "blobbasefee" # (0..11) + - (open_paren꞉ OpenParen): "(" # (11..12) + - (arguments꞉ YulArguments): [] # (12..12) + - (close_paren꞉ CloseParen): ")" # (12..13) + - (trailing_trivia꞉ EndOfLine): "\n" # (13..14) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/input.sol b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/input.sol new file mode 100644 index 0000000000..7d0ec8d0cd --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobbasefee/input.sol @@ -0,0 +1 @@ +blobbasefee() diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/generated/0.4.11-success.yml new file mode 100644 index 0000000000..800a2871b9 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/generated/0.4.11-success.yml @@ -0,0 +1,15 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ blobhash() │ 0..10 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "blobhash()\n" (0..11) + - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "blobhash" (0..8) + - (item꞉ YulIdentifier): "blobhash" # (0..8) + - (open_paren꞉ OpenParen): "(" # (8..9) + - (arguments꞉ YulArguments): [] # (9..9) + - (close_paren꞉ CloseParen): ")" # (9..10) + - (trailing_trivia꞉ EndOfLine): "\n" # (10..11) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/generated/0.8.24-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/generated/0.8.24-success.yml new file mode 100644 index 0000000000..2aca33bb45 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/generated/0.8.24-success.yml @@ -0,0 +1,14 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ blobhash() │ 0..10 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "blobhash()\n" (0..11) + - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulBlobHashKeyword): "blobhash" # (0..8) + - (open_paren꞉ OpenParen): "(" # (8..9) + - (arguments꞉ YulArguments): [] # (9..9) + - (close_paren꞉ CloseParen): ")" # (9..10) + - (trailing_trivia꞉ EndOfLine): "\n" # (10..11) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/input.sol b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/input.sol new file mode 100644 index 0000000000..83e080ebe9 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blobhash/input.sol @@ -0,0 +1 @@ +blobhash() diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/generated/0.8.24-failure.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/generated/0.8.24-failure.yml new file mode 100644 index 0000000000..9c55fa897c --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/generated/0.8.24-failure.yml @@ -0,0 +1,17 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ difficulty() │ 0..12 + +Errors: # 1 total + - > + Error: Expected DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or YulAddKeyword or YulAddModKeyword or YulAddressKeyword or YulAndKeyword or YulBalanceKeyword or YulBaseFeeKeyword or YulBlobBaseFeeKeyword or YulBlobHashKeyword or YulBlockHashKeyword or YulByteKeyword or YulCallCodeKeyword or YulCallDataCopyKeyword or YulCallDataLoadKeyword or YulCallDataSizeKeyword or YulCallKeyword or YulCallValueKeyword or YulCallerKeyword or YulChainIdKeyword or YulCoinBaseKeyword or YulCreate2Keyword or YulCreateKeyword or YulDecimalLiteral or YulDelegateCallKeyword or YulDivKeyword or YulEqKeyword or YulExpKeyword or YulExtCodeCopyKeyword or YulExtCodeHashKeyword or YulExtCodeSizeKeyword or YulFalseKeyword or YulGasKeyword or YulGasLimitKeyword or YulGasPriceKeyword or YulGtKeyword or YulHexLiteral or YulIdentifier or YulInvalidKeyword or YulIsZeroKeyword or YulKeccak256Keyword or YulLog0Keyword or YulLog1Keyword or YulLog2Keyword or YulLog3Keyword or YulLog4Keyword or YulLtKeyword or YulMCopyKeyword or YulMLoadKeyword or YulMSizeKeyword or YulMStore8Keyword or YulMStoreKeyword or YulModKeyword or YulMulKeyword or YulMulModKeyword or YulNotKeyword or YulNumberKeyword or YulOrKeyword or YulOriginKeyword or YulPopKeyword or YulPrevRandaoKeyword or YulReturnDataCopyKeyword or YulReturnDataSizeKeyword or YulReturnKeyword or YulRevertKeyword or YulSDivKeyword or YulSLoadKeyword or YulSModKeyword or YulSStoreKeyword or YulSarKeyword or YulSelfBalanceKeyword or YulSelfDestructKeyword or YulSgtKeyword or YulShlKeyword or YulShrKeyword or YulSignExtendKeyword or YulSltKeyword or YulStaticCallKeyword or YulStopKeyword or YulSubKeyword or YulTLoadKeyword or YulTStoreKeyword or YulTimestampKeyword or YulTrueKeyword or YulXorKeyword. + ╭─[crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/input.sol:1:1] + │ + 1 │ difficulty() + │ ──────┬────── + │ ╰──────── Error occurred here. + ───╯ + +Tree: + - (SKIPPED): "difficulty()\n" # (0..13) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/generated/0.4.11-success.yml new file mode 100644 index 0000000000..32102801b5 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/generated/0.4.11-success.yml @@ -0,0 +1,15 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ mcopy() │ 0..7 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "mcopy()\n" (0..8) + - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "mcopy" (0..5) + - (item꞉ YulIdentifier): "mcopy" # (0..5) + - (open_paren꞉ OpenParen): "(" # (5..6) + - (arguments꞉ YulArguments): [] # (6..6) + - (close_paren꞉ CloseParen): ")" # (6..7) + - (trailing_trivia꞉ EndOfLine): "\n" # (7..8) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/generated/0.8.24-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/generated/0.8.24-success.yml new file mode 100644 index 0000000000..5b87beb369 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/generated/0.8.24-success.yml @@ -0,0 +1,14 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ mcopy() │ 0..7 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "mcopy()\n" (0..8) + - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulMCopyKeyword): "mcopy" # (0..5) + - (open_paren꞉ OpenParen): "(" # (5..6) + - (arguments꞉ YulArguments): [] # (6..6) + - (close_paren꞉ CloseParen): ")" # (6..7) + - (trailing_trivia꞉ EndOfLine): "\n" # (7..8) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/input.sol b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/input.sol new file mode 100644 index 0000000000..d4e7ab6956 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mcopy/input.sol @@ -0,0 +1 @@ +mcopy() diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/generated/0.4.11-success.yml new file mode 100644 index 0000000000..ea083c3e89 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/generated/0.4.11-success.yml @@ -0,0 +1,15 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ tstore() │ 0..8 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "tstore()\n" (0..9) + - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "tstore" (0..6) + - (item꞉ YulIdentifier): "tstore" # (0..6) + - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) + - (close_paren꞉ CloseParen): ")" # (7..8) + - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/generated/0.8.24-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/generated/0.8.24-success.yml new file mode 100644 index 0000000000..f26ef0a625 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/generated/0.8.24-success.yml @@ -0,0 +1,14 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ tstore() │ 0..8 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "tstore()\n" (0..9) + - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulTStoreKeyword): "tstore" # (0..6) + - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) + - (close_paren꞉ CloseParen): ")" # (7..8) + - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/input.sol b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/input.sol new file mode 100644 index 0000000000..cb8fdc907f --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tload/input.sol @@ -0,0 +1 @@ +tstore() diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/generated/0.4.11-success.yml new file mode 100644 index 0000000000..66ff484170 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/generated/0.4.11-success.yml @@ -0,0 +1,15 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ tload() │ 0..7 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "tload()\n" (0..8) + - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "tload" (0..5) + - (item꞉ YulIdentifier): "tload" # (0..5) + - (open_paren꞉ OpenParen): "(" # (5..6) + - (arguments꞉ YulArguments): [] # (6..6) + - (close_paren꞉ CloseParen): ")" # (6..7) + - (trailing_trivia꞉ EndOfLine): "\n" # (7..8) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/generated/0.8.24-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/generated/0.8.24-success.yml new file mode 100644 index 0000000000..d4f0027840 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/generated/0.8.24-success.yml @@ -0,0 +1,14 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ tload() │ 0..7 + +Errors: [] + +Tree: + - (YulFunctionCallExpression): # "tload()\n" (0..8) + - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulTLoadKeyword): "tload" # (0..5) + - (open_paren꞉ OpenParen): "(" # (5..6) + - (arguments꞉ YulArguments): [] # (6..6) + - (close_paren꞉ CloseParen): ")" # (6..7) + - (trailing_trivia꞉ EndOfLine): "\n" # (7..8) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/input.sol b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/input.sol new file mode 100644 index 0000000000..c17794e6a4 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_tstore/input.sol @@ -0,0 +1 @@ +tload()