diff --git a/crates/solidity/inputs/language/src/definition.rs b/crates/solidity/inputs/language/src/definition.rs index 1d2386d9a2..a0f7640ed1 100644 --- a/crates/solidity/inputs/language/src/definition.rs +++ b/crates/solidity/inputs/language/src/definition.rs @@ -62,17 +62,17 @@ codegen_language_macros::compile!(Language( reference = FunctionDefinition, enabled = From("0.7.1") ), - EnumVariant( - reference = ConstantDefinition, - enabled = From("0.7.4") - ), EnumVariant(reference = ErrorDefinition, enabled = From("0.8.4")), EnumVariant( reference = UserDefinedValueTypeDefinition, enabled = From("0.8.8") ), EnumVariant(reference = UsingDirective, enabled = From("0.8.13")), - EnumVariant(reference = EventDefinition, enabled = From("0.8.22")) + EnumVariant(reference = EventDefinition, enabled = From("0.8.22")), + EnumVariant( + reference = ConstantDefinition, + enabled = From("0.7.4") + ) ] ) ] @@ -2142,12 +2142,12 @@ codegen_language_macros::compile!(Language( EnumVariant(reference = StructDefinition), EnumVariant(reference = EnumDefinition), EnumVariant(reference = EventDefinition), - EnumVariant(reference = StateVariableDefinition), EnumVariant(reference = ErrorDefinition, enabled = From("0.8.4")), EnumVariant( reference = UserDefinedValueTypeDefinition, enabled = From("0.8.8") - ) + ), + EnumVariant(reference = StateVariableDefinition) ] ) ] @@ -2835,11 +2835,6 @@ codegen_language_macros::compile!(Language( Enum( name = Statement, variants = [ - // Simple statements - EnumVariant(reference = ExpressionStatement), - EnumVariant(reference = VariableDeclarationStatement), - EnumVariant(reference = TupleDeconstructionStatement), - // Control statements EnumVariant(reference = IfStatement), EnumVariant(reference = ForStatement), EnumVariant(reference = WhileStatement), @@ -2853,7 +2848,10 @@ codegen_language_macros::compile!(Language( EnumVariant(reference = RevertStatement, enabled = From("0.8.4")), EnumVariant(reference = AssemblyStatement), EnumVariant(reference = Block), - EnumVariant(reference = UncheckedBlock, enabled = From("0.8.0")) + EnumVariant(reference = UncheckedBlock, enabled = From("0.8.0")), + EnumVariant(reference = TupleDeconstructionStatement), + EnumVariant(reference = VariableDeclarationStatement), + EnumVariant(reference = ExpressionStatement) ] ), Struct( @@ -3028,9 +3026,9 @@ codegen_language_macros::compile!(Language( Enum( name = ForStatementInitialization, variants = [ - EnumVariant(reference = ExpressionStatement), - EnumVariant(reference = VariableDeclarationStatement), EnumVariant(reference = TupleDeconstructionStatement), + EnumVariant(reference = VariableDeclarationStatement), + EnumVariant(reference = ExpressionStatement), EnumVariant(reference = Semicolon) ] ), @@ -4163,8 +4161,6 @@ codegen_language_macros::compile!(Language( variants = [ EnumVariant(reference = YulBlock), EnumVariant(reference = YulFunctionDefinition), - EnumVariant(reference = YulVariableDeclarationStatement), - EnumVariant(reference = YulVariableAssignmentStatement), EnumVariant( reference = YulStackAssignmentStatement, enabled = Till("0.5.0") @@ -4176,6 +4172,8 @@ codegen_language_macros::compile!(Language( EnumVariant(reference = YulBreakStatement), EnumVariant(reference = YulContinueStatement), EnumVariant(reference = YulLabel, enabled = Till("0.5.0")), + EnumVariant(reference = YulVariableDeclarationStatement), + EnumVariant(reference = YulVariableAssignmentStatement), EnumVariant(reference = YulExpression) ] ), @@ -4245,8 +4243,8 @@ codegen_language_macros::compile!(Language( Enum( name = YulAssignmentOperator, variants = [ - EnumVariant(reference = YulColonAndEqual, enabled = Till("0.5.5")), - EnumVariant(reference = ColonEqual) + EnumVariant(reference = ColonEqual), + EnumVariant(reference = YulColonAndEqual, enabled = Till("0.5.5")) ] ), Struct( @@ -4266,8 +4264,8 @@ codegen_language_macros::compile!(Language( name = YulStackAssignmentOperator, enabled = Till("0.5.0"), variants = [ - EnumVariant(reference = YulEqualAndColon), - EnumVariant(reference = EqualColon) + EnumVariant(reference = EqualColon), + EnumVariant(reference = YulEqualAndColon) ] ), Struct( diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/language/generated/mod.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/language/generated/mod.rs index a9d45e2ed1..beeb529acb 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/language/generated/mod.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/language/generated/mod.rs @@ -1023,8 +1023,6 @@ impl Language { choice.consider(input, result)?; let result = self.event_definition(input); choice.consider(input, result)?; - let result = self.state_variable_definition(input); - choice.consider(input, result)?; if self.version_is_at_least_0_8_4 { let result = self.error_definition(input); choice.consider(input, result)?; @@ -1033,6 +1031,8 @@ impl Language { let result = self.user_defined_value_type_definition(input); choice.consider(input, result)?; } + let result = self.state_variable_definition(input); + choice.consider(input, result)?; choice.finish(input) }) .with_label(EdgeLabel::Variant) @@ -2535,11 +2535,11 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn for_statement_initialization(&self, input: &mut ParserContext<'_>) -> ParserResult { ChoiceHelper::run(input, |mut choice, input| { - let result = self.expression_statement(input); + let result = self.tuple_deconstruction_statement(input); choice.consider(input, result)?; let result = self.variable_declaration_statement(input); choice.consider(input, result)?; - let result = self.tuple_deconstruction_statement(input); + let result = self.expression_statement(input); choice.consider(input, result)?; let result = self.parse_terminal_with_trivia::( input, @@ -4252,10 +4252,6 @@ impl Language { let result = self.function_definition(input); choice.consider(input, result)?; } - if self.version_is_at_least_0_7_4 { - let result = self.constant_definition(input); - choice.consider(input, result)?; - } if self.version_is_at_least_0_8_4 { let result = self.error_definition(input); choice.consider(input, result)?; @@ -4272,6 +4268,10 @@ impl Language { let result = self.event_definition(input); choice.consider(input, result)?; } + if self.version_is_at_least_0_7_4 { + let result = self.constant_definition(input); + choice.consider(input, result)?; + } choice.finish(input) }) .with_label(EdgeLabel::Variant) @@ -4393,12 +4393,6 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn statement(&self, input: &mut ParserContext<'_>) -> ParserResult { ChoiceHelper::run(input, |mut choice, input| { - let result = self.expression_statement(input); - choice.consider(input, result)?; - let result = self.variable_declaration_statement(input); - choice.consider(input, result)?; - let result = self.tuple_deconstruction_statement(input); - choice.consider(input, result)?; let result = self.if_statement(input); choice.consider(input, result)?; let result = self.for_statement(input); @@ -4437,6 +4431,12 @@ impl Language { let result = self.unchecked_block(input); choice.consider(input, result)?; } + let result = self.tuple_deconstruction_statement(input); + choice.consider(input, result)?; + let result = self.variable_declaration_statement(input); + choice.consider(input, result)?; + let result = self.expression_statement(input); + choice.consider(input, result)?; choice.finish(input) }) .with_label(EdgeLabel::Variant) @@ -5863,15 +5863,15 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn yul_assignment_operator(&self, input: &mut ParserContext<'_>) -> ParserResult { ChoiceHelper::run(input, |mut choice, input| { - if !self.version_is_at_least_0_5_5 { - let result = self.yul_colon_and_equal(input); - choice.consider(input, result)?; - } let result = self.parse_terminal_with_trivia::( input, TerminalKind::ColonEqual, ); choice.consider(input, result)?; + if !self.version_is_at_least_0_5_5 { + let result = self.yul_colon_and_equal(input); + choice.consider(input, result)?; + } choice.finish(input) }) .with_label(EdgeLabel::Variant) @@ -6796,13 +6796,13 @@ impl Language { fn yul_stack_assignment_operator(&self, input: &mut ParserContext<'_>) -> ParserResult { if !self.version_is_at_least_0_5_0 { ChoiceHelper::run(input, |mut choice, input| { - let result = self.yul_equal_and_colon(input); - choice.consider(input, result)?; let result = self.parse_terminal_with_trivia::( input, TerminalKind::EqualColon, ); choice.consider(input, result)?; + let result = self.yul_equal_and_colon(input); + choice.consider(input, result)?; choice.finish(input) }) .with_label(EdgeLabel::Variant) @@ -6842,10 +6842,6 @@ impl Language { choice.consider(input, result)?; let result = self.yul_function_definition(input); choice.consider(input, result)?; - let result = self.yul_variable_declaration_statement(input); - choice.consider(input, result)?; - let result = self.yul_variable_assignment_statement(input); - choice.consider(input, result)?; if !self.version_is_at_least_0_5_0 { let result = self.yul_stack_assignment_statement(input); choice.consider(input, result)?; @@ -6868,6 +6864,10 @@ impl Language { let result = self.yul_label(input); choice.consider(input, result)?; } + let result = self.yul_variable_declaration_statement(input); + choice.consider(input, result)?; + let result = self.yul_variable_assignment_statement(input); + choice.consider(input, result)?; let result = self.yul_expression(input); choice.consider(input, result)?; choice.finish(input) diff --git a/crates/solidity/outputs/npm/package/src/generated/ast/generated/ast_types.ts b/crates/solidity/outputs/npm/package/src/generated/ast/generated/ast_types.ts index d63728090b..62a42817a6 100644 --- a/crates/solidity/outputs/npm/package/src/generated/ast/generated/ast_types.ts +++ b/crates/solidity/outputs/npm/package/src/generated/ast/generated/ast_types.ts @@ -3769,11 +3769,11 @@ export class SourceUnitMember { | StructDefinition | EnumDefinition | FunctionDefinition - | ConstantDefinition | ErrorDefinition | UserDefinedValueTypeDefinition | UsingDirective - | EventDefinition = once(() => { + | EventDefinition + | ConstantDefinition = once(() => { const variant = ast_internal.selectChoice(this.cst); switch (variant.kind) { @@ -3793,8 +3793,6 @@ export class SourceUnitMember { return new EnumDefinition(variant as NonterminalNode); case NonterminalKind.FunctionDefinition: return new FunctionDefinition(variant as NonterminalNode); - case NonterminalKind.ConstantDefinition: - return new ConstantDefinition(variant as NonterminalNode); case NonterminalKind.ErrorDefinition: return new ErrorDefinition(variant as NonterminalNode); case NonterminalKind.UserDefinedValueTypeDefinition: @@ -3803,6 +3801,8 @@ export class SourceUnitMember { return new UsingDirective(variant as NonterminalNode); case NonterminalKind.EventDefinition: return new EventDefinition(variant as NonterminalNode); + case NonterminalKind.ConstantDefinition: + return new ConstantDefinition(variant as NonterminalNode); default: assert.fail(`Unexpected variant: ${variant.kind}`); @@ -3822,11 +3822,11 @@ export class SourceUnitMember { | StructDefinition | EnumDefinition | FunctionDefinition - | ConstantDefinition | ErrorDefinition | UserDefinedValueTypeDefinition | UsingDirective - | EventDefinition { + | EventDefinition + | ConstantDefinition { return this.fetch(); } } @@ -4017,9 +4017,9 @@ export class ContractMember { | StructDefinition | EnumDefinition | EventDefinition - | StateVariableDefinition | ErrorDefinition - | UserDefinedValueTypeDefinition = once(() => { + | UserDefinedValueTypeDefinition + | StateVariableDefinition = once(() => { const variant = ast_internal.selectChoice(this.cst); switch (variant.kind) { @@ -4043,12 +4043,12 @@ export class ContractMember { return new EnumDefinition(variant as NonterminalNode); case NonterminalKind.EventDefinition: return new EventDefinition(variant as NonterminalNode); - case NonterminalKind.StateVariableDefinition: - return new StateVariableDefinition(variant as NonterminalNode); case NonterminalKind.ErrorDefinition: return new ErrorDefinition(variant as NonterminalNode); case NonterminalKind.UserDefinedValueTypeDefinition: return new UserDefinedValueTypeDefinition(variant as NonterminalNode); + case NonterminalKind.StateVariableDefinition: + return new StateVariableDefinition(variant as NonterminalNode); default: assert.fail(`Unexpected variant: ${variant.kind}`); @@ -4070,9 +4070,9 @@ export class ContractMember { | StructDefinition | EnumDefinition | EventDefinition - | StateVariableDefinition | ErrorDefinition - | UserDefinedValueTypeDefinition { + | UserDefinedValueTypeDefinition + | StateVariableDefinition { return this.fetch(); } } @@ -4407,9 +4407,6 @@ export class ElementaryType { export class Statement { private readonly fetch: () => - | ExpressionStatement - | VariableDeclarationStatement - | TupleDeconstructionStatement | IfStatement | ForStatement | WhileStatement @@ -4423,16 +4420,13 @@ export class Statement { | RevertStatement | AssemblyStatement | Block - | UncheckedBlock = once(() => { + | UncheckedBlock + | TupleDeconstructionStatement + | VariableDeclarationStatement + | ExpressionStatement = once(() => { const variant = ast_internal.selectChoice(this.cst); switch (variant.kind) { - case NonterminalKind.ExpressionStatement: - return new ExpressionStatement(variant as NonterminalNode); - case NonterminalKind.VariableDeclarationStatement: - return new VariableDeclarationStatement(variant as NonterminalNode); - case NonterminalKind.TupleDeconstructionStatement: - return new TupleDeconstructionStatement(variant as NonterminalNode); case NonterminalKind.IfStatement: return new IfStatement(variant as NonterminalNode); case NonterminalKind.ForStatement: @@ -4461,6 +4455,12 @@ export class Statement { return new Block(variant as NonterminalNode); case NonterminalKind.UncheckedBlock: return new UncheckedBlock(variant as NonterminalNode); + case NonterminalKind.TupleDeconstructionStatement: + return new TupleDeconstructionStatement(variant as NonterminalNode); + case NonterminalKind.VariableDeclarationStatement: + return new VariableDeclarationStatement(variant as NonterminalNode); + case NonterminalKind.ExpressionStatement: + return new ExpressionStatement(variant as NonterminalNode); default: assert.fail(`Unexpected variant: ${variant.kind}`); @@ -4472,9 +4472,6 @@ export class Statement { } public get variant(): - | ExpressionStatement - | VariableDeclarationStatement - | TupleDeconstructionStatement | IfStatement | ForStatement | WhileStatement @@ -4488,7 +4485,10 @@ export class Statement { | RevertStatement | AssemblyStatement | Block - | UncheckedBlock { + | UncheckedBlock + | TupleDeconstructionStatement + | VariableDeclarationStatement + | ExpressionStatement { return this.fetch(); } } @@ -4561,9 +4561,9 @@ export class StorageLocation { export class ForStatementInitialization { private readonly fetch: () => - | ExpressionStatement - | VariableDeclarationStatement | TupleDeconstructionStatement + | VariableDeclarationStatement + | ExpressionStatement | TerminalNode = once(() => { const variant = ast_internal.selectChoice(this.cst); @@ -4572,12 +4572,12 @@ export class ForStatementInitialization { } switch (variant.kind) { - case NonterminalKind.ExpressionStatement: - return new ExpressionStatement(variant as NonterminalNode); - case NonterminalKind.VariableDeclarationStatement: - return new VariableDeclarationStatement(variant as NonterminalNode); case NonterminalKind.TupleDeconstructionStatement: return new TupleDeconstructionStatement(variant as NonterminalNode); + case NonterminalKind.VariableDeclarationStatement: + return new VariableDeclarationStatement(variant as NonterminalNode); + case NonterminalKind.ExpressionStatement: + return new ExpressionStatement(variant as NonterminalNode); default: assert.fail(`Unexpected variant: ${variant.kind}`); @@ -4589,9 +4589,9 @@ export class ForStatementInitialization { } public get variant(): - | ExpressionStatement - | VariableDeclarationStatement | TupleDeconstructionStatement + | VariableDeclarationStatement + | ExpressionStatement | TerminalNode { return this.fetch(); } @@ -4884,8 +4884,6 @@ export class YulStatement { private readonly fetch: () => | YulBlock | YulFunctionDefinition - | YulVariableDeclarationStatement - | YulVariableAssignmentStatement | YulStackAssignmentStatement | YulIfStatement | YulForStatement @@ -4894,6 +4892,8 @@ export class YulStatement { | YulBreakStatement | YulContinueStatement | YulLabel + | YulVariableDeclarationStatement + | YulVariableAssignmentStatement | YulExpression = once(() => { const variant = ast_internal.selectChoice(this.cst); @@ -4902,10 +4902,6 @@ export class YulStatement { return new YulBlock(variant as NonterminalNode); case NonterminalKind.YulFunctionDefinition: return new YulFunctionDefinition(variant as NonterminalNode); - case NonterminalKind.YulVariableDeclarationStatement: - return new YulVariableDeclarationStatement(variant as NonterminalNode); - case NonterminalKind.YulVariableAssignmentStatement: - return new YulVariableAssignmentStatement(variant as NonterminalNode); case NonterminalKind.YulStackAssignmentStatement: return new YulStackAssignmentStatement(variant as NonterminalNode); case NonterminalKind.YulIfStatement: @@ -4922,6 +4918,10 @@ export class YulStatement { return new YulContinueStatement(variant as NonterminalNode); case NonterminalKind.YulLabel: return new YulLabel(variant as NonterminalNode); + case NonterminalKind.YulVariableDeclarationStatement: + return new YulVariableDeclarationStatement(variant as NonterminalNode); + case NonterminalKind.YulVariableAssignmentStatement: + return new YulVariableAssignmentStatement(variant as NonterminalNode); case NonterminalKind.YulExpression: return new YulExpression(variant as NonterminalNode); @@ -4937,8 +4937,6 @@ export class YulStatement { public get variant(): | YulBlock | YulFunctionDefinition - | YulVariableDeclarationStatement - | YulVariableAssignmentStatement | YulStackAssignmentStatement | YulIfStatement | YulForStatement @@ -4947,6 +4945,8 @@ export class YulStatement { | YulBreakStatement | YulContinueStatement | YulLabel + | YulVariableDeclarationStatement + | YulVariableAssignmentStatement | YulExpression { return this.fetch(); } diff --git a/crates/solidity/outputs/spec/generated/grammar.ebnf b/crates/solidity/outputs/spec/generated/grammar.ebnf index 0265bf652a..8550211a2f 100644 --- a/crates/solidity/outputs/spec/generated/grammar.ebnf +++ b/crates/solidity/outputs/spec/generated/grammar.ebnf @@ -22,11 +22,11 @@ SourceUnitMember = (* variant: *) PragmaDirective | (* variant: *) StructDefinition (* Introduced in 0.6.0 *) | (* variant: *) EnumDefinition (* Introduced in 0.6.0 *) | (* variant: *) FunctionDefinition (* Introduced in 0.7.1 *) - | (* variant: *) ConstantDefinition (* Introduced in 0.7.4 *) | (* variant: *) ErrorDefinition (* Introduced in 0.8.4 *) | (* variant: *) UserDefinedValueTypeDefinition (* Introduced in 0.8.8 *) | (* variant: *) UsingDirective (* Introduced in 0.8.13 *) - | (* variant: *) EventDefinition; (* Introduced in 0.8.22 *) + | (* variant: *) EventDefinition (* Introduced in 0.8.22 *) + | (* variant: *) ConstantDefinition; (* Introduced in 0.7.4 *) (* 1.3. Pragma Directives: *) @@ -643,9 +643,9 @@ ContractMember = (* variant: *) UsingDirective | (* variant: *) StructDefinition | (* variant: *) EnumDefinition | (* variant: *) EventDefinition - | (* variant: *) StateVariableDefinition | (* variant: *) ErrorDefinition (* Introduced in 0.8.4 *) - | (* variant: *) UserDefinedValueTypeDefinition; (* Introduced in 0.8.8 *) + | (* variant: *) UserDefinedValueTypeDefinition (* Introduced in 0.8.8 *) + | (* variant: *) StateVariableDefinition; (* 2.2. Interfaces: *) @@ -989,10 +989,7 @@ Block = (* open_brace: *) OPEN_BRACE Statements = (* item: *) Statement*; -Statement = (* variant: *) ExpressionStatement - | (* variant: *) VariableDeclarationStatement - | (* variant: *) TupleDeconstructionStatement - | (* variant: *) IfStatement +Statement = (* variant: *) IfStatement | (* variant: *) ForStatement | (* variant: *) WhileStatement | (* variant: *) DoWhileStatement @@ -1005,7 +1002,10 @@ Statement = (* variant: *) ExpressionStatement | (* variant: *) RevertStatement (* Introduced in 0.8.4 *) | (* variant: *) AssemblyStatement | (* variant: *) Block - | (* variant: *) UncheckedBlock; (* Introduced in 0.8.0 *) + | (* variant: *) UncheckedBlock (* Introduced in 0.8.0 *) + | (* variant: *) TupleDeconstructionStatement + | (* variant: *) VariableDeclarationStatement + | (* variant: *) ExpressionStatement; (* Introduced in 0.8.0 *) UncheckedBlock = (* unchecked_keyword: *) UNCHECKED_KEYWORD @@ -1085,9 +1085,9 @@ ForStatement = (* for_keyword: *) FOR_KEYWORD (* close_paren: *) CLOSE_PAREN (* body: *) Statement; -ForStatementInitialization = (* variant: *) ExpressionStatement +ForStatementInitialization = (* variant: *) TupleDeconstructionStatement | (* variant: *) VariableDeclarationStatement - | (* variant: *) TupleDeconstructionStatement + | (* variant: *) ExpressionStatement | (* variant: *) SEMICOLON; ForStatementCondition = (* variant: *) ExpressionStatement @@ -1621,8 +1621,6 @@ YulStatements = (* item: *) YulStatement*; YulStatement = (* variant: *) YulBlock | (* variant: *) YulFunctionDefinition - | (* variant: *) YulVariableDeclarationStatement - | (* variant: *) YulVariableAssignmentStatement | (* variant: *) YulStackAssignmentStatement (* Deprecated in 0.5.0 *) | (* variant: *) YulIfStatement | (* variant: *) YulForStatement @@ -1631,6 +1629,8 @@ YulStatement = (* variant: *) YulBlock | (* variant: *) YulBreakStatement | (* variant: *) YulContinueStatement | (* variant: *) YulLabel (* Deprecated in 0.5.0 *) + | (* variant: *) YulVariableDeclarationStatement + | (* variant: *) YulVariableAssignmentStatement | (* variant: *) YulExpression; YulFunctionDefinition = (* function_keyword: *) YUL_FUNCTION_KEYWORD @@ -1661,8 +1661,8 @@ YulVariableAssignmentStatement = (* variables: *) YulPaths (* assignment: *) YulAssignmentOperator (* expression: *) YulExpression; -YulAssignmentOperator = (* variant: *) YulColonAndEqual (* Deprecated in 0.5.5 *) - | (* variant: *) COLON_EQUAL; +YulAssignmentOperator = (* variant: *) COLON_EQUAL + | (* variant: *) YulColonAndEqual; (* Deprecated in 0.5.5 *) (* Deprecated in 0.5.5 *) YulColonAndEqual = (* colon: *) COLON @@ -1673,8 +1673,8 @@ YulStackAssignmentStatement = (* assignment: *) YulStackAssignmentOperator (* variable: *) YUL_IDENTIFIER; (* Deprecated in 0.5.0 *) -YulStackAssignmentOperator = (* variant: *) YulEqualAndColon - | (* variant: *) EQUAL_COLON; +YulStackAssignmentOperator = (* variant: *) EQUAL_COLON + | (* variant: *) YulEqualAndColon; (* Deprecated in 0.5.0 *) YulEqualAndColon = (* equal: *) EQUAL diff --git a/crates/solidity/outputs/spec/generated/public/01-file-structure/02-source-unit.md b/crates/solidity/outputs/spec/generated/public/01-file-structure/02-source-unit.md index 7a1d506e89..218185a0ed 100644 --- a/crates/solidity/outputs/spec/generated/public/01-file-structure/02-source-unit.md +++ b/crates/solidity/outputs/spec/generated/public/01-file-structure/02-source-unit.md @@ -20,6 +20,6 @@ ``` -
SourceUnitMember = (* variant: *) PragmaDirective
| (* variant: *) ImportDirective
| (* variant: *) ContractDefinition
| (* variant: *) InterfaceDefinition
| (* variant: *) LibraryDefinition
| (* variant: *) StructDefinition (* Introduced in 0.6.0 *)
| (* variant: *) EnumDefinition (* Introduced in 0.6.0 *)
| (* variant: *) FunctionDefinition (* Introduced in 0.7.1 *)
| (* variant: *) ConstantDefinition (* Introduced in 0.7.4 *)
| (* variant: *) ErrorDefinition (* Introduced in 0.8.4 *)
| (* variant: *) UserDefinedValueTypeDefinition (* Introduced in 0.8.8 *)
| (* variant: *) UsingDirective (* Introduced in 0.8.13 *)
| (* variant: *) EventDefinition; (* Introduced in 0.8.22 *)
+
SourceUnitMember = (* variant: *) PragmaDirective
| (* variant: *) ImportDirective
| (* variant: *) ContractDefinition
| (* variant: *) InterfaceDefinition
| (* variant: *) LibraryDefinition
| (* variant: *) StructDefinition (* Introduced in 0.6.0 *)
| (* variant: *) EnumDefinition (* Introduced in 0.6.0 *)
| (* variant: *) FunctionDefinition (* Introduced in 0.7.1 *)
| (* variant: *) ErrorDefinition (* Introduced in 0.8.4 *)
| (* variant: *) UserDefinedValueTypeDefinition (* Introduced in 0.8.8 *)
| (* variant: *) UsingDirective (* Introduced in 0.8.13 *)
| (* variant: *) EventDefinition (* Introduced in 0.8.22 *)
| (* variant: *) ConstantDefinition; (* Introduced in 0.7.4 *)
--8<-- "crates/solidity/inputs/language/docs/01-file-structure/02-source-unit.md" diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/01-contracts.md b/crates/solidity/outputs/spec/generated/public/02-definitions/01-contracts.md index 17142f4a06..dc1602626f 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/01-contracts.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/01-contracts.md @@ -38,6 +38,6 @@ ``` -
ContractMember = (* variant: *) UsingDirective
| (* variant: *) FunctionDefinition
| (* variant: *) ConstructorDefinition (* Introduced in 0.4.22 *)
| (* variant: *) ReceiveFunctionDefinition (* Introduced in 0.6.0 *)
| (* variant: *) FallbackFunctionDefinition (* Introduced in 0.6.0 *)
| (* variant: *) UnnamedFunctionDefinition (* Deprecated in 0.6.0 *)
| (* variant: *) ModifierDefinition
| (* variant: *) StructDefinition
| (* variant: *) EnumDefinition
| (* variant: *) EventDefinition
| (* variant: *) StateVariableDefinition
| (* variant: *) ErrorDefinition (* Introduced in 0.8.4 *)
| (* variant: *) UserDefinedValueTypeDefinition; (* Introduced in 0.8.8 *)
+
ContractMember = (* variant: *) UsingDirective
| (* variant: *) FunctionDefinition
| (* variant: *) ConstructorDefinition (* Introduced in 0.4.22 *)
| (* variant: *) ReceiveFunctionDefinition (* Introduced in 0.6.0 *)
| (* variant: *) FallbackFunctionDefinition (* Introduced in 0.6.0 *)
| (* variant: *) UnnamedFunctionDefinition (* Deprecated in 0.6.0 *)
| (* variant: *) ModifierDefinition
| (* variant: *) StructDefinition
| (* variant: *) EnumDefinition
| (* variant: *) EventDefinition
| (* variant: *) ErrorDefinition (* Introduced in 0.8.4 *)
| (* variant: *) UserDefinedValueTypeDefinition (* Introduced in 0.8.8 *)
| (* variant: *) StateVariableDefinition;
--8<-- "crates/solidity/inputs/language/docs/02-definitions/01-contracts.md" diff --git a/crates/solidity/outputs/spec/generated/public/04-statements/01-blocks.md b/crates/solidity/outputs/spec/generated/public/04-statements/01-blocks.md index 8ef2f28720..65afc190a0 100644 --- a/crates/solidity/outputs/spec/generated/public/04-statements/01-blocks.md +++ b/crates/solidity/outputs/spec/generated/public/04-statements/01-blocks.md @@ -20,7 +20,7 @@ ``` -
Statement = (* variant: *) ExpressionStatement
| (* variant: *) VariableDeclarationStatement
| (* variant: *) TupleDeconstructionStatement
| (* variant: *) IfStatement
| (* variant: *) ForStatement
| (* variant: *) WhileStatement
| (* variant: *) DoWhileStatement
| (* variant: *) ContinueStatement
| (* variant: *) BreakStatement
| (* variant: *) ReturnStatement
| (* variant: *) ThrowStatement (* Deprecated in 0.5.0 *)
| (* variant: *) EmitStatement (* Introduced in 0.4.21 *)
| (* variant: *) TryStatement (* Introduced in 0.6.0 *)
| (* variant: *) RevertStatement (* Introduced in 0.8.4 *)
| (* variant: *) AssemblyStatement
| (* variant: *) Block
| (* variant: *) UncheckedBlock; (* Introduced in 0.8.0 *)
+
Statement = (* variant: *) IfStatement
| (* variant: *) ForStatement
| (* variant: *) WhileStatement
| (* variant: *) DoWhileStatement
| (* variant: *) ContinueStatement
| (* variant: *) BreakStatement
| (* variant: *) ReturnStatement
| (* variant: *) ThrowStatement (* Deprecated in 0.5.0 *)
| (* variant: *) EmitStatement (* Introduced in 0.4.21 *)
| (* variant: *) TryStatement (* Introduced in 0.6.0 *)
| (* variant: *) RevertStatement (* Introduced in 0.8.4 *)
| (* variant: *) AssemblyStatement
| (* variant: *) Block
| (* variant: *) UncheckedBlock (* Introduced in 0.8.0 *)
| (* variant: *) TupleDeconstructionStatement
| (* variant: *) VariableDeclarationStatement
| (* variant: *) ExpressionStatement;
```{ .ebnf #UncheckedBlock } diff --git a/crates/solidity/outputs/spec/generated/public/04-statements/03-control-statements.md b/crates/solidity/outputs/spec/generated/public/04-statements/03-control-statements.md index f908dbb547..8d4d4380b3 100644 --- a/crates/solidity/outputs/spec/generated/public/04-statements/03-control-statements.md +++ b/crates/solidity/outputs/spec/generated/public/04-statements/03-control-statements.md @@ -26,7 +26,7 @@ ``` -
ForStatementInitialization = (* variant: *) ExpressionStatement
| (* variant: *) VariableDeclarationStatement
| (* variant: *) TupleDeconstructionStatement
| (* variant: *) SEMICOLON;
+
ForStatementInitialization = (* variant: *) TupleDeconstructionStatement
| (* variant: *) VariableDeclarationStatement
| (* variant: *) ExpressionStatement
| (* variant: *) SEMICOLON;
```{ .ebnf #ForStatementCondition } 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 3023e54066..b01cd74607 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 @@ -20,7 +20,7 @@ ``` -
YulStatement = (* variant: *) YulBlock
| (* variant: *) YulFunctionDefinition
| (* variant: *) YulVariableDeclarationStatement
| (* variant: *) YulVariableAssignmentStatement
| (* variant: *) YulStackAssignmentStatement (* Deprecated in 0.5.0 *)
| (* variant: *) YulIfStatement
| (* variant: *) YulForStatement
| (* variant: *) YulSwitchStatement
| (* variant: *) YulLeaveStatement (* Introduced in 0.6.0 *)
| (* variant: *) YulBreakStatement
| (* variant: *) YulContinueStatement
| (* variant: *) YulLabel (* Deprecated in 0.5.0 *)
| (* variant: *) YulExpression;
+
YulStatement = (* variant: *) YulBlock
| (* variant: *) YulFunctionDefinition
| (* variant: *) YulStackAssignmentStatement (* Deprecated in 0.5.0 *)
| (* variant: *) YulIfStatement
| (* variant: *) YulForStatement
| (* variant: *) YulSwitchStatement
| (* variant: *) YulLeaveStatement (* Introduced in 0.6.0 *)
| (* variant: *) YulBreakStatement
| (* variant: *) YulContinueStatement
| (* variant: *) YulLabel (* Deprecated in 0.5.0 *)
| (* variant: *) YulVariableDeclarationStatement
| (* variant: *) YulVariableAssignmentStatement
| (* variant: *) YulExpression;
```{ .ebnf #YulFunctionDefinition } @@ -74,7 +74,7 @@ ``` -
YulAssignmentOperator = (* variant: *) YulColonAndEqual (* Deprecated in 0.5.5 *)
| (* variant: *) COLON_EQUAL;
+
YulAssignmentOperator = (* variant: *) COLON_EQUAL
| (* variant: *) YulColonAndEqual; (* Deprecated in 0.5.5 *)
```{ .ebnf #YulColonAndEqual } @@ -92,7 +92,7 @@ ``` -
(* Deprecated in 0.5.0 *)
YulStackAssignmentOperator = (* variant: *) YulEqualAndColon
| (* variant: *) EQUAL_COLON;
+
(* Deprecated in 0.5.0 *)
YulStackAssignmentOperator = (* variant: *) EQUAL_COLON
| (* variant: *) YulEqualAndColon;
```{ .ebnf #YulEqualAndColon } diff --git a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.4.11-failure.yml index 48f8bbe0a3..1b3ea51fc0 100644 --- a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.4.11-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 1 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Block/unchecked/input.sol:1:13] │ 1 │ { unchecked { x = 1; } } @@ -17,10 +17,10 @@ Tree: - (Block): # "{ unchecked { x = 1; } }" (0..24) - (open_brace꞉ OpenBrace): "{" # (0..1) - (statements꞉ Statements): # " unchecked " (1..12) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " unchecked " (1..12) - - (expression꞉ Expression): # " unchecked" (1..11) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " unchecked " (1..12) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " unchecked" (1..11) - (leading_trivia꞉ Whitespace): " " # (1..2) - - (variant꞉ Identifier): "unchecked" # (2..11) + - (item꞉ Identifier): "unchecked" # (2..11) - (leading_trivia꞉ Whitespace): " " # (11..12) - (UNRECOGNIZED): "{ x = 1; } " # (12..23) - (close_brace꞉ CloseBrace): "}" # (23..24) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.5.0-failure.yml index 46182b7c89..8db4980555 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.5.0-failure.yml @@ -12,7 +12,7 @@ Source: > Errors: # 1 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/input.sol:6:11] │ 6 │ uint256 constructor; @@ -65,8 +65,8 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (158..159) - (trailing_trivia꞉ EndOfLine): "\n" # (159..160) - (statements꞉ Statements): # "\t\tuint256 constructor;\n" (160..183) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # "\t\tuint256 constructor;\n" (160..183) - - (expression꞉ Expression) ► (variant꞉ ElementaryType): # "\t\tuint256" (160..169) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # "\t\tuint256 constructor;\n" (160..183) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType): # "\t\tuint256" (160..169) - (leading_trivia꞉ Whitespace): "\t\t" # (160..162) - (variant꞉ UintKeyword): "uint256" # (162..169) - (leading_trivia꞉ Whitespace): " " # (169..170) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.5.0-failure.yml index 7e2c66d96f..55184d82d6 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.5.0-failure.yml @@ -13,7 +13,7 @@ Source: > Errors: # 1 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/input.sol:6:17] │ 6 │ uint256 emit; @@ -66,8 +66,8 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (187..188) - (trailing_trivia꞉ EndOfLine): "\n" # (188..189) - (statements꞉ Statements): # " uint256 emit;\n emit Deposit();\n" (189..235) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " uint256 emit;\n" (189..211) - - (expression꞉ Expression) ► (variant꞉ ElementaryType): # " uint256" (189..204) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " uint256 emit;\n" (189..211) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType): # " uint256" (189..204) - (leading_trivia꞉ Whitespace): " " # (189..197) - (variant꞉ UintKeyword): "uint256" # (197..204) - (leading_trivia꞉ Whitespace): " " # (204..205) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.4.11-failure.yml index 47edd3bcab..867301aa38 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.4.11-failure.yml @@ -32,7 +32,7 @@ Errors: # 3 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/input.sol:10:13] │ 10 │ ╭─▶ unchecked { invalid sequence } @@ -133,10 +133,10 @@ Tree: - (literal꞉ DecimalLiteral): "0" # (171..172) - (semicolon꞉ Semicolon): ";" # (172..173) - (trailing_trivia꞉ EndOfLine): "\n" # (173..174) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # "\t\tunchecked " (174..186) - - (expression꞉ Expression): # "\t\tunchecked" (174..185) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # "\t\tunchecked " (174..186) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # "\t\tunchecked" (174..185) - (leading_trivia꞉ Whitespace): "\t\t" # (174..176) - - (variant꞉ Identifier): "unchecked" # (176..185) + - (item꞉ Identifier): "unchecked" # (176..185) - (leading_trivia꞉ Whitespace): " " # (185..186) - (UNRECOGNIZED): "{ invalid sequence }\n\t" # (186..208) - (close_brace꞉ CloseBrace): "}" # (208..209) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.4.11-failure.yml index 2d96febb72..0f4338044f 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.4.11-failure.yml @@ -24,7 +24,7 @@ Errors: # 10 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:2:18] │ 2 │ msg.sender.call{do: 1, arg: 1 }(); @@ -32,7 +32,7 @@ Errors: # 10 total │ ╰────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:3:18] │ 3 │ msg.sender.call{, empty: 1, parse: 2 }(); @@ -40,7 +40,7 @@ Errors: # 10 total │ ╰────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:4:18] │ 4 │ msg.sender.call{arg: 1, missing_expr: , no_semicolon, , }(); @@ -48,7 +48,7 @@ Errors: # 10 total │ ╰─────────────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:5:18] │ 5 │ msg.sender.call{arg: 1 unexpected tokens, not: 2, recovered, yet: 3, }(); @@ -130,55 +130,47 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (84..85) - (trailing_trivia꞉ EndOfLine): "\n" # (85..86) - (statements꞉ Statements): # " msg.sender.call{do: 1, arg: 1 }();\n msg.sender...." (86..306) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (86..103) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (86..98) - - (operand꞉ Expression): # " msg" (86..91) - - (leading_trivia꞉ Whitespace): " " # (86..88) - - (variant꞉ Identifier): "msg" # (88..91) - - (period꞉ Period): "." # (91..92) - - (member꞉ Identifier): "sender" # (92..98) - - (period꞉ Period): "." # (98..99) - - (member꞉ Identifier): "call" # (99..103) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (86..103) + - (leading_trivia꞉ Whitespace): " " # (86..88) + - (item꞉ Identifier): "msg" # (88..91) + - (separator꞉ Period): "." # (91..92) + - (item꞉ Identifier): "sender" # (92..98) + - (separator꞉ Period): "." # (98..99) + - (item꞉ Identifier): "call" # (99..103) - (UNRECOGNIZED): "{do: 1, arg: 1 }()" # (103..121) - (semicolon꞉ Semicolon): ";" # (121..122) - (trailing_trivia꞉ EndOfLine): "\n" # (122..123) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (123..140) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (123..135) - - (operand꞉ Expression): # " msg" (123..128) - - (leading_trivia꞉ Whitespace): " " # (123..125) - - (variant꞉ Identifier): "msg" # (125..128) - - (period꞉ Period): "." # (128..129) - - (member꞉ Identifier): "sender" # (129..135) - - (period꞉ Period): "." # (135..136) - - (member꞉ Identifier): "call" # (136..140) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (123..140) + - (leading_trivia꞉ Whitespace): " " # (123..125) + - (item꞉ Identifier): "msg" # (125..128) + - (separator꞉ Period): "." # (128..129) + - (item꞉ Identifier): "sender" # (129..135) + - (separator꞉ Period): "." # (135..136) + - (item꞉ Identifier): "call" # (136..140) - (UNRECOGNIZED): "{, empty: 1, parse: 2 }()" # (140..165) - (semicolon꞉ Semicolon): ";" # (165..166) - (trailing_trivia꞉ EndOfLine): "\n" # (166..167) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{arg: 1, missing_expr: , no_semic..." (167..230) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (167..184) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (167..179) - - (operand꞉ Expression): # " msg" (167..172) - - (leading_trivia꞉ Whitespace): " " # (167..169) - - (variant꞉ Identifier): "msg" # (169..172) - - (period꞉ Period): "." # (172..173) - - (member꞉ Identifier): "sender" # (173..179) - - (period꞉ Period): "." # (179..180) - - (member꞉ Identifier): "call" # (180..184) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{arg: 1, missing_expr: , no_semic..." (167..230) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (167..184) + - (leading_trivia꞉ Whitespace): " " # (167..169) + - (item꞉ Identifier): "msg" # (169..172) + - (separator꞉ Period): "." # (172..173) + - (item꞉ Identifier): "sender" # (173..179) + - (separator꞉ Period): "." # (179..180) + - (item꞉ Identifier): "call" # (180..184) - (UNRECOGNIZED): "{arg: 1, missing_expr: , no_semicolon, , }()" # (184..228) - (semicolon꞉ Semicolon): ";" # (228..229) - (trailing_trivia꞉ EndOfLine): "\n" # (229..230) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{arg: 1 unexpected tokens, not: 2..." (230..306) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (230..247) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (230..242) - - (operand꞉ Expression): # " msg" (230..235) - - (leading_trivia꞉ Whitespace): " " # (230..232) - - (variant꞉ Identifier): "msg" # (232..235) - - (period꞉ Period): "." # (235..236) - - (member꞉ Identifier): "sender" # (236..242) - - (period꞉ Period): "." # (242..243) - - (member꞉ Identifier): "call" # (243..247) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{arg: 1 unexpected tokens, not: 2..." (230..306) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (230..247) + - (leading_trivia꞉ Whitespace): " " # (230..232) + - (item꞉ Identifier): "msg" # (232..235) + - (separator꞉ Period): "." # (235..236) + - (item꞉ Identifier): "sender" # (236..242) + - (separator꞉ Period): "." # (242..243) + - (item꞉ Identifier): "call" # (243..247) - (UNRECOGNIZED): "{arg: 1 unexpected tokens, not: 2, recovered, yet:..." # (247..304) - (semicolon꞉ Semicolon): ";" # (304..305) - (trailing_trivia꞉ EndOfLine): "\n" # (305..306) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.6.0-failure.yml index 3ef28808ee..ab5805c90a 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.6.0-failure.yml @@ -24,7 +24,7 @@ Errors: # 10 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:2:18] │ 2 │ msg.sender.call{do: 1, arg: 1 }(); @@ -32,7 +32,7 @@ Errors: # 10 total │ ╰────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:3:18] │ 3 │ msg.sender.call{, empty: 1, parse: 2 }(); @@ -40,7 +40,7 @@ Errors: # 10 total │ ╰────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:4:18] │ 4 │ msg.sender.call{arg: 1, missing_expr: , no_semicolon, , }(); @@ -48,7 +48,7 @@ Errors: # 10 total │ ╰─────────────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:5:18] │ 5 │ msg.sender.call{arg: 1 unexpected tokens, not: 2, recovered, yet: 3, }(); @@ -129,55 +129,47 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (84..85) - (trailing_trivia꞉ EndOfLine): "\n" # (85..86) - (statements꞉ Statements): # " msg.sender.call{do: 1, arg: 1 }();\n msg.sender...." (86..306) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (86..103) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (86..98) - - (operand꞉ Expression): # " msg" (86..91) - - (leading_trivia꞉ Whitespace): " " # (86..88) - - (variant꞉ Identifier): "msg" # (88..91) - - (period꞉ Period): "." # (91..92) - - (member꞉ Identifier): "sender" # (92..98) - - (period꞉ Period): "." # (98..99) - - (member꞉ Identifier): "call" # (99..103) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (86..103) + - (leading_trivia꞉ Whitespace): " " # (86..88) + - (item꞉ Identifier): "msg" # (88..91) + - (separator꞉ Period): "." # (91..92) + - (item꞉ Identifier): "sender" # (92..98) + - (separator꞉ Period): "." # (98..99) + - (item꞉ Identifier): "call" # (99..103) - (UNRECOGNIZED): "{do: 1, arg: 1 }()" # (103..121) - (semicolon꞉ Semicolon): ";" # (121..122) - (trailing_trivia꞉ EndOfLine): "\n" # (122..123) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (123..140) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (123..135) - - (operand꞉ Expression): # " msg" (123..128) - - (leading_trivia꞉ Whitespace): " " # (123..125) - - (variant꞉ Identifier): "msg" # (125..128) - - (period꞉ Period): "." # (128..129) - - (member꞉ Identifier): "sender" # (129..135) - - (period꞉ Period): "." # (135..136) - - (member꞉ Identifier): "call" # (136..140) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (123..140) + - (leading_trivia꞉ Whitespace): " " # (123..125) + - (item꞉ Identifier): "msg" # (125..128) + - (separator꞉ Period): "." # (128..129) + - (item꞉ Identifier): "sender" # (129..135) + - (separator꞉ Period): "." # (135..136) + - (item꞉ Identifier): "call" # (136..140) - (UNRECOGNIZED): "{, empty: 1, parse: 2 }()" # (140..165) - (semicolon꞉ Semicolon): ";" # (165..166) - (trailing_trivia꞉ EndOfLine): "\n" # (166..167) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{arg: 1, missing_expr: , no_semic..." (167..230) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (167..184) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (167..179) - - (operand꞉ Expression): # " msg" (167..172) - - (leading_trivia꞉ Whitespace): " " # (167..169) - - (variant꞉ Identifier): "msg" # (169..172) - - (period꞉ Period): "." # (172..173) - - (member꞉ Identifier): "sender" # (173..179) - - (period꞉ Period): "." # (179..180) - - (member꞉ Identifier): "call" # (180..184) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{arg: 1, missing_expr: , no_semic..." (167..230) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (167..184) + - (leading_trivia꞉ Whitespace): " " # (167..169) + - (item꞉ Identifier): "msg" # (169..172) + - (separator꞉ Period): "." # (172..173) + - (item꞉ Identifier): "sender" # (173..179) + - (separator꞉ Period): "." # (179..180) + - (item꞉ Identifier): "call" # (180..184) - (UNRECOGNIZED): "{arg: 1, missing_expr: , no_semicolon, , }()" # (184..228) - (semicolon꞉ Semicolon): ";" # (228..229) - (trailing_trivia꞉ EndOfLine): "\n" # (229..230) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{arg: 1 unexpected tokens, not: 2..." (230..306) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (230..247) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (230..242) - - (operand꞉ Expression): # " msg" (230..235) - - (leading_trivia꞉ Whitespace): " " # (230..232) - - (variant꞉ Identifier): "msg" # (232..235) - - (period꞉ Period): "." # (235..236) - - (member꞉ Identifier): "sender" # (236..242) - - (period꞉ Period): "." # (242..243) - - (member꞉ Identifier): "call" # (243..247) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{arg: 1 unexpected tokens, not: 2..." (230..306) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (230..247) + - (leading_trivia꞉ Whitespace): " " # (230..232) + - (item꞉ Identifier): "msg" # (232..235) + - (separator꞉ Period): "." # (235..236) + - (item꞉ Identifier): "sender" # (236..242) + - (separator꞉ Period): "." # (242..243) + - (item꞉ Identifier): "call" # (243..247) - (UNRECOGNIZED): "{arg: 1 unexpected tokens, not: 2, recovered, yet:..." # (247..304) - (semicolon꞉ Semicolon): ";" # (304..305) - (trailing_trivia꞉ EndOfLine): "\n" # (305..306) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.6.2-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.6.2-failure.yml index 904a0cd22d..4979b0b2d5 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.6.2-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.6.2-failure.yml @@ -24,7 +24,7 @@ Errors: # 12 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:2:18] │ 2 │ msg.sender.call{do: 1, arg: 1 }(); @@ -32,7 +32,7 @@ Errors: # 12 total │ ╰────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:3:18] │ 3 │ msg.sender.call{, empty: 1, parse: 2 }(); @@ -145,29 +145,25 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (84..85) - (trailing_trivia꞉ EndOfLine): "\n" # (85..86) - (statements꞉ Statements): # " msg.sender.call{do: 1, arg: 1 }();\n msg.sender...." (86..306) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (86..103) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (86..98) - - (operand꞉ Expression): # " msg" (86..91) - - (leading_trivia꞉ Whitespace): " " # (86..88) - - (variant꞉ Identifier): "msg" # (88..91) - - (period꞉ Period): "." # (91..92) - - (member꞉ Identifier): "sender" # (92..98) - - (period꞉ Period): "." # (98..99) - - (member꞉ Identifier): "call" # (99..103) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (86..103) + - (leading_trivia꞉ Whitespace): " " # (86..88) + - (item꞉ Identifier): "msg" # (88..91) + - (separator꞉ Period): "." # (91..92) + - (item꞉ Identifier): "sender" # (92..98) + - (separator꞉ Period): "." # (98..99) + - (item꞉ Identifier): "call" # (99..103) - (UNRECOGNIZED): "{do: 1, arg: 1 }()" # (103..121) - (semicolon꞉ Semicolon): ";" # (121..122) - (trailing_trivia꞉ EndOfLine): "\n" # (122..123) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (123..140) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (123..135) - - (operand꞉ Expression): # " msg" (123..128) - - (leading_trivia꞉ Whitespace): " " # (123..125) - - (variant꞉ Identifier): "msg" # (125..128) - - (period꞉ Period): "." # (128..129) - - (member꞉ Identifier): "sender" # (129..135) - - (period꞉ Period): "." # (135..136) - - (member꞉ Identifier): "call" # (136..140) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (123..140) + - (leading_trivia꞉ Whitespace): " " # (123..125) + - (item꞉ Identifier): "msg" # (125..128) + - (separator꞉ Period): "." # (128..129) + - (item꞉ Identifier): "sender" # (129..135) + - (separator꞉ Period): "." # (135..136) + - (item꞉ Identifier): "call" # (136..140) - (UNRECOGNIZED): "{, empty: 1, parse: 2 }()" # (140..165) - (semicolon꞉ Semicolon): ";" # (165..166) - (trailing_trivia꞉ EndOfLine): "\n" # (166..167) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.7.0-failure.yml index 6b983087ac..ff7043077e 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.7.0-failure.yml @@ -24,7 +24,7 @@ Errors: # 12 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:2:18] │ 2 │ msg.sender.call{do: 1, arg: 1 }(); @@ -32,7 +32,7 @@ Errors: # 12 total │ ╰────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:3:18] │ 3 │ msg.sender.call{, empty: 1, parse: 2 }(); @@ -145,29 +145,25 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (84..85) - (trailing_trivia꞉ EndOfLine): "\n" # (85..86) - (statements꞉ Statements): # " msg.sender.call{do: 1, arg: 1 }();\n msg.sender...." (86..306) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (86..103) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (86..98) - - (operand꞉ Expression): # " msg" (86..91) - - (leading_trivia꞉ Whitespace): " " # (86..88) - - (variant꞉ Identifier): "msg" # (88..91) - - (period꞉ Period): "." # (91..92) - - (member꞉ Identifier): "sender" # (92..98) - - (period꞉ Period): "." # (98..99) - - (member꞉ Identifier): "call" # (99..103) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (86..103) + - (leading_trivia꞉ Whitespace): " " # (86..88) + - (item꞉ Identifier): "msg" # (88..91) + - (separator꞉ Period): "." # (91..92) + - (item꞉ Identifier): "sender" # (92..98) + - (separator꞉ Period): "." # (98..99) + - (item꞉ Identifier): "call" # (99..103) - (UNRECOGNIZED): "{do: 1, arg: 1 }()" # (103..121) - (semicolon꞉ Semicolon): ";" # (121..122) - (trailing_trivia꞉ EndOfLine): "\n" # (122..123) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (123..140) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (123..135) - - (operand꞉ Expression): # " msg" (123..128) - - (leading_trivia꞉ Whitespace): " " # (123..125) - - (variant꞉ Identifier): "msg" # (125..128) - - (period꞉ Period): "." # (128..129) - - (member꞉ Identifier): "sender" # (129..135) - - (period꞉ Period): "." # (135..136) - - (member꞉ Identifier): "call" # (136..140) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (123..140) + - (leading_trivia꞉ Whitespace): " " # (123..125) + - (item꞉ Identifier): "msg" # (125..128) + - (separator꞉ Period): "." # (128..129) + - (item꞉ Identifier): "sender" # (129..135) + - (separator꞉ Period): "." # (135..136) + - (item꞉ Identifier): "call" # (136..140) - (UNRECOGNIZED): "{, empty: 1, parse: 2 }()" # (140..165) - (semicolon꞉ Semicolon): ";" # (165..166) - (trailing_trivia꞉ EndOfLine): "\n" # (166..167) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.8.0-failure.yml index 1535c276f0..d0313ea8b7 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.8.0-failure.yml @@ -24,7 +24,7 @@ Errors: # 12 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:2:18] │ 2 │ msg.sender.call{do: 1, arg: 1 }(); @@ -32,7 +32,7 @@ Errors: # 12 total │ ╰────────── Error occurred here. ───╯ - > - Error: Expected Semicolon. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/input.sol:3:18] │ 3 │ msg.sender.call{, empty: 1, parse: 2 }(); @@ -145,29 +145,25 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (84..85) - (trailing_trivia꞉ EndOfLine): "\n" # (85..86) - (statements꞉ Statements): # " msg.sender.call{do: 1, arg: 1 }();\n msg.sender...." (86..306) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (86..103) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (86..98) - - (operand꞉ Expression): # " msg" (86..91) - - (leading_trivia꞉ Whitespace): " " # (86..88) - - (variant꞉ Identifier): "msg" # (88..91) - - (period꞉ Period): "." # (91..92) - - (member꞉ Identifier): "sender" # (92..98) - - (period꞉ Period): "." # (98..99) - - (member꞉ Identifier): "call" # (99..103) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{do: 1, arg: 1 }();\n" (86..123) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (86..103) + - (leading_trivia꞉ Whitespace): " " # (86..88) + - (item꞉ Identifier): "msg" # (88..91) + - (separator꞉ Period): "." # (91..92) + - (item꞉ Identifier): "sender" # (92..98) + - (separator꞉ Period): "." # (98..99) + - (item꞉ Identifier): "call" # (99..103) - (UNRECOGNIZED): "{do: 1, arg: 1 }()" # (103..121) - (semicolon꞉ Semicolon): ";" # (121..122) - (trailing_trivia꞉ EndOfLine): "\n" # (122..123) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) - - (expression꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender.call" (123..140) - - (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # " msg.sender" (123..135) - - (operand꞉ Expression): # " msg" (123..128) - - (leading_trivia꞉ Whitespace): " " # (123..125) - - (variant꞉ Identifier): "msg" # (125..128) - - (period꞉ Period): "." # (128..129) - - (member꞉ Identifier): "sender" # (129..135) - - (period꞉ Period): "." # (135..136) - - (member꞉ Identifier): "call" # (136..140) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " msg.sender.call{, empty: 1, parse: 2 }();\n" (123..167) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " msg.sender.call" (123..140) + - (leading_trivia꞉ Whitespace): " " # (123..125) + - (item꞉ Identifier): "msg" # (125..128) + - (separator꞉ Period): "." # (128..129) + - (item꞉ Identifier): "sender" # (129..135) + - (separator꞉ Period): "." # (135..136) + - (item꞉ Identifier): "call" # (136..140) - (UNRECOGNIZED): "{, empty: 1, parse: 2 }()" # (140..165) - (semicolon꞉ Semicolon): ";" # (165..166) - (trailing_trivia꞉ EndOfLine): "\n" # (166..167) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.4.16-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.4.16-failure.yml index 061933ea70..a42098492e 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.4.16-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.4.16-failure.yml @@ -13,7 +13,7 @@ Source: > Errors: # 1 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/input.sol:3:15] │ 3 │ ╭─▶ unchecked { @@ -79,10 +79,10 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (97..98) - (trailing_trivia꞉ EndOfLine): "\n" # (98..99) - (statements꞉ Statements): # " unchecked " (99..113) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # " unchecked " (99..113) - - (expression꞉ Expression): # " unchecked" (99..112) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement): # " unchecked " (99..113) + - (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " unchecked" (99..112) - (leading_trivia꞉ Whitespace): " " # (99..103) - - (variant꞉ Identifier): "unchecked" # (103..112) + - (item꞉ Identifier): "unchecked" # (103..112) - (leading_trivia꞉ Whitespace): " " # (112..113) - (UNRECOGNIZED): "{\n uint256 c = a + b;\n if (c < a) return..." # (113..208) - (close_brace꞉ CloseBrace): "}" # (208..209) diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.4.11-failure.yml index 750364e257..42ffeed673 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.4.11-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/input.sol:1:8] │ 1 │ for(int) @@ -26,7 +26,7 @@ Tree: - (item꞉ Statement) ► (variant꞉ ForStatement): # "for(int)\n" (0..9) - (for_keyword꞉ ForKeyword): "for" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) - - (initialization꞉ ForStatementInitialization) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) + - (initialization꞉ ForStatementInitialization) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) - (MISSING): "" # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.4.21-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.4.21-failure.yml index 930c772c4b..183d2db044 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.4.21-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.4.21-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/input.sol:1:8] │ 1 │ for(int) @@ -26,7 +26,7 @@ Tree: - (item꞉ Statement) ► (variant꞉ ForStatement): # "for(int)\n" (0..9) - (for_keyword꞉ ForKeyword): "for" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) - - (initialization꞉ ForStatementInitialization) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) + - (initialization꞉ ForStatementInitialization) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) - (MISSING): "" # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.5.0-failure.yml index 56b366e066..60af54ac38 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.5.0-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/input.sol:1:8] │ 1 │ for(int) @@ -26,7 +26,7 @@ Tree: - (item꞉ Statement) ► (variant꞉ ForStatement): # "for(int)\n" (0..9) - (for_keyword꞉ ForKeyword): "for" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) - - (initialization꞉ ForStatementInitialization) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) + - (initialization꞉ ForStatementInitialization) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) - (MISSING): "" # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.5.3-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.5.3-failure.yml index 3d2288e6b8..eb05778063 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.5.3-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.5.3-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/input.sol:1:8] │ 1 │ for(int) @@ -26,7 +26,7 @@ Tree: - (item꞉ Statement) ► (variant꞉ ForStatement): # "for(int)\n" (0..9) - (for_keyword꞉ ForKeyword): "for" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) - - (initialization꞉ ForStatementInitialization) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) + - (initialization꞉ ForStatementInitialization) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) - (MISSING): "" # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.6.0-failure.yml index ed3ec0a221..d56d13ba4f 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.6.0-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/input.sol:1:8] │ 1 │ for(int) @@ -26,7 +26,7 @@ Tree: - (item꞉ Statement) ► (variant꞉ ForStatement): # "for(int)\n" (0..9) - (for_keyword꞉ ForKeyword): "for" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) - - (initialization꞉ ForStatementInitialization) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) + - (initialization꞉ ForStatementInitialization) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) - (MISSING): "" # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.7.0-failure.yml index 40d1b38459..dfa61d4b83 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.7.0-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/input.sol:1:8] │ 1 │ for(int) @@ -26,7 +26,7 @@ Tree: - (item꞉ Statement) ► (variant꞉ ForStatement): # "for(int)\n" (0..9) - (for_keyword꞉ ForKeyword): "for" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) - - (initialization꞉ ForStatementInitialization) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) + - (initialization꞉ ForStatementInitialization) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) - (MISSING): "" # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.8.0-failure.yml index 09df52a202..e802b0ac8a 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.8.0-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/input.sol:1:8] │ 1 │ for(int) @@ -26,7 +26,7 @@ Tree: - (item꞉ Statement) ► (variant꞉ ForStatement): # "for(int)\n" (0..9) - (for_keyword꞉ ForKeyword): "for" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) - - (initialization꞉ ForStatementInitialization) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) + - (initialization꞉ ForStatementInitialization) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) - (MISSING): "" # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.8.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.8.4-failure.yml index 265276df4c..9140c4fe0c 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.8.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/generated/0.8.4-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/recovery_ignore_multiple_empty_matches/input.sol:1:8] │ 1 │ for(int) @@ -26,7 +26,7 @@ Tree: - (item꞉ Statement) ► (variant꞉ ForStatement): # "for(int)\n" (0..9) - (for_keyword꞉ ForKeyword): "for" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) - - (initialization꞉ ForStatementInitialization) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) + - (initialization꞉ ForStatementInitialization) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ ElementaryType) ► (variant꞉ IntKeyword): "int" # (4..7) - (MISSING): "" # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (trailing_trivia꞉ EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/TryStatement/try_expr_call_options/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/TryStatement/try_expr_call_options/generated/0.6.0-failure.yml index 117345e019..b0fcc5a851 100644 --- a/crates/solidity/testing/snapshots/cst_output/TryStatement/try_expr_call_options/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/TryStatement/try_expr_call_options/generated/0.6.0-failure.yml @@ -8,7 +8,7 @@ Source: > Errors: # 2 total - > - Error: Expected Ampersand or AmpersandAmpersand or AmpersandEqual or Asterisk or AsteriskAsterisk or AsteriskEqual or BangEqual or Bar or BarBar or BarEqual or Caret or CaretEqual or Equal or EqualEqual or GreaterThan or GreaterThanEqual or GreaterThanGreaterThan or GreaterThanGreaterThanEqual or GreaterThanGreaterThanGreaterThan or GreaterThanGreaterThanGreaterThanEqual or LessThan or LessThanEqual or LessThanLessThan or LessThanLessThanEqual or Minus or MinusEqual or Percent or PercentEqual or Plus or PlusEqual or Semicolon or Slash or SlashEqual. + Error: Expected CallDataKeyword or Identifier or MemoryKeyword or StorageKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/TryStatement/try_expr_call_options/input.sol:1:14] │ 1 │ try foo() { x: 1 } { @@ -41,9 +41,9 @@ Tree: - (leading_trivia꞉ Whitespace): " " # (9..10) - (open_brace꞉ OpenBrace): "{" # (10..11) - (statements꞉ Statements): # " x" (11..13) - - (item꞉ Statement) ► (variant꞉ ExpressionStatement) ► (expression꞉ Expression): # " x" (11..13) + - (item꞉ Statement) ► (variant꞉ VariableDeclarationStatement) ► (variable_type꞉ VariableDeclarationType) ► (variant꞉ TypeName) ► (variant꞉ IdentifierPath): # " x" (11..13) - (leading_trivia꞉ Whitespace): " " # (11..12) - - (variant꞉ Identifier): "x" # (12..13) + - (item꞉ Identifier): "x" # (12..13) - (UNRECOGNIZED): ": 1 " # (13..17) - (close_brace꞉ CloseBrace): "}" # (17..18) - (UNRECOGNIZED): " {\n bar();\n} catch {\n}\n" # (18..42)