diff --git a/crates/solidity/inputs/language/definition/06-yul/01-assembly-block/productions.yml b/crates/solidity/inputs/language/definition/06-yul/01-assembly-block/productions.yml index 09a052598e..14897679cb 100644 --- a/crates/solidity/inputs/language/definition/06-yul/01-assembly-block/productions.yml +++ b/crates/solidity/inputs/language/definition/06-yul/01-assembly-block/productions.yml @@ -8,15 +8,20 @@ - optional: reference: "AsciiStringLiteral" # label: "evmasm" - optional: - delimitedBy: - open: - reference: "OpenParen" - parser: - reference: "AssemblyFlagsList" - close: - reference: "CloseParen" + reference: "AssemblyFlagsDeclaration" - reference: "YulBlock" +- name: "AssemblyFlagsDeclaration" + kind: "Parser" + unversioned: + delimitedBy: + open: + reference: "OpenParen" + parser: + reference: "AssemblyFlagsList" + close: + reference: "CloseParen" + - name: "AssemblyFlagsList" kind: "Parser" unversioned: diff --git a/crates/solidity/inputs/language/src/dsl.rs b/crates/solidity/inputs/language/src/dsl.rs index e45af90f8d..3f2b790d69 100644 --- a/crates/solidity/inputs/language/src/dsl.rs +++ b/crates/solidity/inputs/language/src/dsl.rs @@ -185,7 +185,9 @@ slang_grammar! { parser AssemblyFlagsList = (AsciiStringLiteral separated by Comma) ; - parser AssemblyStatement = (AssemblyKeyword (AsciiStringLiteral ?) ((AssemblyFlagsList delimited by OpenParen and CloseParen) ?) YulBlock) ; + parser AssemblyStatement = (AssemblyKeyword (AsciiStringLiteral ?) (AssemblyFlagsDeclaration ?) YulBlock) ; + + parser AssemblyFlagsDeclaration = (AssemblyFlagsList delimited by OpenParen and CloseParen) ; inline parser AssignmentOperator = ( Equal | BarEqual | PlusEqual | MinusEqual | CaretEqual | SlashEqual | PercentEqual | AsteriskEqual | AmpersandEqual | diff --git a/crates/solidity/outputs/cargo/crate/src/generated/kinds.rs b/crates/solidity/outputs/cargo/crate/src/generated/kinds.rs index 6843dbdf28..407d67aeea 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/kinds.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/kinds.rs @@ -23,6 +23,7 @@ pub enum ProductionKind { ArrayExpression, ArrayValuesList, AsciiStringLiteralsList, + AssemblyFlagsDeclaration, AssemblyFlagsList, AssemblyStatement, Block, @@ -182,6 +183,7 @@ pub enum RuleKind { ArrayTypeName, ArrayValuesList, AsciiStringLiteralsList, + AssemblyFlagsDeclaration, AssemblyFlagsList, AssemblyStatement, BinaryExpression, diff --git a/crates/solidity/outputs/cargo/crate/src/generated/language.rs b/crates/solidity/outputs/cargo/crate/src/generated/language.rs index a1704a847c..b5ab5fe679 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/language.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/language.rs @@ -300,6 +300,33 @@ impl Language { .with_kind(RuleKind::AsciiStringLiteralsList) } + #[allow(unused_assignments, unused_parens)] + fn assembly_flags_declaration(&self, input: &mut ParserContext) -> ParserResult { + SequenceHelper::run(|mut seq| { + let mut delim_guard = input.open_delim(TokenKind::CloseParen); + let input = delim_guard.ctx(); + seq.elem(self.parse_token_with_trivia::( + input, + TokenKind::OpenParen, + ))?; + seq.elem( + self.assembly_flags_list(input) + .recover_until_with_nested_delims::<_, LexicalContextType::Default>( + input, + self, + TokenKind::CloseParen, + RecoverFromNoMatch::Yes, + ), + )?; + seq.elem(self.parse_token_with_trivia::( + input, + TokenKind::CloseParen, + ))?; + seq.finish() + }) + .with_kind(RuleKind::AssemblyFlagsDeclaration) + } + #[allow(unused_assignments, unused_parens)] fn assembly_flags_list(&self, input: &mut ParserContext) -> ParserResult { SeparatedHelper::run::<_, LexicalContextType::Default>( @@ -329,28 +356,9 @@ impl Language { TokenKind::AsciiStringLiteral, ), ))?; - seq.elem(OptionalHelper::transform(SequenceHelper::run(|mut seq| { - let mut delim_guard = input.open_delim(TokenKind::CloseParen); - let input = delim_guard.ctx(); - seq.elem(self.parse_token_with_trivia::( - input, - TokenKind::OpenParen, - ))?; - seq.elem( - self.assembly_flags_list(input) - .recover_until_with_nested_delims::<_, LexicalContextType::Default>( - input, - self, - TokenKind::CloseParen, - RecoverFromNoMatch::Yes, - ), - )?; - seq.elem(self.parse_token_with_trivia::( - input, - TokenKind::CloseParen, - ))?; - seq.finish() - })))?; + seq.elem(OptionalHelper::transform( + self.assembly_flags_declaration(input), + ))?; seq.elem(self.yul_block(input))?; seq.finish() }) @@ -5679,6 +5687,9 @@ impl Language { ProductionKind::AsciiStringLiteralsList => { Self::ascii_string_literals_list.parse(self, input) } + ProductionKind::AssemblyFlagsDeclaration => { + Self::assembly_flags_declaration.parse(self, input) + } ProductionKind::AssemblyFlagsList => Self::assembly_flags_list.parse(self, input), ProductionKind::AssemblyStatement => Self::assembly_statement.parse(self, input), ProductionKind::Block => Self::block.parse(self, input), diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/AssemblyStatement.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/AssemblyStatement.rs new file mode 100644 index 0000000000..570479caf8 --- /dev/null +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/AssemblyStatement.rs @@ -0,0 +1,9 @@ +// This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +use crate::cst_output::runner::run; +use anyhow::Result; + +#[test] +fn simple() -> Result<()> { + return run("AssemblyStatement", "simple"); +} 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 67e75af389..74b616e501 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 @@ -4,6 +4,8 @@ use semver::Version; #[allow(non_snake_case)] mod AsciiStringLiteralsList; #[allow(non_snake_case)] +mod AssemblyStatement; +#[allow(non_snake_case)] mod Block; #[allow(non_snake_case)] mod BreakStatement; diff --git a/crates/solidity/outputs/npm/crate/src/generated/kinds.rs b/crates/solidity/outputs/npm/crate/src/generated/kinds.rs index 6843dbdf28..407d67aeea 100644 --- a/crates/solidity/outputs/npm/crate/src/generated/kinds.rs +++ b/crates/solidity/outputs/npm/crate/src/generated/kinds.rs @@ -23,6 +23,7 @@ pub enum ProductionKind { ArrayExpression, ArrayValuesList, AsciiStringLiteralsList, + AssemblyFlagsDeclaration, AssemblyFlagsList, AssemblyStatement, Block, @@ -182,6 +183,7 @@ pub enum RuleKind { ArrayTypeName, ArrayValuesList, AsciiStringLiteralsList, + AssemblyFlagsDeclaration, AssemblyFlagsList, AssemblyStatement, BinaryExpression, diff --git a/crates/solidity/outputs/npm/crate/src/generated/language.rs b/crates/solidity/outputs/npm/crate/src/generated/language.rs index a1704a847c..b5ab5fe679 100644 --- a/crates/solidity/outputs/npm/crate/src/generated/language.rs +++ b/crates/solidity/outputs/npm/crate/src/generated/language.rs @@ -300,6 +300,33 @@ impl Language { .with_kind(RuleKind::AsciiStringLiteralsList) } + #[allow(unused_assignments, unused_parens)] + fn assembly_flags_declaration(&self, input: &mut ParserContext) -> ParserResult { + SequenceHelper::run(|mut seq| { + let mut delim_guard = input.open_delim(TokenKind::CloseParen); + let input = delim_guard.ctx(); + seq.elem(self.parse_token_with_trivia::( + input, + TokenKind::OpenParen, + ))?; + seq.elem( + self.assembly_flags_list(input) + .recover_until_with_nested_delims::<_, LexicalContextType::Default>( + input, + self, + TokenKind::CloseParen, + RecoverFromNoMatch::Yes, + ), + )?; + seq.elem(self.parse_token_with_trivia::( + input, + TokenKind::CloseParen, + ))?; + seq.finish() + }) + .with_kind(RuleKind::AssemblyFlagsDeclaration) + } + #[allow(unused_assignments, unused_parens)] fn assembly_flags_list(&self, input: &mut ParserContext) -> ParserResult { SeparatedHelper::run::<_, LexicalContextType::Default>( @@ -329,28 +356,9 @@ impl Language { TokenKind::AsciiStringLiteral, ), ))?; - seq.elem(OptionalHelper::transform(SequenceHelper::run(|mut seq| { - let mut delim_guard = input.open_delim(TokenKind::CloseParen); - let input = delim_guard.ctx(); - seq.elem(self.parse_token_with_trivia::( - input, - TokenKind::OpenParen, - ))?; - seq.elem( - self.assembly_flags_list(input) - .recover_until_with_nested_delims::<_, LexicalContextType::Default>( - input, - self, - TokenKind::CloseParen, - RecoverFromNoMatch::Yes, - ), - )?; - seq.elem(self.parse_token_with_trivia::( - input, - TokenKind::CloseParen, - ))?; - seq.finish() - })))?; + seq.elem(OptionalHelper::transform( + self.assembly_flags_declaration(input), + ))?; seq.elem(self.yul_block(input))?; seq.finish() }) @@ -5679,6 +5687,9 @@ impl Language { ProductionKind::AsciiStringLiteralsList => { Self::ascii_string_literals_list.parse(self, input) } + ProductionKind::AssemblyFlagsDeclaration => { + Self::assembly_flags_declaration.parse(self, input) + } ProductionKind::AssemblyFlagsList => Self::assembly_flags_list.parse(self, input), ProductionKind::AssemblyStatement => Self::assembly_statement.parse(self, input), ProductionKind::Block => Self::block.parse(self, input), 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 429674de4a..0cbf89bf5e 100644 --- a/crates/solidity/outputs/npm/package/src/generated/index.d.ts +++ b/crates/solidity/outputs/npm/package/src/generated/index.d.ts @@ -18,6 +18,7 @@ export namespace kinds { ArrayExpression = "ArrayExpression", ArrayValuesList = "ArrayValuesList", AsciiStringLiteralsList = "AsciiStringLiteralsList", + AssemblyFlagsDeclaration = "AssemblyFlagsDeclaration", AssemblyFlagsList = "AssemblyFlagsList", AssemblyStatement = "AssemblyStatement", Block = "Block", @@ -163,6 +164,7 @@ export namespace kinds { ArrayTypeName = "ArrayTypeName", ArrayValuesList = "ArrayValuesList", AsciiStringLiteralsList = "AsciiStringLiteralsList", + AssemblyFlagsDeclaration = "AssemblyFlagsDeclaration", AssemblyFlagsList = "AssemblyFlagsList", AssemblyStatement = "AssemblyStatement", BinaryExpression = "BinaryExpression", diff --git a/crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md b/crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md new file mode 100644 index 0000000000..de99be49a9 --- /dev/null +++ b/crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md @@ -0,0 +1,5 @@ + + +```{ .ebnf .slang-ebnf #AssemblyFlagsDeclaration } +AssemblyFlagsDeclaration = OPEN_PAREN AssemblyFlagsList CLOSE_PAREN; +``` diff --git a/crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md b/crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md index 69082646bb..e1116f6aa2 100644 --- a/crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md +++ b/crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md @@ -1,5 +1,5 @@ ```{ .ebnf .slang-ebnf #AssemblyStatement } -AssemblyStatement = ASSEMBLY_KEYWORD ASCII_STRING_LITERAL? (OPEN_PAREN AssemblyFlagsList CLOSE_PAREN)? YulBlock; +AssemblyStatement = ASSEMBLY_KEYWORD ASCII_STRING_LITERAL? AssemblyFlagsDeclaration? YulBlock; ``` diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.11/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.11/index.md index beb1ed7aea..8b4438ed52 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.11/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.11/index.md @@ -383,6 +383,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.21/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.21/index.md index 119fefc981..241595cea0 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.21/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.21/index.md @@ -385,6 +385,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.22/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.22/index.md index 83e8b902f4..e49026840a 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.22/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.22/index.md @@ -389,6 +389,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.5.0/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.5.0/index.md index 955db0470e..d992fb3670 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.5.0/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.5.0/index.md @@ -384,6 +384,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.5.3/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.5.3/index.md index 0e3be33b8e..7ad073d643 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.5.3/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.5.3/index.md @@ -386,6 +386,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.0/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.0/index.md index 1cdffe4673..bf59df9831 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.0/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.0/index.md @@ -401,6 +401,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.11/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.11/index.md index ed9f16a68c..72553b031a 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.11/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.11/index.md @@ -404,6 +404,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.2/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.2/index.md index 95df96c231..ce322bc9d2 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.2/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.2/index.md @@ -402,6 +402,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.5/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.5/index.md index 0be36c6f02..19c2a166a3 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.5/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.5/index.md @@ -403,6 +403,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.0/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.0/index.md index bde2d761ed..a7837a750f 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.0/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.0/index.md @@ -406,6 +406,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.1/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.1/index.md index 5ec812b5e8..47c602f270 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.1/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.1/index.md @@ -406,6 +406,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.4/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.4/index.md index 8593b87ce6..0f6beaade4 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.4/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.4/index.md @@ -410,6 +410,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.0/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.0/index.md index 80470f9dea..faa76ddf35 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.0/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.0/index.md @@ -411,6 +411,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.13/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.13/index.md index c568e3ae13..8e78d6c022 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.13/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.13/index.md @@ -429,6 +429,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.18/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.18/index.md index 7530b9dec6..ec48238014 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.18/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.18/index.md @@ -429,6 +429,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.19/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.19/index.md index f18015e352..454fa972d6 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.19/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.19/index.md @@ -430,6 +430,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.22/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.22/index.md index 3327449db6..6db1521640 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.22/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.22/index.md @@ -430,6 +430,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.4/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.4/index.md index 5630d75954..3026fb4682 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.4/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.4/index.md @@ -421,6 +421,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.8/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.8/index.md index bf734ec285..e543651f3d 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.8/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.8/index.md @@ -425,6 +425,7 @@ ### 6.1. Assembly Block --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-statement/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-declaration/unversioned.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/06-yul/01-assembly-block/assembly-flags-list/unversioned.md" ### 6.2. Yul Statements diff --git a/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/generated/0.4.11-success.yml new file mode 100644 index 0000000000..1b49cd80eb --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/generated/0.4.11-success.yml @@ -0,0 +1,21 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ assembly "evmasm" ("memory-safe") { │ 0..35 + 2 │ │ 36..36 + 3 │ } │ 37..38 + +Errors: [] + +Tree: + - AssemblyStatement (Rule): # 0..39 'assembly "evmasm" ("memory-safe") {\n\n}\n' + - AssemblyKeyword (Token): "assembly" # 0..8 + - AsciiStringLiteral (Token): '"evmasm"' # 9..17 + - AssemblyFlagsDeclaration (Rule): # 17..33 ' ("memory-safe")' + - OpenParen (Token): "(" # 18..19 + - AssemblyFlagsList (Rule): # 19..32 '"memory-safe"' + - AsciiStringLiteral (Token): '"memory-safe"' # 19..32 + - CloseParen (Token): ")" # 32..33 + - YulBlock (Rule): # 33..39 " {\n\n}\n" + - OpenBrace (Token): "{" # 34..35 + - CloseBrace (Token): "}" # 37..38 diff --git a/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/input.sol b/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/input.sol new file mode 100644 index 0000000000..4515161fe4 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/input.sol @@ -0,0 +1,3 @@ +assembly "evmasm" ("memory-safe") { + +}