diff --git a/.changeset/nine-boxes-vanish.md b/.changeset/nine-boxes-vanish.md new file mode 100644 index 0000000000..8dd6539b10 --- /dev/null +++ b/.changeset/nine-boxes-vanish.md @@ -0,0 +1,5 @@ +--- +"@nomicfoundation/slang": patch +--- + +Support `delete` as an expression rather than a statement diff --git a/crates/solidity/inputs/language/src/definition.rs b/crates/solidity/inputs/language/src/definition.rs index 87cf7611b8..9dc0ca7c17 100644 --- a/crates/solidity/inputs/language/src/definition.rs +++ b/crates/solidity/inputs/language/src/definition.rs @@ -2787,7 +2787,6 @@ codegen_language_macros::compile!(Language( EnumVariant(reference = DoWhileStatement), EnumVariant(reference = ContinueStatement), EnumVariant(reference = BreakStatement), - EnumVariant(reference = DeleteStatement), EnumVariant(reference = ReturnStatement), EnumVariant(reference = ThrowStatement, enabled = Till("0.5.0")), EnumVariant(reference = EmitStatement, enabled = From("0.4.21")), @@ -3049,15 +3048,6 @@ codegen_language_macros::compile!(Language( arguments = Required(ArgumentsDeclaration), semicolon = Required(Semicolon) ) - ), - Struct( - name = DeleteStatement, - error_recovery = FieldsErrorRecovery(terminator = semicolon), - fields = ( - delete_keyword = Required(DeleteKeyword), - expression = Required(Expression), - semicolon = Required(Semicolon) - ) ) ] ), @@ -3371,6 +3361,10 @@ codegen_language_macros::compile!(Language( model = Prefix, enabled = Till("0.5.0"), fields = (operator = Required(Plus)) + ), + PrecedenceOperator( + model = Prefix, + fields = (operator = Required(DeleteKeyword)) ) ] ), diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/kinds.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/kinds.rs index e23165eaa6..e32d5c8a93 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/kinds.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/kinds.rs @@ -51,7 +51,6 @@ pub enum RuleKind { ContractMember, ContractMembers, DecimalNumberExpression, - DeleteStatement, DoWhileStatement, ElementaryType, ElseBranch, @@ -289,7 +288,6 @@ pub enum NodeLabel { ContinueKeyword, ContractKeyword, DefaultKeyword, - DeleteKeyword, DoKeyword, Elements, ElseBranch, diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs index 23ddd3ac31..c15c165bd9 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs @@ -1046,40 +1046,6 @@ impl Language { .with_kind(RuleKind::DecimalNumberExpression) } - #[allow(unused_assignments, unused_parens)] - fn delete_statement(&self, input: &mut ParserContext<'_>) -> ParserResult { - SequenceHelper::run(|mut seq| { - seq.elem( - SequenceHelper::run(|mut seq| { - seq.elem_labeled( - NodeLabel::DeleteKeyword, - self.parse_token_with_trivia::( - input, - TokenKind::DeleteKeyword, - ), - )?; - seq.elem_labeled(NodeLabel::Expression, self.expression(input))?; - seq.finish() - }) - .recover_until_with_nested_delims::<_, LexicalContextType::Default>( - input, - self, - TokenKind::Semicolon, - TokenAcceptanceThreshold(1u8), - ), - )?; - seq.elem_labeled( - NodeLabel::Semicolon, - self.parse_token_with_trivia::( - input, - TokenKind::Semicolon, - ), - )?; - seq.finish() - }) - .with_kind(RuleKind::DeleteStatement) - } - #[allow(unused_assignments, unused_parens)] fn do_while_statement(&self, input: &mut ParserContext<'_>) -> ParserResult { SequenceHelper::run(|mut seq| { @@ -2091,6 +2057,13 @@ impl Language { .with_label(NodeLabel::Operator); choice.consider(input, result)?; } + let result = self + .parse_token_with_trivia::( + input, + TokenKind::DeleteKeyword, + ) + .with_label(NodeLabel::Operator); + choice.consider(input, result)?; choice.finish(input) }), ) @@ -4373,8 +4346,6 @@ impl Language { choice.consider(input, result)?; let result = self.break_statement(input); choice.consider(input, result)?; - let result = self.delete_statement(input); - choice.consider(input, result)?; let result = self.return_statement(input); choice.consider(input, result)?; if !self.version_is_at_least_0_5_0 { @@ -8978,7 +8949,6 @@ impl Language { RuleKind::ContractMember => Self::contract_member.parse(self, input), RuleKind::ContractMembers => Self::contract_members.parse(self, input), RuleKind::DecimalNumberExpression => Self::decimal_number_expression.parse(self, input), - RuleKind::DeleteStatement => Self::delete_statement.parse(self, input), RuleKind::DoWhileStatement => Self::do_while_statement.parse(self, input), RuleKind::ElementaryType => Self::elementary_type.parse(self, input), RuleKind::ElseBranch => Self::else_branch.parse(self, input), diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/ast_selectors.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/ast_selectors.rs index 0b8684ffff..e041ce87e0 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/ast_selectors.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/ast_selectors.rs @@ -102,7 +102,6 @@ pub fn select_sequence( RuleKind::BreakStatement => selector.break_statement()?, RuleKind::ReturnStatement => selector.return_statement()?, RuleKind::EmitStatement => selector.emit_statement()?, - RuleKind::DeleteStatement => selector.delete_statement()?, RuleKind::TryStatement => selector.try_statement()?, RuleKind::CatchClause => selector.catch_clause()?, RuleKind::CatchClauseError => selector.catch_clause_error()?, @@ -947,16 +946,6 @@ impl Selector { } } -impl Selector { - fn delete_statement(&mut self) -> Result>> { - Ok(vec![ - Some(self.select(|node| node.is_token_with_kind(TokenKind::DeleteKeyword))?), - Some(self.select(|node| node.is_rule_with_kind(RuleKind::Expression))?), - Some(self.select(|node| node.is_token_with_kind(TokenKind::Semicolon))?), - ]) - } -} - impl Selector { fn try_statement(&mut self) -> Result>> { Ok(vec![ @@ -1875,7 +1864,6 @@ impl Selector { RuleKind::DoWhileStatement, RuleKind::ContinueStatement, RuleKind::BreakStatement, - RuleKind::DeleteStatement, RuleKind::ReturnStatement, RuleKind::ThrowStatement, RuleKind::EmitStatement, diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/delete_statement.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/delete_statement.rs deleted file mode 100644 index 04d6d47380..0000000000 --- a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/delete_statement.rs +++ /dev/null @@ -1,15 +0,0 @@ -// This file is generated automatically by infrastructure scripts. Please don't edit by hand. - -use anyhow::Result; - -use crate::cst_output::runner::run; - -#[test] -fn delete_identifier() -> Result<()> { - run("DeleteStatement", "delete_identifier") -} - -#[test] -fn delete_index() -> Result<()> { - run("DeleteStatement", "delete_index") -} diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/expression.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/expression.rs index 8ef483ab2b..f9266f5146 100644 --- a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/expression.rs +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/expression.rs @@ -34,6 +34,16 @@ fn areturn() -> Result<()> { run("Expression", "areturn") } +#[test] +fn delete() -> Result<()> { + run("Expression", "delete") +} + +#[test] +fn delete_conditional() -> Result<()> { + run("Expression", "delete_conditional") +} + #[test] fn function_call() -> Result<()> { run("Expression", "function_call") 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 62d0fc9aeb..94869902f0 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 @@ -10,7 +10,6 @@ mod constructor_definition; mod contract_definition; mod contract_members; mod decimal_number_expression; -mod delete_statement; mod enum_definition; mod error_definition; mod event_definition; diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/statements.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/statements.rs index 0a91987a8f..5bb8da5275 100644 --- a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/statements.rs +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/statements.rs @@ -14,6 +14,16 @@ fn contextual_keywords() -> Result<()> { run("Statements", "contextual_keywords") } +#[test] +fn delete_identifier() -> Result<()> { + run("Statements", "delete_identifier") +} + +#[test] +fn delete_index() -> Result<()> { + run("Statements", "delete_index") +} + #[test] fn invalid_termination() -> Result<()> { run("Statements", "invalid_termination") diff --git a/crates/solidity/outputs/npm/package/src/ast/generated/ast_types.ts b/crates/solidity/outputs/npm/package/src/ast/generated/ast_types.ts index 784dd163cd..204668e6ea 100644 --- a/crates/solidity/outputs/npm/package/src/ast/generated/ast_types.ts +++ b/crates/solidity/outputs/npm/package/src/ast/generated/ast_types.ts @@ -2265,34 +2265,6 @@ export class EmitStatement { } } -export class DeleteStatement { - private readonly fetch = once(() => { - const [$deleteKeyword, $expression, $semicolon] = ast_internal.selectSequence(this.cst); - - return { - deleteKeyword: $deleteKeyword as TokenNode, - expression: new Expression($expression as RuleNode), - semicolon: $semicolon as TokenNode, - }; - }); - - public constructor(public readonly cst: RuleNode) { - assertKind(this.cst.kind, RuleKind.DeleteStatement); - } - - public get deleteKeyword(): TokenNode { - return this.fetch().deleteKeyword; - } - - public get expression(): Expression { - return this.fetch().expression; - } - - public get semicolon(): TokenNode { - return this.fetch().semicolon; - } -} - export class TryStatement { private readonly fetch = once(() => { const [$tryKeyword, $expression, $returns, $body, $catchClauses] = ast_internal.selectSequence(this.cst); @@ -4498,7 +4470,6 @@ export class Statement { | DoWhileStatement | ContinueStatement | BreakStatement - | DeleteStatement | ReturnStatement | ThrowStatement | EmitStatement @@ -4528,8 +4499,6 @@ export class Statement { return new ContinueStatement(variant as RuleNode); case RuleKind.BreakStatement: return new BreakStatement(variant as RuleNode); - case RuleKind.DeleteStatement: - return new DeleteStatement(variant as RuleNode); case RuleKind.ReturnStatement: return new ReturnStatement(variant as RuleNode); case RuleKind.ThrowStatement: @@ -4566,7 +4535,6 @@ export class Statement { | DoWhileStatement | ContinueStatement | BreakStatement - | DeleteStatement | ReturnStatement | ThrowStatement | EmitStatement 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 3333f7a433..9d31b9bc2e 100644 --- a/crates/solidity/outputs/npm/package/src/generated/index.d.ts +++ b/crates/solidity/outputs/npm/package/src/generated/index.d.ts @@ -43,7 +43,6 @@ export namespace kinds { ContractMember = "ContractMember", ContractMembers = "ContractMembers", DecimalNumberExpression = "DecimalNumberExpression", - DeleteStatement = "DeleteStatement", DoWhileStatement = "DoWhileStatement", ElementaryType = "ElementaryType", ElseBranch = "ElseBranch", @@ -263,7 +262,6 @@ export namespace kinds { ContinueKeyword = "ContinueKeyword", ContractKeyword = "ContractKeyword", DefaultKeyword = "DefaultKeyword", - DeleteKeyword = "DeleteKeyword", DoKeyword = "DoKeyword", Elements = "Elements", ElseBranch = "ElseBranch", diff --git a/crates/solidity/outputs/spec/generated/grammar.ebnf b/crates/solidity/outputs/spec/generated/grammar.ebnf index df8d0e3256..b42ae3e7e2 100644 --- a/crates/solidity/outputs/spec/generated/grammar.ebnf +++ b/crates/solidity/outputs/spec/generated/grammar.ebnf @@ -940,7 +940,6 @@ Statement = ExpressionStatement | DoWhileStatement | ContinueStatement | BreakStatement - | DeleteStatement | ReturnStatement | ThrowStatement (* Deprecated in 0.5.0 *) | EmitStatement (* Introduced in 0.4.21 *) @@ -1066,10 +1065,6 @@ EmitStatement = EMIT_KEYWORD ArgumentsDeclaration SEMICOLON; -DeleteStatement = DELETE_KEYWORD - Expression - SEMICOLON; - (* 4.4. Error Handling: *) (* Introduced in 0.6.0 *) 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 e0e378d6ce..683b1aca07 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 = ExpressionStatement
| VariableDeclarationStatement
| TupleDeconstructionStatement
| IfStatement
| ForStatement
| WhileStatement
| DoWhileStatement
| ContinueStatement
| BreakStatement
| DeleteStatement
| ReturnStatement
| ThrowStatement (* Deprecated in 0.5.0 *)
| EmitStatement (* Introduced in 0.4.21 *)
| TryStatement (* Introduced in 0.6.0 *)
| RevertStatement (* Introduced in 0.8.4 *)
| AssemblyStatement
| Block
| UncheckedBlock; (* Introduced in 0.8.0 *)
+
Statement = ExpressionStatement
| VariableDeclarationStatement
| TupleDeconstructionStatement
| IfStatement
| ForStatement
| WhileStatement
| DoWhileStatement
| ContinueStatement
| BreakStatement
| ReturnStatement
| ThrowStatement (* Deprecated in 0.5.0 *)
| EmitStatement (* Introduced in 0.4.21 *)
| TryStatement (* Introduced in 0.6.0 *)
| RevertStatement (* Introduced in 0.8.4 *)
| AssemblyStatement
| Block
| UncheckedBlock; (* Introduced in 0.8.0 *)
```{ .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 152b64287a..11c9ba1893 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 @@ -70,10 +70,4 @@
(* Introduced in 0.4.21 *)
EmitStatement = EMIT_KEYWORD
IdentifierPath
ArgumentsDeclaration
SEMICOLON;
-```{ .ebnf #DeleteStatement } - -``` - -
DeleteStatement = DELETE_KEYWORD
Expression
SEMICOLON;
- --8<-- "crates/solidity/inputs/language/docs/04-statements/03-control-statements.md" diff --git a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.5.0-failure.yml index fbaa7f50d8..3880ee04b1 100644 --- a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.5.0-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Block/unchecked/input.sol:1:3] │ 1 │ { unchecked { x = 1; } } diff --git a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.5.3-failure.yml b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.5.3-failure.yml index 577faeda83..255bc8c418 100644 --- a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.5.3-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.5.3-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Block/unchecked/input.sol:1:3] │ 1 │ { unchecked { x = 1; } } diff --git a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.6.0-failure.yml index 3819069b53..1fabcbe606 100644 --- a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.6.0-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Block/unchecked/input.sol:1:3] │ 1 │ { unchecked { x = 1; } } diff --git a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.7.0-failure.yml index a5fc01f74f..91eb10977d 100644 --- a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.7.0-failure.yml @@ -5,7 +5,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Block/unchecked/input.sol:1:3] │ 1 │ { unchecked { x = 1; } } diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.5.0-failure.yml index 9585fab1a8..11782b4e49 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.5.0-failure.yml @@ -32,7 +32,7 @@ Errors: # 3 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/input.sol:10:3] │ 10 │ ╭─▶ unchecked { invalid sequence } diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.5.3-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.5.3-failure.yml index f30eeae838..ddfeeee68d 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.5.3-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.5.3-failure.yml @@ -32,7 +32,7 @@ Errors: # 3 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/input.sol:10:3] │ 10 │ ╭─▶ unchecked { invalid sequence } diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.6.0-failure.yml index 96013f344a..d85369e65e 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.6.0-failure.yml @@ -32,7 +32,7 @@ Errors: # 3 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/input.sol:10:3] │ 10 │ ╭─▶ unchecked { invalid sequence } diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.7.0-failure.yml index 933a87a497..0c76e32d46 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.7.0-failure.yml @@ -32,7 +32,7 @@ Errors: # 3 total │ ╰───────────────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/input.sol:10:3] │ 10 │ ╭─▶ unchecked { invalid sequence } diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.4.11-failure.yml index 32eee9b707..86a11c8efa 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.4.11-failure.yml @@ -18,7 +18,7 @@ Errors: # 2 total │ ╰──────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or ThrowKeyword or TrueKeyword or UfixedKeyword or UintKeyword or VarKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or ThrowKeyword or TrueKeyword or UfixedKeyword or UintKeyword or VarKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/input.sol:4:6] │ 4 │ }) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.4.21-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.4.21-failure.yml index f07433785b..230f27f601 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.4.21-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.4.21-failure.yml @@ -18,7 +18,7 @@ Errors: # 2 total │ ╰──────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or ThrowKeyword or TrueKeyword or UfixedKeyword or UintKeyword or VarKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or ThrowKeyword or TrueKeyword or UfixedKeyword or UintKeyword or VarKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/input.sol:4:6] │ 4 │ }) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.5.0-failure.yml index 52d499974b..e428d54796 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.5.0-failure.yml @@ -18,7 +18,7 @@ Errors: # 2 total │ ╰──────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/input.sol:4:6] │ 4 │ }) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.5.3-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.5.3-failure.yml index 637302c618..1a5173e1d3 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.5.3-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.5.3-failure.yml @@ -18,7 +18,7 @@ Errors: # 2 total │ ╰──────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/input.sol:4:6] │ 4 │ }) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.6.0-failure.yml index c397dc5619..9f41a2c64f 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.6.0-failure.yml @@ -18,7 +18,7 @@ Errors: # 2 total │ ╰──────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/input.sol:4:6] │ 4 │ }) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.7.0-failure.yml index f4833b187e..47d04f37a1 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.7.0-failure.yml @@ -18,7 +18,7 @@ Errors: # 2 total │ ╰──────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/input.sol:4:6] │ 4 │ }) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.8.0-failure.yml index 20493dec77..c5218cd8b7 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.8.0-failure.yml @@ -18,7 +18,7 @@ Errors: # 2 total │ ╰──────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or UncheckedKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or UncheckedKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/input.sol:4:6] │ 4 │ }) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.8.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.8.4-failure.yml index e6f4c90557..59bcf8f262 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.8.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/generated/0.8.4-failure.yml @@ -18,7 +18,7 @@ Errors: # 2 total │ ╰──────────── Error occurred here. ───╯ - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or RevertKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or UncheckedKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or RevertKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or UncheckedKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/ContractMembers/mismatched_delimiter/input.sol:4:6] │ 4 │ }) diff --git a/crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_identifier/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_identifier/generated/0.4.11-success.yml deleted file mode 100644 index 5439ea02d6..0000000000 --- a/crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_identifier/generated/0.4.11-success.yml +++ /dev/null @@ -1,14 +0,0 @@ -# This file is generated automatically by infrastructure scripts. Please don't edit by hand. - -Source: > - 1 │ delete foo; │ 0..11 - -Errors: [] - -Tree: - - (DeleteStatement): # "delete foo;" (0..11) - - (delete_keyword꞉ DeleteKeyword): "delete" # (0..6) - - (expression꞉ Expression): # " foo" (6..10) - - (leading_trivia꞉ Whitespace): " " # (6..7) - - (variant꞉ Identifier): "foo" # (7..10) - - (semicolon꞉ Semicolon): ";" # (10..11) diff --git a/crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_index/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_index/generated/0.4.11-success.yml deleted file mode 100644 index 1349c257f4..0000000000 --- a/crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_index/generated/0.4.11-success.yml +++ /dev/null @@ -1,18 +0,0 @@ -# This file is generated automatically by infrastructure scripts. Please don't edit by hand. - -Source: > - 1 │ delete foo[bar]; │ 0..16 - -Errors: [] - -Tree: - - (DeleteStatement): # "delete foo[bar];" (0..16) - - (delete_keyword꞉ DeleteKeyword): "delete" # (0..6) - - (expression꞉ Expression) ► (variant꞉ IndexAccessExpression): # " foo[bar]" (6..15) - - (operand꞉ Expression): # " foo" (6..10) - - (leading_trivia꞉ Whitespace): " " # (6..7) - - (variant꞉ Identifier): "foo" # (7..10) - - (open_bracket꞉ OpenBracket): "[" # (10..11) - - (start꞉ Expression) ► (variant꞉ Identifier): "bar" # (11..14) - - (close_bracket꞉ CloseBracket): "]" # (14..15) - - (semicolon꞉ Semicolon): ";" # (15..16) diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/delete/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/Expression/delete/generated/0.4.11-success.yml new file mode 100644 index 0000000000..896f946ffe --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/Expression/delete/generated/0.4.11-success.yml @@ -0,0 +1,18 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ delete obj[slot] │ 0..16 + +Errors: [] + +Tree: + - (Expression) ► (variant꞉ PrefixExpression): # "delete obj[slot]\n" (0..17) + - (operator꞉ DeleteKeyword): "delete" # (0..6) + - (operand꞉ Expression) ► (variant꞉ IndexAccessExpression): # " obj[slot]\n" (6..17) + - (operand꞉ Expression): # " obj" (6..10) + - (leading_trivia꞉ Whitespace): " " # (6..7) + - (variant꞉ Identifier): "obj" # (7..10) + - (open_bracket꞉ OpenBracket): "[" # (10..11) + - (start꞉ Expression) ► (variant꞉ Identifier): "slot" # (11..15) + - (close_bracket꞉ CloseBracket): "]" # (15..16) + - (trailing_trivia꞉ EndOfLine): "\n" # (16..17) diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/delete/input.sol b/crates/solidity/testing/snapshots/cst_output/Expression/delete/input.sol new file mode 100644 index 0000000000..2239fa0bf7 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/Expression/delete/input.sol @@ -0,0 +1 @@ +delete obj[slot] diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/delete_conditional/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/Expression/delete_conditional/generated/0.4.11-success.yml new file mode 100644 index 0000000000..ec62975df8 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/Expression/delete_conditional/generated/0.4.11-success.yml @@ -0,0 +1,35 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ cond ? delete obj[slot1] : delete obj[slot2] │ 0..44 + +Errors: [] + +Tree: + - (Expression) ► (variant꞉ ConditionalExpression): # "cond ? delete obj[slot1] : delete obj[slot2]\n" (0..45) + - (operand꞉ Expression) ► (variant꞉ Identifier): "cond" # (0..4) + - (leading_trivia꞉ Whitespace): " " # (4..5) + - (question_mark꞉ QuestionMark): "?" # (5..6) + - (true_expression꞉ Expression) ► (variant꞉ PrefixExpression): # " delete obj[slot1]" (6..24) + - (leading_trivia꞉ Whitespace): " " # (6..7) + - (operator꞉ DeleteKeyword): "delete" # (7..13) + - (operand꞉ Expression) ► (variant꞉ IndexAccessExpression): # " obj[slot1]" (13..24) + - (operand꞉ Expression): # " obj" (13..17) + - (leading_trivia꞉ Whitespace): " " # (13..14) + - (variant꞉ Identifier): "obj" # (14..17) + - (open_bracket꞉ OpenBracket): "[" # (17..18) + - (start꞉ Expression) ► (variant꞉ Identifier): "slot1" # (18..23) + - (close_bracket꞉ CloseBracket): "]" # (23..24) + - (leading_trivia꞉ Whitespace): " " # (24..25) + - (colon꞉ Colon): ":" # (25..26) + - (false_expression꞉ Expression) ► (variant꞉ PrefixExpression): # " delete obj[slot2]\n" (26..45) + - (leading_trivia꞉ Whitespace): " " # (26..27) + - (operator꞉ DeleteKeyword): "delete" # (27..33) + - (operand꞉ Expression) ► (variant꞉ IndexAccessExpression): # " obj[slot2]\n" (33..45) + - (operand꞉ Expression): # " obj" (33..37) + - (leading_trivia꞉ Whitespace): " " # (33..34) + - (variant꞉ Identifier): "obj" # (34..37) + - (open_bracket꞉ OpenBracket): "[" # (37..38) + - (start꞉ Expression) ► (variant꞉ Identifier): "slot2" # (38..43) + - (close_bracket꞉ CloseBracket): "]" # (43..44) + - (trailing_trivia꞉ EndOfLine): "\n" # (44..45) diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/delete_conditional/input.sol b/crates/solidity/testing/snapshots/cst_output/Expression/delete_conditional/input.sol new file mode 100644 index 0000000000..742be73cb5 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/Expression/delete_conditional/input.sol @@ -0,0 +1 @@ +cond ? delete obj[slot1] : delete obj[slot2] diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.5.0-failure.yml index 8f115486f9..1cf67e0c51 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.5.0-failure.yml @@ -13,7 +13,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/input.sol:3:5] │ 3 │ ╭─▶ unchecked { diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.5.3-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.5.3-failure.yml index 56c13132fb..3bd3ce5efd 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.5.3-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.5.3-failure.yml @@ -13,7 +13,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/input.sol:3:5] │ 3 │ ╭─▶ unchecked { diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.6.0-failure.yml index 89cc3643b9..a674c589f3 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.6.0-failure.yml @@ -13,7 +13,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/input.sol:3:5] │ 3 │ ╭─▶ unchecked { diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.7.0-failure.yml index c56ae87f7b..72f06a8649 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/generated/0.7.0-failure.yml @@ -13,7 +13,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/SourceUnit/safe_math/input.sol:3:5] │ 3 │ ╭─▶ unchecked { diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/delete_identifier/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/Statements/delete_identifier/generated/0.4.11-success.yml new file mode 100644 index 0000000000..e237d22361 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/Statements/delete_identifier/generated/0.4.11-success.yml @@ -0,0 +1,16 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ delete foo; │ 0..11 + +Errors: [] + +Tree: + - (Statements): # "delete foo;" (0..11) + - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # "delete foo;" (0..11) + - (expression꞉ Expression) ► (variant꞉ PrefixExpression): # "delete foo" (0..10) + - (operator꞉ DeleteKeyword): "delete" # (0..6) + - (operand꞉ Expression): # " foo" (6..10) + - (leading_trivia꞉ Whitespace): " " # (6..7) + - (variant꞉ Identifier): "foo" # (7..10) + - (semicolon꞉ Semicolon): ";" # (10..11) diff --git a/crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_identifier/input.sol b/crates/solidity/testing/snapshots/cst_output/Statements/delete_identifier/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_identifier/input.sol rename to crates/solidity/testing/snapshots/cst_output/Statements/delete_identifier/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/delete_index/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/Statements/delete_index/generated/0.4.11-success.yml new file mode 100644 index 0000000000..a1ae8b2da0 --- /dev/null +++ b/crates/solidity/testing/snapshots/cst_output/Statements/delete_index/generated/0.4.11-success.yml @@ -0,0 +1,20 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Source: > + 1 │ delete foo[bar]; │ 0..16 + +Errors: [] + +Tree: + - (Statements): # "delete foo[bar];" (0..16) + - (item꞉ Statement) ► (variant꞉ ExpressionStatement): # "delete foo[bar];" (0..16) + - (expression꞉ Expression) ► (variant꞉ PrefixExpression): # "delete foo[bar]" (0..15) + - (operator꞉ DeleteKeyword): "delete" # (0..6) + - (operand꞉ Expression) ► (variant꞉ IndexAccessExpression): # " foo[bar]" (6..15) + - (operand꞉ Expression): # " foo" (6..10) + - (leading_trivia꞉ Whitespace): " " # (6..7) + - (variant꞉ Identifier): "foo" # (7..10) + - (open_bracket꞉ OpenBracket): "[" # (10..11) + - (start꞉ Expression) ► (variant꞉ Identifier): "bar" # (11..14) + - (close_bracket꞉ CloseBracket): "]" # (14..15) + - (semicolon꞉ Semicolon): ";" # (15..16) diff --git a/crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_index/input.sol b/crates/solidity/testing/snapshots/cst_output/Statements/delete_index/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/DeleteStatement/delete_index/input.sol rename to crates/solidity/testing/snapshots/cst_output/Statements/delete_index/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.5.0-failure.yml index 7015fe0d61..2f0471107a 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.5.0-failure.yml @@ -7,7 +7,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ 2 │ ╭─▶ throw invalid ; diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.5.3-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.5.3-failure.yml index 1b5253832c..176f9c7538 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.5.3-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.5.3-failure.yml @@ -7,7 +7,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ 2 │ ╭─▶ throw invalid ; diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.6.0-failure.yml index 77a2eb08d8..55d62e492e 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.6.0-failure.yml @@ -7,7 +7,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ 2 │ ╭─▶ throw invalid ; diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.7.0-failure.yml index ee763a529c..8b56b646b6 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.7.0-failure.yml @@ -7,7 +7,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ 2 │ ╭─▶ throw invalid ; diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.8.0-failure.yml index 1422db0eab..ffe389d225 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.8.0-failure.yml @@ -7,7 +7,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or UncheckedKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or UncheckedKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ 2 │ ╭─▶ throw invalid ; diff --git a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.8.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.8.4-failure.yml index c3c061d02d..e0156a1ca7 100644 --- a/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.8.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/generated/0.8.4-failure.yml @@ -7,7 +7,7 @@ Source: > Errors: # 1 total - > - Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DeleteKeyword or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or RevertKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or UncheckedKeyword or WhileKeyword. + Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or BytesKeyword or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or DoubleQuotedUnicodeStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or PayableKeyword or ReturnKeyword or RevertKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or SingleQuotedUnicodeStringLiteral or StringKeyword or TrueKeyword or TryKeyword or TypeKeyword or UfixedKeyword or UintKeyword or UncheckedKeyword or WhileKeyword. ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ 2 │ ╭─▶ throw invalid ;