From c9bad5d6da7bb45a271503fb958e6a0fbc1bab80 Mon Sep 17 00:00:00 2001 From: OmarTawfik <15987992+OmarTawfik@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:41:46 -0800 Subject: [PATCH] bring back `allow_empty` to DSL Closes #814 --- crates/codegen/ebnf/src/builder.rs | 14 +- crates/codegen/grammar/src/constructor.rs | 20 +- .../src/compiler/analysis/references.rs | 2 + .../src/model/non_terminals/repeated.rs | 2 + .../src/model/non_terminals/separated.rs | 2 + .../templates/ast_selectors.rs.jinja2 | 28 +- .../inputs/language/src/definition.rs | 142 ++++-- .../slang_solidity/src/generated/language.rs | 173 ++++---- .../generated/napi_interface/ast_selectors.rs | 420 +++++++++++------- .../src/doc_examples/using_the_parser.rs | 5 +- .../package/src/ast/generated/ast_types.ts | 92 ++-- .../src/doc-examples/using-the-parser.ts | 5 +- .../outputs/spec/generated/grammar.ebnf | 90 ++-- .../01-file-structure/02-source-unit.md | 4 +- .../public/02-definitions/01-contracts.md | 4 +- .../public/02-definitions/02-interfaces.md | 4 +- .../public/02-definitions/03-libraries.md | 4 +- .../public/02-definitions/04-structs.md | 4 +- .../public/02-definitions/05-enums.md | 4 +- .../02-definitions/07-state-variables.md | 4 +- .../public/02-definitions/08-functions.md | 24 +- .../public/02-definitions/09-modifiers.md | 4 +- .../public/02-definitions/10-events.md | 4 +- .../public/02-definitions/12-errors.md | 4 +- .../public/03-types/01-advanced-types.md | 4 +- .../public/04-statements/01-blocks.md | 4 +- .../05-expressions/02-function-calls.md | 8 +- .../public/06-yul/01-yul-statements.md | 8 +- .../public/06-yul/02-yul-expressions.md | 2 +- .../simple/generated/0.4.11-success.yml | 1 + .../unchecked/generated/0.5.0-failure.yml | 1 + .../unchecked/generated/0.5.3-failure.yml | 1 + .../unchecked/generated/0.6.0-failure.yml | 1 + .../unchecked/generated/0.7.0-failure.yml | 1 + .../generated/0.4.22-success.yml | 2 + .../generated/0.5.0-failure.yml | 2 + .../generated/0.6.0-success.yml | 2 + .../generated/0.6.7-failure.yml | 2 + .../simple/generated/0.4.22-success.yml | 3 + .../generated/0.4.22-success.yml | 2 + .../generated/0.6.0-success.yml | 2 + .../generated/0.6.7-failure.yml | 2 + .../generated/0.6.0-success.yml | 1 + .../generated/0.4.11-failure.yml | 8 +- .../generated/0.4.22-success.yml | 4 + .../generated/0.5.0-failure.yml | 4 + .../generated/0.4.11-failure.yml | 2 + .../generated/0.4.21-success.yml | 3 + .../generated/0.5.0-failure.yml | 3 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-failure.yml | 8 +- .../generated/0.4.22-success.yml | 2 + .../generated/0.4.11-failure.yml | 1 + .../generated/0.8.4-success.yml | 1 + .../generated/0.4.11-failure.yml | 8 +- .../generated/0.6.0-success.yml | 3 + .../generated/0.4.11-success.yml | 2 + .../generated/0.4.11-success.yml | 2 + .../generated/0.4.11-failure.yml | 8 +- .../generated/0.6.0-success.yml | 3 + .../generated/0.4.11-success.yml | 3 + .../generated/0.6.0-failure.yml | 3 + .../generated/0.6.5-failure.yml | 3 + .../generated/0.4.11-success.yml | 2 + .../generated/0.6.0-failure.yml | 2 + .../generated/0.6.5-failure.yml | 2 + .../generated/0.4.11-failure.yml | 1 + .../generated/0.4.22-failure.yml | 1 + .../generated/0.6.0-failure.yml | 1 + .../generated/0.8.0-failure.yml | 1 + .../generated/0.8.4-failure.yml | 1 + .../generated/0.4.11-failure.yml | 1 + .../generated/0.6.5-failure.yml | 1 + .../generated/0.4.11-failure.yml | 2 + .../generated/0.5.0-failure.yml | 2 + .../generated/0.5.3-failure.yml | 2 + .../generated/0.6.0-failure.yml | 2 + .../generated/0.7.0-failure.yml | 2 + .../generated/0.8.0-failure.yml | 2 + .../generated/0.4.11-failure.yml | 1 + .../generated/0.4.22-failure.yml | 1 + .../generated/0.6.0-failure.yml | 1 + .../generated/0.8.0-failure.yml | 1 + .../generated/0.8.4-failure.yml | 1 + .../generated/0.8.8-failure.yml | 1 + .../constructor/generated/0.4.11-failure.yml | 6 +- .../constructor/generated/0.4.22-success.yml | 2 + .../generated/0.4.11-success.yml | 2 + .../generated/0.4.11-failure.yml | 1 + .../generated/0.4.21-failure.yml | 1 + .../generated/0.5.0-failure.yml | 1 + .../generated/0.5.3-failure.yml | 1 + .../generated/0.6.0-failure.yml | 1 + .../generated/0.7.0-failure.yml | 1 + .../generated/0.8.0-failure.yml | 1 + .../generated/0.8.4-failure.yml | 1 + .../generated/0.4.11-failure.yml | 4 + .../generated/0.5.0-failure.yml | 4 + .../generated/0.6.2-failure.yml | 10 + .../generated/0.7.0-failure.yml | 10 + .../generated/0.8.0-failure.yml | 10 + .../no_members/generated/0.4.11-success.yml | 1 + .../top_level/generated/0.8.4-success.yml | 1 + .../generated/0.4.11-success.yml | 2 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../simple/generated/0.6.0-success.yml | 3 + .../generated/0.4.11-success.yml | 2 + .../generated/0.5.0-failure.yml | 2 + .../overridden/generated/0.4.11-success.yml | 1 + .../overridden/generated/0.5.0-success.yml | 1 + .../overridden/generated/0.6.0-success.yml | 1 + .../generated/0.4.11-success.yml | 2 + .../simple/generated/0.6.0-success.yml | 3 + .../empty_file/generated/0.4.11-success.yml | 2 +- .../generated/0.4.11-success.yml | 8 +- .../generated/0.4.11-success.yml | 8 +- .../generated/0.4.11-success.yml | 8 +- .../generated/0.4.11-success.yml | 8 +- .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-failure.yml | 1 + .../generated/0.6.0-failure.yml | 1 + .../generated/0.7.1-failure.yml | 1 + .../generated/0.7.4-failure.yml | 1 + .../generated/0.8.0-failure.yml | 1 + .../generated/0.8.13-failure.yml | 1 + .../generated/0.8.22-failure.yml | 1 + .../generated/0.8.4-failure.yml | 1 + .../generated/0.8.8-failure.yml | 1 + .../generated/0.4.11-failure.yml | 1 + .../generated/0.6.0-failure.yml | 1 + .../generated/0.7.1-failure.yml | 1 + .../generated/0.7.4-failure.yml | 1 + .../everything/generated/0.8.13-failure.yml | 7 + .../everything/generated/0.8.22-success.yml | 7 + .../safe_math/generated/0.5.0-failure.yml | 1 + .../safe_math/generated/0.5.3-failure.yml | 1 + .../safe_math/generated/0.6.0-failure.yml | 1 + .../safe_math/generated/0.7.0-failure.yml | 1 + .../generated/0.4.11-failure.yml | 4 +- .../generated/0.6.0-failure.yml | 4 +- .../generated/0.7.1-failure.yml | 4 +- .../generated/0.7.4-failure.yml | 4 +- .../generated/0.8.0-failure.yml | 4 +- .../generated/0.8.13-failure.yml | 4 +- .../generated/0.8.4-failure.yml | 4 +- .../generated/0.8.8-failure.yml | 4 +- .../generated/0.4.11-failure.yml | 4 +- .../generated/0.6.0-failure.yml | 4 +- .../generated/0.7.1-success.yml | 3 + .../generated/0.4.11-success.yml | 2 + .../generated/0.5.0-failure.yml | 9 +- .../generated/0.5.3-failure.yml | 9 +- .../generated/0.6.0-failure.yml | 9 +- .../generated/0.7.0-failure.yml | 9 +- .../generated/0.8.0-failure.yml | 9 +- .../generated/0.8.4-failure.yml | 9 +- .../no_members/generated/0.4.11-success.yml | 1 + .../try_catch/generated/0.6.0-success.yml | 3 + .../generated/0.6.2-failure.yml | 1 + .../generated/0.8.0-failure.yml | 1 + .../generated/0.4.11-success.yml | 2 + .../generated/0.5.0-failure.yml | 2 + .../generated/0.4.11-success.yml | 2 + .../generated/0.5.0-failure.yml | 2 + .../generated/0.4.11-success.yml | 2 + .../generated/0.5.0-failure.yml | 2 + .../built_in_add/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_and/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.8.7-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.12-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_div/generated/0.4.11-success.yml | 1 + .../built_in_eq/generated/0.4.11-success.yml | 1 + .../built_in_exp/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.5.0-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_gas/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_gt/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.12-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_lt/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_mod/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_mul/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_not/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_or/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_pop/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.8.18-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.12-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.12-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_sar/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_sgt/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_sha3/generated/0.5.0-success.yml | 1 + .../built_in_shl/generated/0.4.11-success.yml | 1 + .../built_in_shr/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_slt/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.4.12-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_sub/generated/0.4.11-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../generated/0.5.0-success.yml | 1 + .../generated/0.4.11-success.yml | 1 + .../built_in_xor/generated/0.4.11-success.yml | 1 + .../generated/napi_interface/ast_selectors.rs | 16 +- 257 files changed, 1043 insertions(+), 533 deletions(-) diff --git a/crates/codegen/ebnf/src/builder.rs b/crates/codegen/ebnf/src/builder.rs index 54afa09f58..3acc989c8d 100644 --- a/crates/codegen/ebnf/src/builder.rs +++ b/crates/codegen/ebnf/src/builder.rs @@ -145,12 +145,17 @@ impl Builder { let RepeatedItem { name, reference, + allow_empty, enabled, } = repeated_item; self.add_entry(name, Terminal::No, Inlined::No); - let expression = Expression::new_one_or_more(Self::build_ref(reference).into()); + let expression = if allow_empty.unwrap_or_default() { + Expression::new_zero_or_more(Self::build_ref(reference).into()) + } else { + Expression::new_one_or_more(Self::build_ref(reference).into()) + }; self.add_definition( name, @@ -165,12 +170,13 @@ impl Builder { name, reference, separator, + allow_empty, enabled, } = separated_item; self.add_entry(name, Terminal::No, Inlined::No); - let expression = Expression::new_sequence(vec![ + let mut expression = Expression::new_sequence(vec![ Self::build_ref(reference), Expression::new_zero_or_more( Expression::new_sequence(vec![ @@ -181,6 +187,10 @@ impl Builder { ), ]); + if allow_empty.unwrap_or_default() { + expression = Expression::new_optional(expression.into()); + } + self.add_definition( name, Self::build_enabled_comment(enabled), diff --git a/crates/codegen/grammar/src/constructor.rs b/crates/codegen/grammar/src/constructor.rs index 96cf095c2c..0209e8e560 100644 --- a/crates/codegen/grammar/src/constructor.rs +++ b/crates/codegen/grammar/src/constructor.rs @@ -658,19 +658,29 @@ fn resolve_choice(item: model::EnumItem, ctx: &mut ResolveCtx<'_>) -> ParserDefi fn resolve_repeated(item: model::RepeatedItem, ctx: &mut ResolveCtx<'_>) -> ParserDefinitionNode { let reference = Box::new(resolve_grammar_element(&item.reference, ctx).into_parser_def_node()); - ParserDefinitionNode::OneOrMore(Labeled::with_builtin_label(BuiltInLabel::Item, reference)) - .versioned(item.enabled) + let repeated = Labeled::with_builtin_label(BuiltInLabel::Item, reference); + + if item.allow_empty.unwrap_or_default() { + ParserDefinitionNode::ZeroOrMore(repeated).versioned(item.enabled) + } else { + ParserDefinitionNode::OneOrMore(repeated).versioned(item.enabled) + } } fn resolve_separated(item: model::SeparatedItem, ctx: &mut ResolveCtx<'_>) -> ParserDefinitionNode { let reference = resolve_grammar_element(&item.reference, ctx).into_parser_def_node(); let separator = resolve_grammar_element(&item.separator, ctx).into_parser_def_node(); - ParserDefinitionNode::SeparatedBy( + let separated = ParserDefinitionNode::SeparatedBy( Labeled::with_builtin_label(BuiltInLabel::Item, Box::new(reference)), Labeled::with_builtin_label(BuiltInLabel::Separator, Box::new(separator)), - ) - .versioned(item.enabled) + ); + + if item.allow_empty.unwrap_or_default() { + ParserDefinitionNode::Optional(Box::new(separated)).versioned(item.enabled) + } else { + separated.versioned(item.enabled) + } } fn resolve_precedence( diff --git a/crates/codegen/language/definition/src/compiler/analysis/references.rs b/crates/codegen/language/definition/src/compiler/analysis/references.rs index 413cb9ffff..be545cf647 100644 --- a/crates/codegen/language/definition/src/compiler/analysis/references.rs +++ b/crates/codegen/language/definition/src/compiler/analysis/references.rs @@ -115,6 +115,7 @@ fn check_repeated(analysis: &mut Analysis, item: &SpannedRepeatedItem, enablemen let SpannedRepeatedItem { name, reference, + allow_empty: _, enabled, } = item; @@ -136,6 +137,7 @@ fn check_separated(analysis: &mut Analysis, item: &SpannedSeparatedItem, enablem name, reference, separator, + allow_empty: _, enabled, } = item; diff --git a/crates/codegen/language/definition/src/model/non_terminals/repeated.rs b/crates/codegen/language/definition/src/model/non_terminals/repeated.rs index d7778fa8dc..b8653d0a9b 100644 --- a/crates/codegen/language/definition/src/model/non_terminals/repeated.rs +++ b/crates/codegen/language/definition/src/model/non_terminals/repeated.rs @@ -10,4 +10,6 @@ pub struct RepeatedItem { pub reference: Identifier, pub enabled: Option, + + pub allow_empty: Option, } diff --git a/crates/codegen/language/definition/src/model/non_terminals/separated.rs b/crates/codegen/language/definition/src/model/non_terminals/separated.rs index 55f8768ebe..b91ec324c8 100644 --- a/crates/codegen/language/definition/src/model/non_terminals/separated.rs +++ b/crates/codegen/language/definition/src/model/non_terminals/separated.rs @@ -11,4 +11,6 @@ pub struct SeparatedItem { pub separator: Identifier, pub enabled: Option, + + pub allow_empty: Option, } diff --git a/crates/codegen/parser/runtime/src/napi_interface/templates/ast_selectors.rs.jinja2 b/crates/codegen/parser/runtime/src/napi_interface/templates/ast_selectors.rs.jinja2 index 68c809f870..1216bc8cf0 100644 --- a/crates/codegen/parser/runtime/src/napi_interface/templates/ast_selectors.rs.jinja2 +++ b/crates/codegen/parser/runtime/src/napi_interface/templates/ast_selectors.rs.jinja2 @@ -221,24 +221,26 @@ pub fn select_separated( let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| { + if let Some(first) = self.try_select(|node| { {%- if separated.is_terminal -%} node.is_token_with_kind(TokenKind::{{ separated.reference }}) {%- else -%} node.is_rule_with_kind(RuleKind::{{ separated.reference }}) {%- endif -%} - })?); - - while let Some(separator) = self.try_select(|node| node.is_token_with_kind(TokenKind::{{ separated.separator }}))? { - separators.push(separator); - - separated.push(self.select(|node| { - {%- if separated.is_terminal -%} - node.is_token_with_kind(TokenKind::{{ separated.reference }}) - {%- else -%} - node.is_rule_with_kind(RuleKind::{{ separated.reference }}) - {%- endif -%} - })?); + })? { + separated.push(first); + + while let Some(separator) = self.try_select(|node| node.is_token_with_kind(TokenKind::{{ separated.separator }}))? { + separators.push(separator); + + separated.push(self.select(|node| { + {%- if separated.is_terminal -%} + node.is_token_with_kind(TokenKind::{{ separated.reference }}) + {%- else -%} + node.is_rule_with_kind(RuleKind::{{ separated.reference }}) + {%- endif -%} + })?); + } } Ok(vec![separated, separators]) diff --git a/crates/solidity/inputs/language/src/definition.rs b/crates/solidity/inputs/language/src/definition.rs index 16948a4bf8..9a59d3468a 100644 --- a/crates/solidity/inputs/language/src/definition.rs +++ b/crates/solidity/inputs/language/src/definition.rs @@ -40,9 +40,13 @@ codegen_language_macros::compile!(Language( items = [ Struct( name = SourceUnit, - fields = (members = Optional(reference = SourceUnitMembers)) + fields = (members = Required(SourceUnitMembers)) + ), + Repeated( + name = SourceUnitMembers, + reference = SourceUnitMember, + allow_empty = true ), - Repeated(name = SourceUnitMembers, reference = SourceUnitMember), Enum( name = SourceUnitMember, variants = [ @@ -2036,7 +2040,7 @@ codegen_language_macros::compile!(Language( name = Required(Identifier), inheritence = Optional(reference = InheritanceSpecifier), open_brace = Required(OpenBrace), - members = Optional(reference = ContractMembers), + members = Required(ContractMembers), close_brace = Required(CloseBrace) ) ), @@ -2059,7 +2063,11 @@ codegen_language_macros::compile!(Language( arguments = Optional(reference = ArgumentsDeclaration) ) ), - Repeated(name = ContractMembers, reference = ContractMember), + Repeated( + name = ContractMembers, + reference = ContractMember, + allow_empty = true + ), Enum( name = ContractMember, variants = [ @@ -2109,11 +2117,15 @@ codegen_language_macros::compile!(Language( name = Required(Identifier), inheritence = Optional(reference = InheritanceSpecifier), open_brace = Required(OpenBrace), - members = Optional(reference = InterfaceMembers), + members = Required(InterfaceMembers), close_brace = Required(CloseBrace) ) ), - Repeated(name = InterfaceMembers, reference = ContractMember) + Repeated( + name = InterfaceMembers, + reference = ContractMember, + allow_empty = true + ) ] ), Topic( @@ -2129,11 +2141,15 @@ codegen_language_macros::compile!(Language( library_keyword = Required(LibraryKeyword), name = Required(Identifier), open_brace = Required(OpenBrace), - members = Optional(reference = LibraryMembers), + members = Required(LibraryMembers), close_brace = Required(CloseBrace) ) ), - Repeated(name = LibraryMembers, reference = ContractMember) + Repeated( + name = LibraryMembers, + reference = ContractMember, + allow_empty = true + ) ] ), Topic( @@ -2149,11 +2165,15 @@ codegen_language_macros::compile!(Language( struct_keyword = Required(StructKeyword), name = Required(Identifier), open_brace = Required(OpenBrace), - members = Optional(reference = StructMembers), + members = Required(StructMembers), close_brace = Required(CloseBrace) ) ), - Repeated(name = StructMembers, reference = StructMember), + Repeated( + name = StructMembers, + reference = StructMember, + allow_empty = true + ), Struct( name = StructMember, error_recovery = FieldsErrorRecovery(terminator = semicolon), @@ -2178,14 +2198,15 @@ codegen_language_macros::compile!(Language( enum_keyword = Required(EnumKeyword), name = Required(Identifier), open_brace = Required(OpenBrace), - members = Optional(reference = EnumMembers), + members = Required(EnumMembers), close_brace = Required(CloseBrace) ) ), Separated( name = EnumMembers, reference = Identifier, - separator = Comma + separator = Comma, + allow_empty = true ) ] ), @@ -2213,7 +2234,7 @@ codegen_language_macros::compile!(Language( error_recovery = FieldsErrorRecovery(terminator = semicolon), fields = ( type_name = Required(TypeName), - attributes = Optional(reference = StateVariableAttributes), + attributes = Required(StateVariableAttributes), name = Required(Identifier), value = Optional(reference = StateVariableDefinitionValue), semicolon = Required(Semicolon) @@ -2225,7 +2246,8 @@ codegen_language_macros::compile!(Language( ), Repeated( name = StateVariableAttributes, - reference = StateVariableAttribute + reference = StateVariableAttribute, + allow_empty = true ), Enum( name = StateVariableAttribute, @@ -2249,7 +2271,7 @@ codegen_language_macros::compile!(Language( function_keyword = Required(FunctionKeyword), name = Required(FunctionName), parameters = Required(ParametersDeclaration), - attributes = Optional(reference = FunctionAttributes), + attributes = Required(FunctionAttributes), returns = Optional(reference = ReturnsDeclaration), body = Required(FunctionBody) ) @@ -2270,11 +2292,16 @@ codegen_language_macros::compile!(Language( ), fields = ( open_paren = Required(OpenParen), - parameters = Optional(reference = Parameters), + parameters = Required(Parameters), close_paren = Required(CloseParen) ) ), - Separated(name = Parameters, reference = Parameter, separator = Comma), + Separated( + name = Parameters, + reference = Parameter, + separator = Comma, + allow_empty = true + ), Struct( name = Parameter, fields = ( @@ -2283,7 +2310,11 @@ codegen_language_macros::compile!(Language( name = Optional(reference = Identifier) ) ), - Repeated(name = FunctionAttributes, reference = FunctionAttribute), + Repeated( + name = FunctionAttributes, + reference = FunctionAttribute, + allow_empty = true + ), Enum( name = FunctionAttribute, variants = [ @@ -2344,14 +2375,15 @@ codegen_language_macros::compile!(Language( fields = ( constructor_keyword = Required(ConstructorKeyword), parameters = Required(ParametersDeclaration), - attributes = Optional(reference = ConstructorAttributes), + attributes = Required(ConstructorAttributes), body = Required(Block) ) ), Repeated( name = ConstructorAttributes, reference = ConstructorAttribute, - enabled = From("0.4.22") + enabled = From("0.4.22"), + allow_empty = true ), Enum( name = ConstructorAttribute, @@ -2377,14 +2409,15 @@ codegen_language_macros::compile!(Language( fields = ( function_keyword = Required(FunctionKeyword), parameters = Required(ParametersDeclaration), - attributes = Optional(reference = UnnamedFunctionAttributes), + attributes = Required(UnnamedFunctionAttributes), body = Required(FunctionBody) ) ), Repeated( name = UnnamedFunctionAttributes, reference = UnnamedFunctionAttribute, - enabled = Till("0.6.0") + enabled = Till("0.6.0"), + allow_empty = true ), Enum( name = UnnamedFunctionAttribute, @@ -2407,7 +2440,7 @@ codegen_language_macros::compile!(Language( fields = ( fallback_keyword = Required(FallbackKeyword), parameters = Required(ParametersDeclaration), - attributes = Optional(reference = FallbackFunctionAttributes), + attributes = Required(FallbackFunctionAttributes), returns = Optional(reference = ReturnsDeclaration), body = Required(FunctionBody) ) @@ -2415,7 +2448,8 @@ codegen_language_macros::compile!(Language( Repeated( name = FallbackFunctionAttributes, reference = FallbackFunctionAttribute, - enabled = From("0.6.0") + enabled = From("0.6.0"), + allow_empty = true ), Enum( name = FallbackFunctionAttribute, @@ -2436,14 +2470,15 @@ codegen_language_macros::compile!(Language( fields = ( receive_keyword = Required(ReceiveKeyword), parameters = Required(ParametersDeclaration), - attributes = Optional(reference = ReceiveFunctionAttributes), + attributes = Required(ReceiveFunctionAttributes), body = Required(FunctionBody) ) ), Repeated( name = ReceiveFunctionAttributes, reference = ReceiveFunctionAttribute, - enabled = From("0.6.0") + enabled = From("0.6.0"), + allow_empty = true ), Enum( name = ReceiveFunctionAttribute, @@ -2467,11 +2502,15 @@ codegen_language_macros::compile!(Language( modifier_keyword = Required(ModifierKeyword), name = Required(Identifier), parameters = Optional(reference = ParametersDeclaration), - attributes = Optional(reference = ModifierAttributes), + attributes = Required(ModifierAttributes), body = Required(FunctionBody) ) ), - Repeated(name = ModifierAttributes, reference = ModifierAttribute), + Repeated( + name = ModifierAttributes, + reference = ModifierAttribute, + allow_empty = true + ), Enum( name = ModifierAttribute, variants = [ @@ -2510,14 +2549,15 @@ codegen_language_macros::compile!(Language( ), fields = ( open_paren = Required(OpenParen), - parameters = Optional(reference = EventParameters), + parameters = Required(EventParameters), close_paren = Required(CloseParen) ) ), Separated( name = EventParameters, reference = EventParameter, - separator = Comma + separator = Comma, + allow_empty = true ), Struct( name = EventParameter, @@ -2567,7 +2607,7 @@ codegen_language_macros::compile!(Language( ), fields = ( open_paren = Required(OpenParen), - parameters = Optional(reference = ErrorParameters), + parameters = Required(ErrorParameters), close_paren = Required(CloseParen) ) ), @@ -2575,7 +2615,8 @@ codegen_language_macros::compile!(Language( name = ErrorParameters, reference = ErrorParameter, separator = Comma, - enabled = From("0.8.4") + enabled = From("0.8.4"), + allow_empty = true ), Struct( name = ErrorParameter, @@ -2626,13 +2667,14 @@ codegen_language_macros::compile!(Language( fields = ( function_keyword = Required(FunctionKeyword), parameters = Required(ParametersDeclaration), - attributes = Optional(reference = FunctionTypeAttributes), + attributes = Required(FunctionTypeAttributes), returns = Optional(reference = ReturnsDeclaration) ) ), Repeated( name = FunctionTypeAttributes, - reference = FunctionTypeAttribute + reference = FunctionTypeAttribute, + allow_empty = true ), Enum( name = FunctionTypeAttribute, @@ -2726,11 +2768,11 @@ codegen_language_macros::compile!(Language( ), fields = ( open_brace = Required(OpenBrace), - statements = Optional(reference = Statements), + statements = Required(Statements), close_brace = Required(CloseBrace) ) ), - Repeated(name = Statements, reference = Statement), + Repeated(name = Statements, reference = Statement, allow_empty = true), Enum( name = Statement, variants = [ @@ -3443,14 +3485,15 @@ codegen_language_macros::compile!(Language( ), fields = ( open_paren = Required(OpenParen), - arguments = Optional(reference = PositionalArguments), + arguments = Required(PositionalArguments), close_paren = Required(CloseParen) ) ), Separated( name = PositionalArguments, reference = Expression, - separator = Comma + separator = Comma, + allow_empty = true ), Struct( name = NamedArgumentsDeclaration, @@ -3477,14 +3520,15 @@ codegen_language_macros::compile!(Language( ), fields = ( open_brace = Required(OpenBrace), - arguments = Optional(reference = NamedArguments), + arguments = Required(NamedArguments), close_brace = Required(CloseBrace) ) ), Separated( name = NamedArguments, reference = NamedArgument, - separator = Comma + separator = Comma, + allow_empty = true ), Struct( name = NamedArgument, @@ -3990,11 +4034,15 @@ codegen_language_macros::compile!(Language( ), fields = ( open_brace = Required(OpenBrace), - statements = Optional(reference = YulStatements), + statements = Required(YulStatements), close_brace = Required(CloseBrace) ) ), - Repeated(name = YulStatements, reference = YulStatement), + Repeated( + name = YulStatements, + reference = YulStatement, + allow_empty = true + ), Enum( name = YulStatement, variants = [ @@ -4030,14 +4078,15 @@ codegen_language_macros::compile!(Language( ), fields = ( open_paren = Required(OpenParen), - parameters = Optional(reference = YulParameters), + parameters = Required(YulParameters), close_paren = Required(CloseParen) ) ), Separated( name = YulParameters, reference = YulIdentifier, - separator = Comma + separator = Comma, + allow_empty = true ), Struct( name = YulReturnsDeclaration, @@ -4171,7 +4220,7 @@ codegen_language_macros::compile!(Language( ), fields = ( open_paren = Required(OpenParen), - arguments = Optional(reference = YulArguments), + arguments = Required(YulArguments), close_paren = Required(CloseParen) ) )] @@ -4185,7 +4234,8 @@ codegen_language_macros::compile!(Language( Separated( name = YulArguments, reference = YulExpression, - separator = Comma + separator = Comma, + allow_empty = true ), Separated( name = YulIdentifierPaths, 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 63764597af..bf3a7f5e0d 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs @@ -552,7 +552,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.statements(input)) + self.statements(input) .with_label(NodeLabel::Statements) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( input, @@ -805,7 +805,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn constructor_attributes(&self, input: &mut ParserContext<'_>) -> ParserResult { if self.version_is_at_least_0_4_22 { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.constructor_attribute(input) .with_label(NodeLabel::Item) }) @@ -827,10 +827,7 @@ impl Language { ), )?; seq.elem_labeled(NodeLabel::Parameters, self.parameters_declaration(input))?; - seq.elem_labeled( - NodeLabel::Attributes, - OptionalHelper::transform(self.constructor_attributes(input)), - )?; + seq.elem_labeled(NodeLabel::Attributes, self.constructor_attributes(input))?; seq.elem_labeled(NodeLabel::Body, self.block(input))?; seq.finish() }) @@ -911,14 +908,14 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.contract_members(input)) + self.contract_members(input) .with_label(NodeLabel::Members) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( - input, - self, - TokenKind::CloseBrace, - RecoverFromNoMatch::Yes, - ), + input, + self, + TokenKind::CloseBrace, + RecoverFromNoMatch::Yes, + ), )?; seq.elem_labeled( NodeLabel::CloseBrace, @@ -983,7 +980,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn contract_members(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.contract_member(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::ContractMembers) @@ -1248,14 +1245,14 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.enum_members(input)) + self.enum_members(input) .with_label(NodeLabel::Members) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( - input, - self, - TokenKind::CloseBrace, - RecoverFromNoMatch::Yes, - ), + input, + self, + TokenKind::CloseBrace, + RecoverFromNoMatch::Yes, + ), )?; seq.elem_labeled( NodeLabel::CloseBrace, @@ -1273,7 +1270,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn enum_members(&self, input: &mut ParserContext<'_>) -> ParserResult { - SeparatedHelper::run::<_, LexicalContextType::Default>( + OptionalHelper::transform(SeparatedHelper::run::<_, LexicalContextType::Default>( input, self, |input| { @@ -1285,7 +1282,7 @@ impl Language { }, TokenKind::Comma, NodeLabel::Separator, - ) + )) .with_kind(RuleKind::EnumMembers) } @@ -1385,13 +1382,13 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn error_parameters(&self, input: &mut ParserContext<'_>) -> ParserResult { if self.version_is_at_least_0_8_4 { - SeparatedHelper::run::<_, LexicalContextType::Default>( + OptionalHelper::transform(SeparatedHelper::run::<_, LexicalContextType::Default>( input, self, |input| self.error_parameter(input).with_label(NodeLabel::Item), TokenKind::Comma, NodeLabel::Separator, - ) + )) } else { ParserResult::disabled() } @@ -1412,7 +1409,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.error_parameters(input)) + self.error_parameters(input) .with_label(NodeLabel::Parameters) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( input, @@ -1518,13 +1515,13 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn event_parameters(&self, input: &mut ParserContext<'_>) -> ParserResult { - SeparatedHelper::run::<_, LexicalContextType::Default>( + OptionalHelper::transform(SeparatedHelper::run::<_, LexicalContextType::Default>( input, self, |input| self.event_parameter(input).with_label(NodeLabel::Item), TokenKind::Comma, NodeLabel::Separator, - ) + )) .with_kind(RuleKind::EventParameters) } @@ -1541,7 +1538,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.event_parameters(input)) + self.event_parameters(input) .with_label(NodeLabel::Parameters) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( input, @@ -2331,7 +2328,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn fallback_function_attributes(&self, input: &mut ParserContext<'_>) -> ParserResult { if self.version_is_at_least_0_6_0 { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.fallback_function_attribute(input) .with_label(NodeLabel::Item) }) @@ -2355,7 +2352,7 @@ impl Language { seq.elem_labeled(NodeLabel::Parameters, self.parameters_declaration(input))?; seq.elem_labeled( NodeLabel::Attributes, - OptionalHelper::transform(self.fallback_function_attributes(input)), + self.fallback_function_attributes(input), )?; seq.elem_labeled( NodeLabel::Returns, @@ -2528,7 +2525,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn function_attributes(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.function_attribute(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::FunctionAttributes) @@ -2606,10 +2603,7 @@ impl Language { )?; seq.elem_labeled(NodeLabel::Name, self.function_name(input))?; seq.elem_labeled(NodeLabel::Parameters, self.parameters_declaration(input))?; - seq.elem_labeled( - NodeLabel::Attributes, - OptionalHelper::transform(self.function_attributes(input)), - )?; + seq.elem_labeled(NodeLabel::Attributes, self.function_attributes(input))?; seq.elem_labeled( NodeLabel::Returns, OptionalHelper::transform(self.returns_declaration(input)), @@ -2655,10 +2649,7 @@ impl Language { ), )?; seq.elem_labeled(NodeLabel::Parameters, self.parameters_declaration(input))?; - seq.elem_labeled( - NodeLabel::Attributes, - OptionalHelper::transform(self.function_type_attributes(input)), - )?; + seq.elem_labeled(NodeLabel::Attributes, self.function_type_attributes(input))?; seq.elem_labeled( NodeLabel::Returns, OptionalHelper::transform(self.returns_declaration(input)), @@ -2714,7 +2705,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn function_type_attributes(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.function_type_attribute(input) .with_label(NodeLabel::Item) }) @@ -3105,7 +3096,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.interface_members(input)) + self.interface_members(input) .with_label(NodeLabel::Members) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( input, @@ -3130,7 +3121,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn interface_members(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.contract_member(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::InterfaceMembers) @@ -3198,14 +3189,14 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.library_members(input)) + self.library_members(input) .with_label(NodeLabel::Members) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( - input, - self, - TokenKind::CloseBrace, - RecoverFromNoMatch::Yes, - ), + input, + self, + TokenKind::CloseBrace, + RecoverFromNoMatch::Yes, + ), )?; seq.elem_labeled( NodeLabel::CloseBrace, @@ -3223,7 +3214,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn library_members(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.contract_member(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::LibraryMembers) @@ -3398,7 +3389,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn modifier_attributes(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.modifier_attribute(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::ModifierAttributes) @@ -3425,10 +3416,7 @@ impl Language { NodeLabel::Parameters, OptionalHelper::transform(self.parameters_declaration(input)), )?; - seq.elem_labeled( - NodeLabel::Attributes, - OptionalHelper::transform(self.modifier_attributes(input)), - )?; + seq.elem_labeled(NodeLabel::Attributes, self.modifier_attributes(input))?; seq.elem_labeled(NodeLabel::Body, self.function_body(input))?; seq.finish() }) @@ -3507,7 +3495,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.named_arguments(input)) + self.named_arguments(input) .with_label(NodeLabel::Arguments) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( input, @@ -3542,13 +3530,13 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn named_arguments(&self, input: &mut ParserContext<'_>) -> ParserResult { - SeparatedHelper::run::<_, LexicalContextType::Default>( + OptionalHelper::transform(SeparatedHelper::run::<_, LexicalContextType::Default>( input, self, |input| self.named_argument(input).with_label(NodeLabel::Item), TokenKind::Comma, NodeLabel::Separator, - ) + )) .with_kind(RuleKind::NamedArguments) } @@ -3810,13 +3798,13 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn parameters(&self, input: &mut ParserContext<'_>) -> ParserResult { - SeparatedHelper::run::<_, LexicalContextType::Default>( + OptionalHelper::transform(SeparatedHelper::run::<_, LexicalContextType::Default>( input, self, |input| self.parameter(input).with_label(NodeLabel::Item), TokenKind::Comma, NodeLabel::Separator, - ) + )) .with_kind(RuleKind::Parameters) } @@ -3833,7 +3821,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.parameters(input)) + self.parameters(input) .with_label(NodeLabel::Parameters) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( input, @@ -3869,13 +3857,13 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn positional_arguments(&self, input: &mut ParserContext<'_>) -> ParserResult { - SeparatedHelper::run::<_, LexicalContextType::Default>( + OptionalHelper::transform(SeparatedHelper::run::<_, LexicalContextType::Default>( input, self, |input| self.expression(input).with_label(NodeLabel::Item), TokenKind::Comma, NodeLabel::Separator, - ) + )) .with_kind(RuleKind::PositionalArguments) } @@ -3892,7 +3880,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.positional_arguments(input)) + self.positional_arguments(input) .with_label(NodeLabel::Arguments) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( input, @@ -4043,7 +4031,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn receive_function_attributes(&self, input: &mut ParserContext<'_>) -> ParserResult { if self.version_is_at_least_0_6_0 { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.receive_function_attribute(input) .with_label(NodeLabel::Item) }) @@ -4067,7 +4055,7 @@ impl Language { seq.elem_labeled(NodeLabel::Parameters, self.parameters_declaration(input))?; seq.elem_labeled( NodeLabel::Attributes, - OptionalHelper::transform(self.receive_function_attributes(input)), + self.receive_function_attributes(input), )?; seq.elem_labeled(NodeLabel::Body, self.function_body(input))?; seq.finish() @@ -4198,7 +4186,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn source_unit(&self, input: &mut ParserContext<'_>) -> ParserResult { - OptionalHelper::transform(self.source_unit_members(input)) + self.source_unit_members(input) .with_label(NodeLabel::Members) .with_kind(RuleKind::SourceUnit) } @@ -4256,7 +4244,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn source_unit_members(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.source_unit_member(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::SourceUnitMembers) @@ -4302,7 +4290,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn state_variable_attributes(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.state_variable_attribute(input) .with_label(NodeLabel::Item) }) @@ -4315,10 +4303,7 @@ impl Language { seq.elem( SequenceHelper::run(|mut seq| { seq.elem_labeled(NodeLabel::TypeName, self.type_name(input))?; - seq.elem_labeled( - NodeLabel::Attributes, - OptionalHelper::transform(self.state_variable_attributes(input)), - )?; + seq.elem_labeled(NodeLabel::Attributes, self.state_variable_attributes(input))?; seq.elem_labeled( NodeLabel::Name, self.parse_token_with_trivia::( @@ -4424,7 +4409,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn statements(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.statement(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::Statements) @@ -4544,14 +4529,14 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.struct_members(input)) + self.struct_members(input) .with_label(NodeLabel::Members) .recover_until_with_nested_delims::<_, LexicalContextType::Default>( - input, - self, - TokenKind::CloseBrace, - RecoverFromNoMatch::Yes, - ), + input, + self, + TokenKind::CloseBrace, + RecoverFromNoMatch::Yes, + ), )?; seq.elem_labeled( NodeLabel::CloseBrace, @@ -4603,7 +4588,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn struct_members(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.struct_member(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::StructMembers) @@ -5104,7 +5089,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn unnamed_function_attributes(&self, input: &mut ParserContext<'_>) -> ParserResult { if !self.version_is_at_least_0_6_0 { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.unnamed_function_attribute(input) .with_label(NodeLabel::Item) }) @@ -5128,7 +5113,7 @@ impl Language { seq.elem_labeled(NodeLabel::Parameters, self.parameters_declaration(input))?; seq.elem_labeled( NodeLabel::Attributes, - OptionalHelper::transform(self.unnamed_function_attributes(input)), + self.unnamed_function_attributes(input), )?; seq.elem_labeled(NodeLabel::Body, self.function_body(input))?; seq.finish() @@ -5845,13 +5830,13 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn yul_arguments(&self, input: &mut ParserContext<'_>) -> ParserResult { - SeparatedHelper::run::<_, LexicalContextType::Yul>( + OptionalHelper::transform(SeparatedHelper::run::<_, LexicalContextType::Yul>( input, self, |input| self.yul_expression(input).with_label(NodeLabel::Item), TokenKind::Comma, NodeLabel::Separator, - ) + )) .with_kind(RuleKind::YulArguments) } @@ -5895,7 +5880,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.yul_statements(input)) + self.yul_statements(input) .with_label(NodeLabel::Statements) .recover_until_with_nested_delims::<_, LexicalContextType::Yul>( input, @@ -6395,14 +6380,14 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.yul_arguments(input)) + self.yul_arguments(input) .with_label(NodeLabel::Arguments) .recover_until_with_nested_delims::<_, LexicalContextType::Yul>( - input, - self, - TokenKind::CloseParen, - RecoverFromNoMatch::Yes, - ), + input, + self, + TokenKind::CloseParen, + RecoverFromNoMatch::Yes, + ), )?; seq.elem_labeled( NodeLabel::CloseParen, @@ -6643,7 +6628,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn yul_parameters(&self, input: &mut ParserContext<'_>) -> ParserResult { - SeparatedHelper::run::<_, LexicalContextType::Yul>( + OptionalHelper::transform(SeparatedHelper::run::<_, LexicalContextType::Yul>( input, self, |input| { @@ -6655,7 +6640,7 @@ impl Language { }, TokenKind::Comma, NodeLabel::Separator, - ) + )) .with_kind(RuleKind::YulParameters) } @@ -6672,7 +6657,7 @@ impl Language { ), )?; seq.elem( - OptionalHelper::transform(self.yul_parameters(input)) + self.yul_parameters(input) .with_label(NodeLabel::Parameters) .recover_until_with_nested_delims::<_, LexicalContextType::Yul>( input, @@ -6766,7 +6751,7 @@ impl Language { #[allow(unused_assignments, unused_parens)] fn yul_statements(&self, input: &mut ParserContext<'_>) -> ParserResult { - OneOrMoreHelper::run(input, |input| { + ZeroOrMoreHelper::run(input, |input| { self.yul_statement(input).with_label(NodeLabel::Item) }) .with_kind(RuleKind::YulStatements) 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 cabd57d220..06ee87b627 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 @@ -169,9 +169,9 @@ pub fn select_sequence( impl Selector { fn source_unit(&mut self) -> Result>> { - Ok(vec![self.try_select(|node| { + Ok(vec![Some(self.select(|node| { node.is_rule_with_kind(RuleKind::SourceUnitMembers) - })?]) + })?)]) } } @@ -352,7 +352,7 @@ impl Selector { Some(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?), self.try_select(|node| node.is_rule_with_kind(RuleKind::InheritanceSpecifier))?, Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenBrace))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::ContractMembers))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::ContractMembers))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseBrace))?), ]) } @@ -383,7 +383,7 @@ impl Selector { Some(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?), self.try_select(|node| node.is_rule_with_kind(RuleKind::InheritanceSpecifier))?, Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenBrace))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::InterfaceMembers))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::InterfaceMembers))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseBrace))?), ]) } @@ -395,7 +395,7 @@ impl Selector { Some(self.select(|node| node.is_token_with_kind(TokenKind::LibraryKeyword))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenBrace))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::LibraryMembers))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::LibraryMembers))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseBrace))?), ]) } @@ -407,7 +407,7 @@ impl Selector { Some(self.select(|node| node.is_token_with_kind(TokenKind::StructKeyword))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenBrace))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::StructMembers))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::StructMembers))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseBrace))?), ]) } @@ -429,7 +429,7 @@ impl Selector { Some(self.select(|node| node.is_token_with_kind(TokenKind::EnumKeyword))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenBrace))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::EnumMembers))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::EnumMembers))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseBrace))?), ]) } @@ -452,7 +452,7 @@ impl Selector { fn state_variable_definition(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_rule_with_kind(RuleKind::TypeName))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::StateVariableAttributes))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::StateVariableAttributes))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?), self.try_select(|node| node.is_rule_with_kind(RuleKind::StateVariableDefinitionValue))?, Some(self.select(|node| node.is_token_with_kind(TokenKind::Semicolon))?), @@ -475,7 +475,7 @@ impl Selector { Some(self.select(|node| node.is_token_with_kind(TokenKind::FunctionKeyword))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::FunctionName))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::ParametersDeclaration))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::FunctionAttributes))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::FunctionAttributes))?), self.try_select(|node| node.is_rule_with_kind(RuleKind::ReturnsDeclaration))?, Some(self.select(|node| node.is_rule_with_kind(RuleKind::FunctionBody))?), ]) @@ -486,7 +486,7 @@ impl Selector { fn parameters_declaration(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenParen))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::Parameters))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::Parameters))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseParen))?), ]) } @@ -535,7 +535,7 @@ impl Selector { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::ConstructorKeyword))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::ParametersDeclaration))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::ConstructorAttributes))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::ConstructorAttributes))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::Block))?), ]) } @@ -546,7 +546,7 @@ impl Selector { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::FunctionKeyword))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::ParametersDeclaration))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::UnnamedFunctionAttributes))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::UnnamedFunctionAttributes))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::FunctionBody))?), ]) } @@ -557,7 +557,7 @@ impl Selector { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::FallbackKeyword))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::ParametersDeclaration))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::FallbackFunctionAttributes))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::FallbackFunctionAttributes))?), self.try_select(|node| node.is_rule_with_kind(RuleKind::ReturnsDeclaration))?, Some(self.select(|node| node.is_rule_with_kind(RuleKind::FunctionBody))?), ]) @@ -569,7 +569,7 @@ impl Selector { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::ReceiveKeyword))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::ParametersDeclaration))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::ReceiveFunctionAttributes))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::ReceiveFunctionAttributes))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::FunctionBody))?), ]) } @@ -581,7 +581,7 @@ impl Selector { Some(self.select(|node| node.is_token_with_kind(TokenKind::ModifierKeyword))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?), self.try_select(|node| node.is_rule_with_kind(RuleKind::ParametersDeclaration))?, - self.try_select(|node| node.is_rule_with_kind(RuleKind::ModifierAttributes))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::ModifierAttributes))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::FunctionBody))?), ]) } @@ -612,7 +612,7 @@ impl Selector { fn event_parameters_declaration(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenParen))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::EventParameters))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::EventParameters))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseParen))?), ]) } @@ -655,7 +655,7 @@ impl Selector { fn error_parameters_declaration(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenParen))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::ErrorParameters))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::ErrorParameters))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseParen))?), ]) } @@ -686,7 +686,7 @@ impl Selector { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::FunctionKeyword))?), Some(self.select(|node| node.is_rule_with_kind(RuleKind::ParametersDeclaration))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::FunctionTypeAttributes))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::FunctionTypeAttributes))?), self.try_select(|node| node.is_rule_with_kind(RuleKind::ReturnsDeclaration))?, ]) } @@ -736,7 +736,7 @@ impl Selector { fn block(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenBrace))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::Statements))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::Statements))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseBrace))?), ]) } @@ -1202,7 +1202,7 @@ impl Selector { fn positional_arguments_declaration(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenParen))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::PositionalArguments))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::PositionalArguments))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseParen))?), ]) } @@ -1222,7 +1222,7 @@ impl Selector { fn named_argument_group(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenBrace))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::NamedArguments))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::NamedArguments))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseBrace))?), ]) } @@ -1308,7 +1308,7 @@ impl Selector { fn yul_block(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenBrace))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::YulStatements))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::YulStatements))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseBrace))?), ]) } @@ -1330,7 +1330,7 @@ impl Selector { fn yul_parameters_declaration(&mut self) -> Result>> { Ok(vec![ Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenParen))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::YulParameters))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::YulParameters))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseParen))?), ]) } @@ -1472,7 +1472,7 @@ impl Selector { Ok(vec![ Some(self.select(|node| node.is_rule_with_kind(RuleKind::YulExpression))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::OpenParen))?), - self.try_select(|node| node.is_rule_with_kind(RuleKind::YulArguments))?, + Some(self.select(|node| node.is_rule_with_kind(RuleKind::YulArguments))?), Some(self.select(|node| node.is_token_with_kind(TokenKind::CloseParen))?), ]) } @@ -2619,15 +2619,20 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::VersionPragmaValue))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Period))? + if let Some(first) = + self.try_select(|node| node.is_token_with_kind(TokenKind::VersionPragmaValue))? { - separators.push(separator); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Period))? + { + separators.push(separator); - separated - .push(self.select(|node| node.is_token_with_kind(TokenKind::VersionPragmaValue))?); + separated.push( + self.select(|node| node.is_token_with_kind(TokenKind::VersionPragmaValue))?, + ); + } } Ok(vec![separated, separators]) @@ -2639,18 +2644,22 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push( - self.select(|node| node.is_rule_with_kind(RuleKind::ImportDeconstructionSymbol))?, - ); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::ImportDeconstructionSymbol))? { - separators.push(separator); - - separated.push( - self.select(|node| node.is_rule_with_kind(RuleKind::ImportDeconstructionSymbol))?, - ); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated.push( + self.select(|node| { + node.is_rule_with_kind(RuleKind::ImportDeconstructionSymbol) + })?, + ); + } } Ok(vec![separated, separators]) @@ -2662,17 +2671,22 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated - .push(self.select(|node| node.is_rule_with_kind(RuleKind::UsingDeconstructionSymbol))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::UsingDeconstructionSymbol))? { - separators.push(separator); - - separated.push( - self.select(|node| node.is_rule_with_kind(RuleKind::UsingDeconstructionSymbol))?, - ); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated.push( + self.select(|node| { + node.is_rule_with_kind(RuleKind::UsingDeconstructionSymbol) + })?, + ); + } } Ok(vec![separated, separators]) @@ -2684,14 +2698,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::InheritanceType))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::InheritanceType))? { - separators.push(separator); + separated.push(first); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::InheritanceType))?); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated + .push(self.select(|node| node.is_rule_with_kind(RuleKind::InheritanceType))?); + } } Ok(vec![separated, separators]) @@ -2703,14 +2722,18 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Identifier))? { - separators.push(separator); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); + separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); + } } Ok(vec![separated, separators]) @@ -2722,14 +2745,16 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Parameter))?); + if let Some(first) = self.try_select(|node| node.is_rule_with_kind(RuleKind::Parameter))? { + separated.push(first); - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? - { - separators.push(separator); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Parameter))?); + separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Parameter))?); + } } Ok(vec![separated, separators]) @@ -2741,14 +2766,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::IdentifierPath))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::IdentifierPath))? { - separators.push(separator); + separated.push(first); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::IdentifierPath))?); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated + .push(self.select(|node| node.is_rule_with_kind(RuleKind::IdentifierPath))?); + } } Ok(vec![separated, separators]) @@ -2760,14 +2790,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::EventParameter))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::EventParameter))? { - separators.push(separator); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::EventParameter))?); + separated + .push(self.select(|node| node.is_rule_with_kind(RuleKind::EventParameter))?); + } } Ok(vec![separated, separators]) @@ -2779,14 +2814,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::ErrorParameter))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::ErrorParameter))? { - separators.push(separator); + separated.push(first); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::ErrorParameter))?); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated + .push(self.select(|node| node.is_rule_with_kind(RuleKind::ErrorParameter))?); + } } Ok(vec![separated, separators]) @@ -2798,14 +2838,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::StringLiteral))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::StringLiteral))? { - separators.push(separator); + separated.push(first); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::StringLiteral))?); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated + .push(self.select(|node| node.is_rule_with_kind(RuleKind::StringLiteral))?); + } } Ok(vec![separated, separators]) @@ -2817,18 +2862,22 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push( - self.select(|node| node.is_rule_with_kind(RuleKind::TupleDeconstructionElement))?, - ); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::TupleDeconstructionElement))? { - separators.push(separator); - - separated.push( - self.select(|node| node.is_rule_with_kind(RuleKind::TupleDeconstructionElement))?, - ); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated.push( + self.select(|node| { + node.is_rule_with_kind(RuleKind::TupleDeconstructionElement) + })?, + ); + } } Ok(vec![separated, separators]) @@ -2840,14 +2889,16 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Expression))?); + if let Some(first) = self.try_select(|node| node.is_rule_with_kind(RuleKind::Expression))? { + separated.push(first); - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? - { - separators.push(separator); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Expression))?); + separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Expression))?); + } } Ok(vec![separated, separators]) @@ -2859,14 +2910,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::NamedArgument))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::NamedArgument))? { - separators.push(separator); + separated.push(first); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::NamedArgument))?); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated + .push(self.select(|node| node.is_rule_with_kind(RuleKind::NamedArgument))?); + } } Ok(vec![separated, separators]) @@ -2878,14 +2934,16 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::TupleValue))?); + if let Some(first) = self.try_select(|node| node.is_rule_with_kind(RuleKind::TupleValue))? { + separated.push(first); - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? - { - separators.push(separator); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::TupleValue))?); + separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::TupleValue))?); + } } Ok(vec![separated, separators]) @@ -2897,14 +2955,16 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Expression))?); + if let Some(first) = self.try_select(|node| node.is_rule_with_kind(RuleKind::Expression))? { + separated.push(first); - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? - { - separators.push(separator); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Expression))?); + separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::Expression))?); + } } Ok(vec![separated, separators]) @@ -2916,14 +2976,18 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Period))? + if let Some(first) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Identifier))? { - separators.push(separator); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Period))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); + separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); + } } Ok(vec![separated, separators]) @@ -2935,14 +2999,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))? { - separators.push(separator); + separated.push(first); - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated + .push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); + } } Ok(vec![separated, separators]) @@ -2954,14 +3023,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))? { - separators.push(separator); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); + separated + .push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); + } } Ok(vec![separated, separators]) @@ -2973,14 +3047,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::YulExpression))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::YulExpression))? { - separators.push(separator); + separated.push(first); - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::YulExpression))?); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); + + separated + .push(self.select(|node| node.is_rule_with_kind(RuleKind::YulExpression))?); + } } Ok(vec![separated, separators]) @@ -2992,15 +3071,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_rule_with_kind(RuleKind::YulIdentifierPath))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + if let Some(first) = + self.try_select(|node| node.is_rule_with_kind(RuleKind::YulIdentifierPath))? { - separators.push(separator); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Comma))? + { + separators.push(separator); - separated - .push(self.select(|node| node.is_rule_with_kind(RuleKind::YulIdentifierPath))?); + separated + .push(self.select(|node| node.is_rule_with_kind(RuleKind::YulIdentifierPath))?); + } } Ok(vec![separated, separators]) @@ -3012,14 +3095,19 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Period))? + if let Some(first) = + self.try_select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))? { - separators.push(separator); + separated.push(first); - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Period))? + { + separators.push(separator); + + separated + .push(self.select(|node| node.is_token_with_kind(TokenKind::YulIdentifier))?); + } } Ok(vec![separated, separators]) diff --git a/crates/solidity/outputs/cargo/tests/src/doc_examples/using_the_parser.rs b/crates/solidity/outputs/cargo/tests/src/doc_examples/using_the_parser.rs index 470c050046..627297d2af 100644 --- a/crates/solidity/outputs/cargo/tests/src/doc_examples/using_the_parser.rs +++ b/crates/solidity/outputs/cargo/tests/src/doc_examples/using_the_parser.rs @@ -39,7 +39,7 @@ fn using_the_parser() -> Result<()> { let contract = parse_tree.as_rule().unwrap(); assert_eq!(contract.kind, RuleKind::ContractDefinition); - assert_eq!(contract.children.len(), 6); + assert_eq!(contract.children.len(), 7); let children = &contract.children; assert!(matches!(&children[0].node, Node::Token(t) if t.kind == TokenKind::ContractKeyword)); @@ -47,7 +47,8 @@ fn using_the_parser() -> Result<()> { assert!(matches!(&children[2].node, Node::Token(t) if t.kind == TokenKind::Identifier)); assert!(matches!(&children[3].node, Node::Rule(r) if r.kind == RuleKind::LeadingTrivia)); assert!(matches!(&children[4].node, Node::Token(t) if t.kind == TokenKind::OpenBrace)); - assert!(matches!(&children[5].node, Node::Token(t) if t.kind == TokenKind::CloseBrace)); + assert!(matches!(&children[5].node, Node::Rule(r) if r.kind == RuleKind::ContractMembers)); + assert!(matches!(&children[6].node, Node::Token(t) if t.kind == TokenKind::CloseBrace)); // --8<-- [end:inspect-tree] // --8<-- [start:unparse-node] 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 e667763cf6..98070fa44c 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 @@ -14,7 +14,7 @@ export class SourceUnit { const [$members] = ast_internal.selectSequence(this.cst); return { - members: $members === null ? undefined : new SourceUnitMembers($members as RuleNode), + members: new SourceUnitMembers($members as RuleNode), }; }); @@ -22,7 +22,7 @@ export class SourceUnit { assertKind(this.cst.kind, RuleKind.SourceUnit); } - public get members(): SourceUnitMembers | undefined { + public get members(): SourceUnitMembers { return this.fetch().members; } } @@ -501,7 +501,7 @@ export class ContractDefinition { name: $name as TokenNode, inheritence: $inheritence === null ? undefined : new InheritanceSpecifier($inheritence as RuleNode), openBrace: $openBrace as TokenNode, - members: $members === null ? undefined : new ContractMembers($members as RuleNode), + members: new ContractMembers($members as RuleNode), closeBrace: $closeBrace as TokenNode, }; }); @@ -530,7 +530,7 @@ export class ContractDefinition { return this.fetch().openBrace; } - public get members(): ContractMembers | undefined { + public get members(): ContractMembers { return this.fetch().members; } @@ -596,7 +596,7 @@ export class InterfaceDefinition { name: $name as TokenNode, inheritence: $inheritence === null ? undefined : new InheritanceSpecifier($inheritence as RuleNode), openBrace: $openBrace as TokenNode, - members: $members === null ? undefined : new InterfaceMembers($members as RuleNode), + members: new InterfaceMembers($members as RuleNode), closeBrace: $closeBrace as TokenNode, }; }); @@ -621,7 +621,7 @@ export class InterfaceDefinition { return this.fetch().openBrace; } - public get members(): InterfaceMembers | undefined { + public get members(): InterfaceMembers { return this.fetch().members; } @@ -638,7 +638,7 @@ export class LibraryDefinition { libraryKeyword: $libraryKeyword as TokenNode, name: $name as TokenNode, openBrace: $openBrace as TokenNode, - members: $members === null ? undefined : new LibraryMembers($members as RuleNode), + members: new LibraryMembers($members as RuleNode), closeBrace: $closeBrace as TokenNode, }; }); @@ -659,7 +659,7 @@ export class LibraryDefinition { return this.fetch().openBrace; } - public get members(): LibraryMembers | undefined { + public get members(): LibraryMembers { return this.fetch().members; } @@ -676,7 +676,7 @@ export class StructDefinition { structKeyword: $structKeyword as TokenNode, name: $name as TokenNode, openBrace: $openBrace as TokenNode, - members: $members === null ? undefined : new StructMembers($members as RuleNode), + members: new StructMembers($members as RuleNode), closeBrace: $closeBrace as TokenNode, }; }); @@ -697,7 +697,7 @@ export class StructDefinition { return this.fetch().openBrace; } - public get members(): StructMembers | undefined { + public get members(): StructMembers { return this.fetch().members; } @@ -742,7 +742,7 @@ export class EnumDefinition { enumKeyword: $enumKeyword as TokenNode, name: $name as TokenNode, openBrace: $openBrace as TokenNode, - members: $members === null ? undefined : new EnumMembers($members as RuleNode), + members: new EnumMembers($members as RuleNode), closeBrace: $closeBrace as TokenNode, }; }); @@ -763,7 +763,7 @@ export class EnumDefinition { return this.fetch().openBrace; } - public get members(): EnumMembers | undefined { + public get members(): EnumMembers { return this.fetch().members; } @@ -821,7 +821,7 @@ export class StateVariableDefinition { return { typeName: new TypeName($typeName as RuleNode), - attributes: $attributes === null ? undefined : new StateVariableAttributes($attributes as RuleNode), + attributes: new StateVariableAttributes($attributes as RuleNode), name: $name as TokenNode, value: $value === null ? undefined : new StateVariableDefinitionValue($value as RuleNode), semicolon: $semicolon as TokenNode, @@ -836,7 +836,7 @@ export class StateVariableDefinition { return this.fetch().typeName; } - public get attributes(): StateVariableAttributes | undefined { + public get attributes(): StateVariableAttributes { return this.fetch().attributes; } @@ -884,7 +884,7 @@ export class FunctionDefinition { functionKeyword: $functionKeyword as TokenNode, name: new FunctionName($name as RuleNode), parameters: new ParametersDeclaration($parameters as RuleNode), - attributes: $attributes === null ? undefined : new FunctionAttributes($attributes as RuleNode), + attributes: new FunctionAttributes($attributes as RuleNode), returns: $returns === null ? undefined : new ReturnsDeclaration($returns as RuleNode), body: new FunctionBody($body as RuleNode), }; @@ -906,7 +906,7 @@ export class FunctionDefinition { return this.fetch().parameters; } - public get attributes(): FunctionAttributes | undefined { + public get attributes(): FunctionAttributes { return this.fetch().attributes; } @@ -925,7 +925,7 @@ export class ParametersDeclaration { return { openParen: $openParen as TokenNode, - parameters: $parameters === null ? undefined : new Parameters($parameters as RuleNode), + parameters: new Parameters($parameters as RuleNode), closeParen: $closeParen as TokenNode, }; }); @@ -938,7 +938,7 @@ export class ParametersDeclaration { return this.fetch().openParen; } - public get parameters(): Parameters | undefined { + public get parameters(): Parameters { return this.fetch().parameters; } @@ -1056,7 +1056,7 @@ export class ConstructorDefinition { return { constructorKeyword: $constructorKeyword as TokenNode, parameters: new ParametersDeclaration($parameters as RuleNode), - attributes: $attributes === null ? undefined : new ConstructorAttributes($attributes as RuleNode), + attributes: new ConstructorAttributes($attributes as RuleNode), body: new Block($body as RuleNode), }; }); @@ -1073,7 +1073,7 @@ export class ConstructorDefinition { return this.fetch().parameters; } - public get attributes(): ConstructorAttributes | undefined { + public get attributes(): ConstructorAttributes { return this.fetch().attributes; } @@ -1089,7 +1089,7 @@ export class UnnamedFunctionDefinition { return { functionKeyword: $functionKeyword as TokenNode, parameters: new ParametersDeclaration($parameters as RuleNode), - attributes: $attributes === null ? undefined : new UnnamedFunctionAttributes($attributes as RuleNode), + attributes: new UnnamedFunctionAttributes($attributes as RuleNode), body: new FunctionBody($body as RuleNode), }; }); @@ -1106,7 +1106,7 @@ export class UnnamedFunctionDefinition { return this.fetch().parameters; } - public get attributes(): UnnamedFunctionAttributes | undefined { + public get attributes(): UnnamedFunctionAttributes { return this.fetch().attributes; } @@ -1122,7 +1122,7 @@ export class FallbackFunctionDefinition { return { fallbackKeyword: $fallbackKeyword as TokenNode, parameters: new ParametersDeclaration($parameters as RuleNode), - attributes: $attributes === null ? undefined : new FallbackFunctionAttributes($attributes as RuleNode), + attributes: new FallbackFunctionAttributes($attributes as RuleNode), returns: $returns === null ? undefined : new ReturnsDeclaration($returns as RuleNode), body: new FunctionBody($body as RuleNode), }; @@ -1140,7 +1140,7 @@ export class FallbackFunctionDefinition { return this.fetch().parameters; } - public get attributes(): FallbackFunctionAttributes | undefined { + public get attributes(): FallbackFunctionAttributes { return this.fetch().attributes; } @@ -1160,7 +1160,7 @@ export class ReceiveFunctionDefinition { return { receiveKeyword: $receiveKeyword as TokenNode, parameters: new ParametersDeclaration($parameters as RuleNode), - attributes: $attributes === null ? undefined : new ReceiveFunctionAttributes($attributes as RuleNode), + attributes: new ReceiveFunctionAttributes($attributes as RuleNode), body: new FunctionBody($body as RuleNode), }; }); @@ -1177,7 +1177,7 @@ export class ReceiveFunctionDefinition { return this.fetch().parameters; } - public get attributes(): ReceiveFunctionAttributes | undefined { + public get attributes(): ReceiveFunctionAttributes { return this.fetch().attributes; } @@ -1194,7 +1194,7 @@ export class ModifierDefinition { modifierKeyword: $modifierKeyword as TokenNode, name: $name as TokenNode, parameters: $parameters === null ? undefined : new ParametersDeclaration($parameters as RuleNode), - attributes: $attributes === null ? undefined : new ModifierAttributes($attributes as RuleNode), + attributes: new ModifierAttributes($attributes as RuleNode), body: new FunctionBody($body as RuleNode), }; }); @@ -1215,7 +1215,7 @@ export class ModifierDefinition { return this.fetch().parameters; } - public get attributes(): ModifierAttributes | undefined { + public get attributes(): ModifierAttributes { return this.fetch().attributes; } @@ -1291,7 +1291,7 @@ export class EventParametersDeclaration { return { openParen: $openParen as TokenNode, - parameters: $parameters === null ? undefined : new EventParameters($parameters as RuleNode), + parameters: new EventParameters($parameters as RuleNode), closeParen: $closeParen as TokenNode, }; }); @@ -1304,7 +1304,7 @@ export class EventParametersDeclaration { return this.fetch().openParen; } - public get parameters(): EventParameters | undefined { + public get parameters(): EventParameters { return this.fetch().parameters; } @@ -1418,7 +1418,7 @@ export class ErrorParametersDeclaration { return { openParen: $openParen as TokenNode, - parameters: $parameters === null ? undefined : new ErrorParameters($parameters as RuleNode), + parameters: new ErrorParameters($parameters as RuleNode), closeParen: $closeParen as TokenNode, }; }); @@ -1431,7 +1431,7 @@ export class ErrorParametersDeclaration { return this.fetch().openParen; } - public get parameters(): ErrorParameters | undefined { + public get parameters(): ErrorParameters { return this.fetch().parameters; } @@ -1503,7 +1503,7 @@ export class FunctionType { return { functionKeyword: $functionKeyword as TokenNode, parameters: new ParametersDeclaration($parameters as RuleNode), - attributes: $attributes === null ? undefined : new FunctionTypeAttributes($attributes as RuleNode), + attributes: new FunctionTypeAttributes($attributes as RuleNode), returns: $returns === null ? undefined : new ReturnsDeclaration($returns as RuleNode), }; }); @@ -1520,7 +1520,7 @@ export class FunctionType { return this.fetch().parameters; } - public get attributes(): FunctionTypeAttributes | undefined { + public get attributes(): FunctionTypeAttributes { return this.fetch().attributes; } @@ -1648,7 +1648,7 @@ export class Block { return { openBrace: $openBrace as TokenNode, - statements: $statements === null ? undefined : new Statements($statements as RuleNode), + statements: new Statements($statements as RuleNode), closeBrace: $closeBrace as TokenNode, }; }); @@ -1661,7 +1661,7 @@ export class Block { return this.fetch().openBrace; } - public get statements(): Statements | undefined { + public get statements(): Statements { return this.fetch().statements; } @@ -2981,7 +2981,7 @@ export class PositionalArgumentsDeclaration { return { openParen: $openParen as TokenNode, - arguments: $arguments === null ? undefined : new PositionalArguments($arguments as RuleNode), + arguments: new PositionalArguments($arguments as RuleNode), closeParen: $closeParen as TokenNode, }; }); @@ -2994,7 +2994,7 @@ export class PositionalArgumentsDeclaration { return this.fetch().openParen; } - public get arguments(): PositionalArguments | undefined { + public get arguments(): PositionalArguments { return this.fetch().arguments; } @@ -3037,7 +3037,7 @@ export class NamedArgumentGroup { return { openBrace: $openBrace as TokenNode, - arguments: $arguments === null ? undefined : new NamedArguments($arguments as RuleNode), + arguments: new NamedArguments($arguments as RuleNode), closeBrace: $closeBrace as TokenNode, }; }); @@ -3050,7 +3050,7 @@ export class NamedArgumentGroup { return this.fetch().openBrace; } - public get arguments(): NamedArguments | undefined { + public get arguments(): NamedArguments { return this.fetch().arguments; } @@ -3269,7 +3269,7 @@ export class YulBlock { return { openBrace: $openBrace as TokenNode, - statements: $statements === null ? undefined : new YulStatements($statements as RuleNode), + statements: new YulStatements($statements as RuleNode), closeBrace: $closeBrace as TokenNode, }; }); @@ -3282,7 +3282,7 @@ export class YulBlock { return this.fetch().openBrace; } - public get statements(): YulStatements | undefined { + public get statements(): YulStatements { return this.fetch().statements; } @@ -3335,7 +3335,7 @@ export class YulParametersDeclaration { return { openParen: $openParen as TokenNode, - parameters: $parameters === null ? undefined : new YulParameters($parameters as RuleNode), + parameters: new YulParameters($parameters as RuleNode), closeParen: $closeParen as TokenNode, }; }); @@ -3348,7 +3348,7 @@ export class YulParametersDeclaration { return this.fetch().openParen; } - public get parameters(): YulParameters | undefined { + public get parameters(): YulParameters { return this.fetch().parameters; } @@ -3711,7 +3711,7 @@ export class YulFunctionCallExpression { return { operand: new YulExpression($operand as RuleNode), openParen: $openParen as TokenNode, - arguments: $arguments === null ? undefined : new YulArguments($arguments as RuleNode), + arguments: new YulArguments($arguments as RuleNode), closeParen: $closeParen as TokenNode, }; }); @@ -3728,7 +3728,7 @@ export class YulFunctionCallExpression { return this.fetch().openParen; } - public get arguments(): YulArguments | undefined { + public get arguments(): YulArguments { return this.fetch().arguments; } diff --git a/crates/solidity/outputs/npm/tests/src/doc-examples/using-the-parser.ts b/crates/solidity/outputs/npm/tests/src/doc-examples/using-the-parser.ts index 085d628989..d64b82c1e7 100644 --- a/crates/solidity/outputs/npm/tests/src/doc-examples/using-the-parser.ts +++ b/crates/solidity/outputs/npm/tests/src/doc-examples/using-the-parser.ts @@ -34,15 +34,16 @@ test("using the parser", async () => { assert.equal(contract.kind, RuleKind.ContractDefinition); const contractChildren = contract.children(); - assert.equal(contractChildren.length, 6); + assert.equal(contractChildren.length, 7); - const [contractKeyword, firstSpace, contractName, secondSpace, openBrace, closeBrace] = contractChildren; + const [contractKeyword, firstSpace, contractName, secondSpace, openBrace, members, closeBrace] = contractChildren; assert.equal(contractKeyword?.kind, TokenKind.ContractKeyword); assert.equal(firstSpace?.kind, RuleKind.LeadingTrivia); assert.equal(contractName?.kind, TokenKind.Identifier); assert.equal(secondSpace?.kind, RuleKind.LeadingTrivia); assert.equal(openBrace?.kind, TokenKind.OpenBrace); + assert.equal(members?.kind, RuleKind.ContractMembers); assert.equal(closeBrace?.kind, TokenKind.CloseBrace); // --8<-- [end:inspect-tree] diff --git a/crates/solidity/outputs/spec/generated/grammar.ebnf b/crates/solidity/outputs/spec/generated/grammar.ebnf index 74b35963ba..2f003ad31e 100644 --- a/crates/solidity/outputs/spec/generated/grammar.ebnf +++ b/crates/solidity/outputs/spec/generated/grammar.ebnf @@ -10,9 +10,9 @@ (* 1.2. Source Unit: *) -SourceUnit = SourceUnitMembers?; +SourceUnit = SourceUnitMembers; -SourceUnitMembers = SourceUnitMember+; +SourceUnitMembers = SourceUnitMember*; SourceUnitMember = PragmaDirective | ImportDirective @@ -572,7 +572,7 @@ ContractDefinition = ABSTRACT_KEYWORD? (* Introduced in 0.6.0 *) IDENTIFIER InheritanceSpecifier? OPEN_BRACE - ContractMembers? + ContractMembers CLOSE_BRACE; InheritanceSpecifier = IS_KEYWORD @@ -583,7 +583,7 @@ InheritanceTypes = InheritanceType (COMMA InheritanceType)*; InheritanceType = IdentifierPath ArgumentsDeclaration?; -ContractMembers = ContractMember+; +ContractMembers = ContractMember*; ContractMember = UsingDirective | FunctionDefinition @@ -605,30 +605,30 @@ InterfaceDefinition = INTERFACE_KEYWORD IDENTIFIER InheritanceSpecifier? OPEN_BRACE - InterfaceMembers? + InterfaceMembers CLOSE_BRACE; -InterfaceMembers = ContractMember+; +InterfaceMembers = ContractMember*; (* 2.3. Libraries: *) LibraryDefinition = LIBRARY_KEYWORD IDENTIFIER OPEN_BRACE - LibraryMembers? + LibraryMembers CLOSE_BRACE; -LibraryMembers = ContractMember+; +LibraryMembers = ContractMember*; (* 2.4. Structs: *) StructDefinition = STRUCT_KEYWORD IDENTIFIER OPEN_BRACE - StructMembers? + StructMembers CLOSE_BRACE; -StructMembers = StructMember+; +StructMembers = StructMember*; StructMember = TypeName IDENTIFIER @@ -639,10 +639,10 @@ StructMember = TypeName EnumDefinition = ENUM_KEYWORD IDENTIFIER OPEN_BRACE - EnumMembers? + EnumMembers CLOSE_BRACE; -EnumMembers = IDENTIFIER (COMMA IDENTIFIER)*; +EnumMembers = (IDENTIFIER (COMMA IDENTIFIER)*)?; (* 2.6. Constants: *) @@ -657,7 +657,7 @@ ConstantDefinition = TypeName (* 2.7. State Variables: *) StateVariableDefinition = TypeName - StateVariableAttributes? + StateVariableAttributes IDENTIFIER StateVariableDefinitionValue? SEMICOLON; @@ -665,7 +665,7 @@ StateVariableDefinition = TypeName StateVariableDefinitionValue = EQUAL Expression; -StateVariableAttributes = StateVariableAttribute+; +StateVariableAttributes = StateVariableAttribute*; StateVariableAttribute = OverrideSpecifier | CONSTANT_KEYWORD @@ -679,7 +679,7 @@ StateVariableAttribute = OverrideSpecifier FunctionDefinition = FUNCTION_KEYWORD FunctionName ParametersDeclaration - FunctionAttributes? + FunctionAttributes ReturnsDeclaration? FunctionBody; @@ -688,16 +688,16 @@ FunctionName = IDENTIFIER | RECEIVE_KEYWORD; ParametersDeclaration = OPEN_PAREN - Parameters? + Parameters CLOSE_PAREN; -Parameters = Parameter (COMMA Parameter)*; +Parameters = (Parameter (COMMA Parameter)*)?; Parameter = TypeName StorageLocation? IDENTIFIER?; -FunctionAttributes = FunctionAttribute+; +FunctionAttributes = FunctionAttribute*; FunctionAttribute = ModifierInvocation | OverrideSpecifier @@ -729,11 +729,11 @@ FunctionBody = Block (* Introduced in 0.4.22 *) ConstructorDefinition = CONSTRUCTOR_KEYWORD ParametersDeclaration - ConstructorAttributes? + ConstructorAttributes Block; (* Introduced in 0.4.22 *) -ConstructorAttributes = ConstructorAttribute+; +ConstructorAttributes = ConstructorAttribute*; (* Introduced in 0.4.22 *) ConstructorAttribute = ModifierInvocation @@ -746,11 +746,11 @@ ConstructorAttribute = ModifierInvocation (* Deprecated in 0.6.0 *) UnnamedFunctionDefinition = FUNCTION_KEYWORD ParametersDeclaration - UnnamedFunctionAttributes? + UnnamedFunctionAttributes FunctionBody; (* Deprecated in 0.6.0 *) -UnnamedFunctionAttributes = UnnamedFunctionAttribute+; +UnnamedFunctionAttributes = UnnamedFunctionAttribute*; (* Deprecated in 0.6.0 *) UnnamedFunctionAttribute = ModifierInvocation @@ -766,12 +766,12 @@ UnnamedFunctionAttribute = ModifierInvocation (* Introduced in 0.6.0 *) FallbackFunctionDefinition = FALLBACK_KEYWORD ParametersDeclaration - FallbackFunctionAttributes? + FallbackFunctionAttributes ReturnsDeclaration? FunctionBody; (* Introduced in 0.6.0 *) -FallbackFunctionAttributes = FallbackFunctionAttribute+; +FallbackFunctionAttributes = FallbackFunctionAttribute*; (* Introduced in 0.6.0 *) FallbackFunctionAttribute = ModifierInvocation @@ -785,11 +785,11 @@ FallbackFunctionAttribute = ModifierInvocation (* Introduced in 0.6.0 *) ReceiveFunctionDefinition = RECEIVE_KEYWORD ParametersDeclaration - ReceiveFunctionAttributes? + ReceiveFunctionAttributes FunctionBody; (* Introduced in 0.6.0 *) -ReceiveFunctionAttributes = ReceiveFunctionAttribute+; +ReceiveFunctionAttributes = ReceiveFunctionAttribute*; (* Introduced in 0.6.0 *) ReceiveFunctionAttribute = ModifierInvocation @@ -803,10 +803,10 @@ ReceiveFunctionAttribute = ModifierInvocation ModifierDefinition = MODIFIER_KEYWORD IDENTIFIER ParametersDeclaration? - ModifierAttributes? + ModifierAttributes FunctionBody; -ModifierAttributes = ModifierAttribute+; +ModifierAttributes = ModifierAttribute*; ModifierAttribute = OverrideSpecifier | VIRTUAL_KEYWORD; (* Introduced in 0.6.0 *) @@ -823,10 +823,10 @@ EventDefinition = EVENT_KEYWORD SEMICOLON; EventParametersDeclaration = OPEN_PAREN - EventParameters? + EventParameters CLOSE_PAREN; -EventParameters = EventParameter (COMMA EventParameter)*; +EventParameters = (EventParameter (COMMA EventParameter)*)?; EventParameter = TypeName INDEXED_KEYWORD? @@ -851,11 +851,11 @@ ErrorDefinition = ERROR_KEYWORD (* Introduced in 0.8.4 *) ErrorParametersDeclaration = OPEN_PAREN - ErrorParameters? + ErrorParameters CLOSE_PAREN; (* Introduced in 0.8.4 *) -ErrorParameters = ErrorParameter (COMMA ErrorParameter)*; +ErrorParameters = (ErrorParameter (COMMA ErrorParameter)*)?; (* Introduced in 0.8.4 *) ErrorParameter = TypeName @@ -875,10 +875,10 @@ TypeName = ArrayTypeName FunctionType = FUNCTION_KEYWORD ParametersDeclaration - FunctionTypeAttributes? + FunctionTypeAttributes ReturnsDeclaration?; -FunctionTypeAttributes = FunctionTypeAttribute+; +FunctionTypeAttributes = FunctionTypeAttribute*; FunctionTypeAttribute = INTERNAL_KEYWORD | EXTERNAL_KEYWORD @@ -926,10 +926,10 @@ AddressType = ADDRESS_KEYWORD (* 4.1. Blocks: *) Block = OPEN_BRACE - Statements? + Statements CLOSE_BRACE; -Statements = Statement+; +Statements = Statement*; Statement = ExpressionStatement | VariableDeclarationStatement @@ -1154,10 +1154,10 @@ ArgumentsDeclaration = PositionalArgumentsDeclaration | NamedArgumentsDeclaration; PositionalArgumentsDeclaration = OPEN_PAREN - PositionalArguments? + PositionalArguments CLOSE_PAREN; -PositionalArguments = Expression (COMMA Expression)*; +PositionalArguments = (Expression (COMMA Expression)*)?; NamedArgumentsDeclaration = OPEN_PAREN NamedArgumentGroup? @@ -1167,10 +1167,10 @@ NamedArgumentsDeclaration = OPEN_PAREN NamedArgumentGroups = NamedArgumentGroup+; NamedArgumentGroup = OPEN_BRACE - NamedArguments? + NamedArguments CLOSE_BRACE; -NamedArguments = NamedArgument (COMMA NamedArgument)*; +NamedArguments = (NamedArgument (COMMA NamedArgument)*)?; NamedArgument = IDENTIFIER COLON @@ -1317,10 +1317,10 @@ IDENTIFIER = «RAW_IDENTIFIER»; (* 6.1. Yul Statements: *) YulBlock = OPEN_BRACE - YulStatements? + YulStatements CLOSE_BRACE; -YulStatements = YulStatement+; +YulStatements = YulStatement*; YulStatement = YulBlock | YulFunctionDefinition @@ -1342,10 +1342,10 @@ YulFunctionDefinition = YUL_FUNCTION_KEYWORD YulBlock; YulParametersDeclaration = OPEN_PAREN - YulParameters? + YulParameters CLOSE_PAREN; -YulParameters = YUL_IDENTIFIER (COMMA YUL_IDENTIFIER)*; +YulParameters = (YUL_IDENTIFIER (COMMA YUL_IDENTIFIER)*)?; YulReturnsDeclaration = MINUS_GREATER_THAN YulReturnVariables; @@ -1414,7 +1414,7 @@ YulExpression = YulFunctionCallExpression | YulBuiltInFunction | YulIdentifierPath; -YulArguments = YulExpression (COMMA YulExpression)*; +YulArguments = (YulExpression (COMMA YulExpression)*)?; YulIdentifierPaths = YulIdentifierPath (COMMA YulIdentifierPath)*; 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 aecc8a0448..f2d3a393fd 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 @@ -8,13 +8,13 @@ ``` -
SourceUnit = SourceUnitMembers?;
+
SourceUnit = SourceUnitMembers;
```{ .ebnf #SourceUnitMembers } ``` -
SourceUnitMembers = SourceUnitMember+;
+
SourceUnitMembers = SourceUnitMember*;
```{ .ebnf #SourceUnitMember } 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 3bf8348af2..b2524eefd4 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 @@ -8,7 +8,7 @@ ``` -
ContractDefinition = ABSTRACT_KEYWORD? (* Introduced in 0.6.0 *)
CONTRACT_KEYWORD
IDENTIFIER
InheritanceSpecifier?
OPEN_BRACE
ContractMembers?
CLOSE_BRACE;
+
ContractDefinition = ABSTRACT_KEYWORD? (* Introduced in 0.6.0 *)
CONTRACT_KEYWORD
IDENTIFIER
InheritanceSpecifier?
OPEN_BRACE
ContractMembers
CLOSE_BRACE;
```{ .ebnf #InheritanceSpecifier } @@ -32,7 +32,7 @@ ``` -
ContractMembers = ContractMember+;
+
ContractMembers = ContractMember*;
```{ .ebnf #ContractMember } diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/02-interfaces.md b/crates/solidity/outputs/spec/generated/public/02-definitions/02-interfaces.md index 742604b928..7f42a81ff5 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/02-interfaces.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/02-interfaces.md @@ -8,12 +8,12 @@ ``` -
InterfaceDefinition = INTERFACE_KEYWORD
IDENTIFIER
InheritanceSpecifier?
OPEN_BRACE
InterfaceMembers?
CLOSE_BRACE;
+
InterfaceDefinition = INTERFACE_KEYWORD
IDENTIFIER
InheritanceSpecifier?
OPEN_BRACE
InterfaceMembers
CLOSE_BRACE;
```{ .ebnf #InterfaceMembers } ``` -
InterfaceMembers = ContractMember+;
+
InterfaceMembers = ContractMember*;
--8<-- "crates/solidity/inputs/language/docs/02-definitions/02-interfaces.md" diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/03-libraries.md b/crates/solidity/outputs/spec/generated/public/02-definitions/03-libraries.md index da67f972b2..05ca86f044 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/03-libraries.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/03-libraries.md @@ -8,12 +8,12 @@ ``` -
LibraryDefinition = LIBRARY_KEYWORD
IDENTIFIER
OPEN_BRACE
LibraryMembers?
CLOSE_BRACE;
+
LibraryDefinition = LIBRARY_KEYWORD
IDENTIFIER
OPEN_BRACE
LibraryMembers
CLOSE_BRACE;
```{ .ebnf #LibraryMembers } ``` -
LibraryMembers = ContractMember+;
+
LibraryMembers = ContractMember*;
--8<-- "crates/solidity/inputs/language/docs/02-definitions/03-libraries.md" diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/04-structs.md b/crates/solidity/outputs/spec/generated/public/02-definitions/04-structs.md index 2023e7e6df..bf8d3340af 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/04-structs.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/04-structs.md @@ -8,13 +8,13 @@ ``` -
StructDefinition = STRUCT_KEYWORD
IDENTIFIER
OPEN_BRACE
StructMembers?
CLOSE_BRACE;
+
StructDefinition = STRUCT_KEYWORD
IDENTIFIER
OPEN_BRACE
StructMembers
CLOSE_BRACE;
```{ .ebnf #StructMembers } ``` -
StructMembers = StructMember+;
+
StructMembers = StructMember*;
```{ .ebnf #StructMember } diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/05-enums.md b/crates/solidity/outputs/spec/generated/public/02-definitions/05-enums.md index d78be65d9c..d5a546c813 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/05-enums.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/05-enums.md @@ -8,12 +8,12 @@ ``` -
EnumDefinition = ENUM_KEYWORD
IDENTIFIER
OPEN_BRACE
EnumMembers?
CLOSE_BRACE;
+
EnumDefinition = ENUM_KEYWORD
IDENTIFIER
OPEN_BRACE
EnumMembers
CLOSE_BRACE;
```{ .ebnf #EnumMembers } ``` -
EnumMembers = IDENTIFIER (COMMA IDENTIFIER)*;
+
EnumMembers = (IDENTIFIER (COMMA IDENTIFIER)*)?;
--8<-- "crates/solidity/inputs/language/docs/02-definitions/05-enums.md" diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/07-state-variables.md b/crates/solidity/outputs/spec/generated/public/02-definitions/07-state-variables.md index 86a7251725..490469108d 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/07-state-variables.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/07-state-variables.md @@ -8,7 +8,7 @@ ``` -
StateVariableDefinition = TypeName
StateVariableAttributes?
IDENTIFIER
StateVariableDefinitionValue?
SEMICOLON;
+
StateVariableDefinition = TypeName
StateVariableAttributes
IDENTIFIER
StateVariableDefinitionValue?
SEMICOLON;
```{ .ebnf #StateVariableDefinitionValue } @@ -20,7 +20,7 @@ ``` -
StateVariableAttributes = StateVariableAttribute+;
+
StateVariableAttributes = StateVariableAttribute*;
```{ .ebnf #StateVariableAttribute } diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/08-functions.md b/crates/solidity/outputs/spec/generated/public/02-definitions/08-functions.md index f3848a1e04..e3d1ad5cc1 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/08-functions.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/08-functions.md @@ -8,7 +8,7 @@ ``` -
FunctionDefinition = FUNCTION_KEYWORD
FunctionName
ParametersDeclaration
FunctionAttributes?
ReturnsDeclaration?
FunctionBody;
+
FunctionDefinition = FUNCTION_KEYWORD
FunctionName
ParametersDeclaration
FunctionAttributes
ReturnsDeclaration?
FunctionBody;
```{ .ebnf #FunctionName } @@ -20,13 +20,13 @@ ``` -
ParametersDeclaration = OPEN_PAREN
Parameters?
CLOSE_PAREN;
+
ParametersDeclaration = OPEN_PAREN
Parameters
CLOSE_PAREN;
```{ .ebnf #Parameters } ``` -
Parameters = Parameter (COMMA Parameter)*;
+
Parameters = (Parameter (COMMA Parameter)*)?;
```{ .ebnf #Parameter } @@ -38,7 +38,7 @@ ``` -
FunctionAttributes = FunctionAttribute+;
+
FunctionAttributes = FunctionAttribute*;
```{ .ebnf #FunctionAttribute } @@ -80,13 +80,13 @@ ``` -
(* Introduced in 0.4.22 *)
ConstructorDefinition = CONSTRUCTOR_KEYWORD
ParametersDeclaration
ConstructorAttributes?
Block;
+
(* Introduced in 0.4.22 *)
ConstructorDefinition = CONSTRUCTOR_KEYWORD
ParametersDeclaration
ConstructorAttributes
Block;
```{ .ebnf #ConstructorAttributes } ``` -
(* Introduced in 0.4.22 *)
ConstructorAttributes = ConstructorAttribute+;
+
(* Introduced in 0.4.22 *)
ConstructorAttributes = ConstructorAttribute*;
```{ .ebnf #ConstructorAttribute } @@ -98,13 +98,13 @@ ``` -
(* Deprecated in 0.6.0 *)
UnnamedFunctionDefinition = FUNCTION_KEYWORD
ParametersDeclaration
UnnamedFunctionAttributes?
FunctionBody;
+
(* Deprecated in 0.6.0 *)
UnnamedFunctionDefinition = FUNCTION_KEYWORD
ParametersDeclaration
UnnamedFunctionAttributes
FunctionBody;
```{ .ebnf #UnnamedFunctionAttributes } ``` -
(* Deprecated in 0.6.0 *)
UnnamedFunctionAttributes = UnnamedFunctionAttribute+;
+
(* Deprecated in 0.6.0 *)
UnnamedFunctionAttributes = UnnamedFunctionAttribute*;
```{ .ebnf #UnnamedFunctionAttribute } @@ -116,13 +116,13 @@ ``` -
(* Introduced in 0.6.0 *)
FallbackFunctionDefinition = FALLBACK_KEYWORD
ParametersDeclaration
FallbackFunctionAttributes?
ReturnsDeclaration?
FunctionBody;
+
(* Introduced in 0.6.0 *)
FallbackFunctionDefinition = FALLBACK_KEYWORD
ParametersDeclaration
FallbackFunctionAttributes
ReturnsDeclaration?
FunctionBody;
```{ .ebnf #FallbackFunctionAttributes } ``` -
(* Introduced in 0.6.0 *)
FallbackFunctionAttributes = FallbackFunctionAttribute+;
+
(* Introduced in 0.6.0 *)
FallbackFunctionAttributes = FallbackFunctionAttribute*;
```{ .ebnf #FallbackFunctionAttribute } @@ -134,13 +134,13 @@ ``` -
(* Introduced in 0.6.0 *)
ReceiveFunctionDefinition = RECEIVE_KEYWORD
ParametersDeclaration
ReceiveFunctionAttributes?
FunctionBody;
+
(* Introduced in 0.6.0 *)
ReceiveFunctionDefinition = RECEIVE_KEYWORD
ParametersDeclaration
ReceiveFunctionAttributes
FunctionBody;
```{ .ebnf #ReceiveFunctionAttributes } ``` -
(* Introduced in 0.6.0 *)
ReceiveFunctionAttributes = ReceiveFunctionAttribute+;
+
(* Introduced in 0.6.0 *)
ReceiveFunctionAttributes = ReceiveFunctionAttribute*;
```{ .ebnf #ReceiveFunctionAttribute } diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/09-modifiers.md b/crates/solidity/outputs/spec/generated/public/02-definitions/09-modifiers.md index 80b4b1f70f..40079030f9 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/09-modifiers.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/09-modifiers.md @@ -8,13 +8,13 @@ ``` -
ModifierDefinition = MODIFIER_KEYWORD
IDENTIFIER
ParametersDeclaration?
ModifierAttributes?
FunctionBody;
+
ModifierDefinition = MODIFIER_KEYWORD
IDENTIFIER
ParametersDeclaration?
ModifierAttributes
FunctionBody;
```{ .ebnf #ModifierAttributes } ``` -
ModifierAttributes = ModifierAttribute+;
+
ModifierAttributes = ModifierAttribute*;
```{ .ebnf #ModifierAttribute } diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/10-events.md b/crates/solidity/outputs/spec/generated/public/02-definitions/10-events.md index 551b1bd68d..e9e83bf53e 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/10-events.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/10-events.md @@ -14,13 +14,13 @@ ``` -
EventParametersDeclaration = OPEN_PAREN
EventParameters?
CLOSE_PAREN;
+
EventParametersDeclaration = OPEN_PAREN
EventParameters
CLOSE_PAREN;
```{ .ebnf #EventParameters } ``` -
EventParameters = EventParameter (COMMA EventParameter)*;
+
EventParameters = (EventParameter (COMMA EventParameter)*)?;
```{ .ebnf #EventParameter } diff --git a/crates/solidity/outputs/spec/generated/public/02-definitions/12-errors.md b/crates/solidity/outputs/spec/generated/public/02-definitions/12-errors.md index f55e9c8586..1141f48b20 100644 --- a/crates/solidity/outputs/spec/generated/public/02-definitions/12-errors.md +++ b/crates/solidity/outputs/spec/generated/public/02-definitions/12-errors.md @@ -14,13 +14,13 @@ ``` -
(* Introduced in 0.8.4 *)
ErrorParametersDeclaration = OPEN_PAREN
ErrorParameters?
CLOSE_PAREN;
+
(* Introduced in 0.8.4 *)
ErrorParametersDeclaration = OPEN_PAREN
ErrorParameters
CLOSE_PAREN;
```{ .ebnf #ErrorParameters } ``` -
(* Introduced in 0.8.4 *)
ErrorParameters = ErrorParameter (COMMA ErrorParameter)*;
+
(* Introduced in 0.8.4 *)
ErrorParameters = (ErrorParameter (COMMA ErrorParameter)*)?;
```{ .ebnf #ErrorParameter } diff --git a/crates/solidity/outputs/spec/generated/public/03-types/01-advanced-types.md b/crates/solidity/outputs/spec/generated/public/03-types/01-advanced-types.md index 3a83c060b9..79d2e7ac27 100644 --- a/crates/solidity/outputs/spec/generated/public/03-types/01-advanced-types.md +++ b/crates/solidity/outputs/spec/generated/public/03-types/01-advanced-types.md @@ -14,13 +14,13 @@ ``` -
FunctionType = FUNCTION_KEYWORD
ParametersDeclaration
FunctionTypeAttributes?
ReturnsDeclaration?;
+
FunctionType = FUNCTION_KEYWORD
ParametersDeclaration
FunctionTypeAttributes
ReturnsDeclaration?;
```{ .ebnf #FunctionTypeAttributes } ``` -
FunctionTypeAttributes = FunctionTypeAttribute+;
+
FunctionTypeAttributes = FunctionTypeAttribute*;
```{ .ebnf #FunctionTypeAttribute } 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 2d72e1b3bd..e0e378d6ce 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 @@ -8,13 +8,13 @@ ``` -
Block = OPEN_BRACE
Statements?
CLOSE_BRACE;
+
Block = OPEN_BRACE
Statements
CLOSE_BRACE;
```{ .ebnf #Statements } ``` -
Statements = Statement+;
+
Statements = Statement*;
```{ .ebnf #Statement } diff --git a/crates/solidity/outputs/spec/generated/public/05-expressions/02-function-calls.md b/crates/solidity/outputs/spec/generated/public/05-expressions/02-function-calls.md index 78e43cdcec..c204852e94 100644 --- a/crates/solidity/outputs/spec/generated/public/05-expressions/02-function-calls.md +++ b/crates/solidity/outputs/spec/generated/public/05-expressions/02-function-calls.md @@ -20,13 +20,13 @@ ``` -
PositionalArgumentsDeclaration = OPEN_PAREN
PositionalArguments?
CLOSE_PAREN;
+
PositionalArgumentsDeclaration = OPEN_PAREN
PositionalArguments
CLOSE_PAREN;
```{ .ebnf #PositionalArguments } ``` -
PositionalArguments = Expression (COMMA Expression)*;
+
PositionalArguments = (Expression (COMMA Expression)*)?;
```{ .ebnf #NamedArgumentsDeclaration } @@ -44,13 +44,13 @@ ``` -
NamedArgumentGroup = OPEN_BRACE
NamedArguments?
CLOSE_BRACE;
+
NamedArgumentGroup = OPEN_BRACE
NamedArguments
CLOSE_BRACE;
```{ .ebnf #NamedArguments } ``` -
NamedArguments = NamedArgument (COMMA NamedArgument)*;
+
NamedArguments = (NamedArgument (COMMA NamedArgument)*)?;
```{ .ebnf #NamedArgument } 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 c69ad1364a..ca979a79e4 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 @@ -8,13 +8,13 @@ ``` -
YulBlock = OPEN_BRACE
YulStatements?
CLOSE_BRACE;
+
YulBlock = OPEN_BRACE
YulStatements
CLOSE_BRACE;
```{ .ebnf #YulStatements } ``` -
YulStatements = YulStatement+;
+
YulStatements = YulStatement*;
```{ .ebnf #YulStatement } @@ -32,13 +32,13 @@ ``` -
YulParametersDeclaration = OPEN_PAREN
YulParameters?
CLOSE_PAREN;
+
YulParametersDeclaration = OPEN_PAREN
YulParameters
CLOSE_PAREN;
```{ .ebnf #YulParameters } ``` -
YulParameters = YUL_IDENTIFIER (COMMA YUL_IDENTIFIER)*;
+
YulParameters = (YUL_IDENTIFIER (COMMA YUL_IDENTIFIER)*)?;
```{ .ebnf #YulReturnsDeclaration } diff --git a/crates/solidity/outputs/spec/generated/public/06-yul/02-yul-expressions.md b/crates/solidity/outputs/spec/generated/public/06-yul/02-yul-expressions.md index 5b9c5d75e6..52cab70bc7 100644 --- a/crates/solidity/outputs/spec/generated/public/06-yul/02-yul-expressions.md +++ b/crates/solidity/outputs/spec/generated/public/06-yul/02-yul-expressions.md @@ -14,7 +14,7 @@ ``` -
YulArguments = YulExpression (COMMA YulExpression)*;
+
YulArguments = (YulExpression (COMMA YulExpression)*)?;
```{ .ebnf #YulIdentifierPaths } diff --git a/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/generated/0.4.11-success.yml index 4e0c71a6ad..8fc4c577d2 100644 --- a/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/AssemblyStatement/simple/generated/0.4.11-success.yml @@ -23,6 +23,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (33..34) - (open_brace꞉ OpenBrace): "{" # (34..35) - (TrailingTrivia) ► (EndOfLine): "\n" # (35..36) + - (statements꞉ YulStatements): [] # (36..36) - (LeadingTrivia) ► (EndOfLine): "\n" # (36..37) - (close_brace꞉ CloseBrace): "}" # (37..38) - (TrailingTrivia) ► (EndOfLine): "\n" # (38..39) 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 ea04ee9099..85d92e31ea 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 @@ -16,6 +16,7 @@ Errors: # 1 total Tree: - (Block): # "{ unchecked { x = 1; } }" (0..24) - (open_brace꞉ OpenBrace): "{" # (0..1) + - (statements꞉ Statements): [] # (1..1) - (LeadingTrivia) ► (Whitespace): " " # (1..2) - (SKIPPED): "unchecked { x = 1; } " # (2..23) - (close_brace꞉ CloseBrace): "}" # (23..24) 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 1c1b9a8e15..b9e676a5ff 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 @@ -16,6 +16,7 @@ Errors: # 1 total Tree: - (Block): # "{ unchecked { x = 1; } }" (0..24) - (open_brace꞉ OpenBrace): "{" # (0..1) + - (statements꞉ Statements): [] # (1..1) - (LeadingTrivia) ► (Whitespace): " " # (1..2) - (SKIPPED): "unchecked { x = 1; } " # (2..23) - (close_brace꞉ CloseBrace): "}" # (23..24) 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 64d94ebab4..3acb2fdc3a 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 @@ -16,6 +16,7 @@ Errors: # 1 total Tree: - (Block): # "{ unchecked { x = 1; } }" (0..24) - (open_brace꞉ OpenBrace): "{" # (0..1) + - (statements꞉ Statements): [] # (1..1) - (LeadingTrivia) ► (Whitespace): " " # (1..2) - (SKIPPED): "unchecked { x = 1; } " # (2..23) - (close_brace꞉ CloseBrace): "}" # (23..24) 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 9aaee15ed3..65d5e9e1c9 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 @@ -16,6 +16,7 @@ Errors: # 1 total Tree: - (Block): # "{ unchecked { x = 1; } }" (0..24) - (open_brace꞉ OpenBrace): "{" # (0..1) + - (statements꞉ Statements): [] # (1..1) - (LeadingTrivia) ► (Whitespace): " " # (1..2) - (SKIPPED): "unchecked { x = 1; } " # (2..23) - (close_brace꞉ CloseBrace): "}" # (23..24) diff --git a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.4.22-success.yml b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.4.22-success.yml index e41bba0ffe..62a7e6c93d 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.4.22-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.4.22-success.yml @@ -11,6 +11,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ ConstructorAttributes): # " override" (14..23) - (item꞉ ConstructorAttribute) ► (variant꞉ ModifierInvocation) ► (name꞉ IdentifierPath): # " override" (14..23) @@ -19,5 +20,6 @@ Tree: - (body꞉ Block): # " {}\n" (23..27) - (LeadingTrivia) ► (Whitespace): " " # (23..24) - (open_brace꞉ OpenBrace): "{" # (24..25) + - (statements꞉ Statements): [] # (25..25) - (close_brace꞉ CloseBrace): "}" # (25..26) - (TrailingTrivia) ► (EndOfLine): "\n" # (26..27) diff --git a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.5.0-failure.yml index 2ce9a9cdcf..cba728d6fb 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.5.0-failure.yml @@ -19,5 +19,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) + - (attributes꞉ ConstructorAttributes): [] # (14..14) - (SKIPPED): " override {}\n" # (14..27) diff --git a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.6.0-success.yml index a52619c76c..8ce4170409 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.6.0-success.yml @@ -11,6 +11,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ ConstructorAttributes): # " override" (14..23) - (item꞉ ConstructorAttribute): # " override" (14..23) @@ -19,5 +20,6 @@ Tree: - (body꞉ Block): # " {}\n" (23..27) - (LeadingTrivia) ► (Whitespace): " " # (23..24) - (open_brace꞉ OpenBrace): "{" # (24..25) + - (statements꞉ Statements): [] # (25..25) - (close_brace꞉ CloseBrace): "}" # (25..26) - (TrailingTrivia) ► (EndOfLine): "\n" # (26..27) diff --git a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.6.7-failure.yml b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.6.7-failure.yml index 2ce9a9cdcf..cba728d6fb 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.6.7-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/override_attribute/generated/0.6.7-failure.yml @@ -19,5 +19,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) + - (attributes꞉ ConstructorAttributes): [] # (14..14) - (SKIPPED): " override {}\n" # (14..27) diff --git a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/simple/generated/0.4.22-success.yml b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/simple/generated/0.4.22-success.yml index 3e7a867a76..3ff6cb4220 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/simple/generated/0.4.22-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/simple/generated/0.4.22-success.yml @@ -11,8 +11,11 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) + - (attributes꞉ ConstructorAttributes): [] # (14..14) - (body꞉ Block): # " {}" (14..17) - (LeadingTrivia) ► (Whitespace): " " # (14..15) - (open_brace꞉ OpenBrace): "{" # (15..16) + - (statements꞉ Statements): [] # (16..16) - (close_brace꞉ CloseBrace): "}" # (16..17) diff --git a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.4.22-success.yml b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.4.22-success.yml index 89408cc88d..59a8c5ec03 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.4.22-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.4.22-success.yml @@ -11,6 +11,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ ConstructorAttributes): # " virtual" (14..22) - (item꞉ ConstructorAttribute) ► (variant꞉ ModifierInvocation) ► (name꞉ IdentifierPath): # " virtual" (14..22) @@ -19,5 +20,6 @@ Tree: - (body꞉ Block): # " {}\n" (22..26) - (LeadingTrivia) ► (Whitespace): " " # (22..23) - (open_brace꞉ OpenBrace): "{" # (23..24) + - (statements꞉ Statements): [] # (24..24) - (close_brace꞉ CloseBrace): "}" # (24..25) - (TrailingTrivia) ► (EndOfLine): "\n" # (25..26) diff --git a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.6.0-success.yml index 311f356dce..387f888ac1 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.6.0-success.yml @@ -11,6 +11,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ ConstructorAttributes): # " virtual" (14..22) - (item꞉ ConstructorAttribute): # " virtual" (14..22) @@ -19,5 +20,6 @@ Tree: - (body꞉ Block): # " {}\n" (22..26) - (LeadingTrivia) ► (Whitespace): " " # (22..23) - (open_brace꞉ OpenBrace): "{" # (23..24) + - (statements꞉ Statements): [] # (24..24) - (close_brace꞉ CloseBrace): "}" # (24..25) - (TrailingTrivia) ► (EndOfLine): "\n" # (25..26) diff --git a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.6.7-failure.yml b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.6.7-failure.yml index db84ebb776..8b42908947 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.6.7-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstructorDefinition/virtual_attribute/generated/0.6.7-failure.yml @@ -19,5 +19,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) + - (attributes꞉ ConstructorAttributes): [] # (14..14) - (SKIPPED): " virtual {}\n" # (14..26) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/abstract_contract/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/abstract_contract/generated/0.6.0-success.yml index 28e2df552b..0a6e13a9f0 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/abstract_contract/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/abstract_contract/generated/0.6.0-success.yml @@ -14,5 +14,6 @@ Tree: - (name꞉ Identifier): "Sample" # (18..24) - (LeadingTrivia) ► (Whitespace): " " # (24..25) - (open_brace꞉ OpenBrace): "{" # (25..26) + - (members꞉ ContractMembers): [] # (26..26) - (close_brace꞉ CloseBrace): "}" # (26..27) - (TrailingTrivia) ► (EndOfLine): "\n" # (27..28) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.4.11-failure.yml index fd6f6c2703..be80c55229 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.4.11-failure.yml @@ -35,9 +35,11 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (111..112) - (TrailingTrivia) ► (EndOfLine): "\n" # (112..113) - (members꞉ ContractMembers): # "\tconstructor" (113..125) - - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition) ► (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # "\tconstructor" (113..125) - - (LeadingTrivia) ► (Whitespace): "\t" # (113..114) - - (item꞉ Identifier): "constructor" # (114..125) + - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition): # "\tconstructor" (113..125) + - (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # "\tconstructor" (113..125) + - (LeadingTrivia) ► (Whitespace): "\t" # (113..114) + - (item꞉ Identifier): "constructor" # (114..125) + - (attributes꞉ StateVariableAttributes): [] # (125..125) - (SKIPPED): "() {}\n function func() public {\n\t\tuint256 const..." # (125..189) - (close_brace꞉ CloseBrace): "}" # (189..190) - (TrailingTrivia) ► (EndOfLine): "\n" # (190..191) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.4.22-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.4.22-success.yml index a6165d729c..3d2881edcf 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.4.22-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/constructor_contextual/generated/0.4.22-success.yml @@ -30,10 +30,13 @@ Tree: - (constructor_keyword꞉ ConstructorKeyword): "constructor" # (114..125) - (parameters꞉ ParametersDeclaration): # "()" (125..127) - (open_paren꞉ OpenParen): "(" # (125..126) + - (parameters꞉ Parameters): [] # (126..126) - (close_paren꞉ CloseParen): ")" # (126..127) + - (attributes꞉ ConstructorAttributes): [] # (127..127) - (body꞉ Block): # " {}\n" (127..131) - (LeadingTrivia) ► (Whitespace): " " # (127..128) - (open_brace꞉ OpenBrace): "{" # (128..129) + - (statements꞉ Statements): [] # (129..129) - (close_brace꞉ CloseBrace): "}" # (129..130) - (TrailingTrivia) ► (EndOfLine): "\n" # (130..131) - (item꞉ ContractMember) ► (variant꞉ FunctionDefinition): # " function func() public {\n\t\tuint256 constructor..." (131..189) @@ -44,6 +47,7 @@ Tree: - (variant꞉ Identifier): "func" # (144..148) - (parameters꞉ ParametersDeclaration): # "()" (148..150) - (open_paren꞉ OpenParen): "(" # (148..149) + - (parameters꞉ Parameters): [] # (149..149) - (close_paren꞉ CloseParen): ")" # (149..150) - (attributes꞉ FunctionAttributes): # " public" (150..157) - (item꞉ FunctionAttribute): # " public" (150..157) 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 ee6843d757..a1ec7b46c0 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 @@ -38,10 +38,13 @@ Tree: - (constructor_keyword꞉ ConstructorKeyword): "constructor" # (114..125) - (parameters꞉ ParametersDeclaration): # "()" (125..127) - (open_paren꞉ OpenParen): "(" # (125..126) + - (parameters꞉ Parameters): [] # (126..126) - (close_paren꞉ CloseParen): ")" # (126..127) + - (attributes꞉ ConstructorAttributes): [] # (127..127) - (body꞉ Block): # " {}\n" (127..131) - (LeadingTrivia) ► (Whitespace): " " # (127..128) - (open_brace꞉ OpenBrace): "{" # (128..129) + - (statements꞉ Statements): [] # (129..129) - (close_brace꞉ CloseBrace): "}" # (129..130) - (TrailingTrivia) ► (EndOfLine): "\n" # (130..131) - (item꞉ ContractMember) ► (variant꞉ FunctionDefinition): # " function func() public {\n\t\tuint256 constructor..." (131..189) @@ -52,6 +55,7 @@ Tree: - (variant꞉ Identifier): "func" # (144..148) - (parameters꞉ ParametersDeclaration): # "()" (148..150) - (open_paren꞉ OpenParen): "(" # (148..149) + - (parameters꞉ Parameters): [] # (149..149) - (close_paren꞉ CloseParen): ")" # (149..150) - (attributes꞉ FunctionAttributes): # " public" (150..157) - (item꞉ FunctionAttribute): # " public" (150..157) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.4.11-failure.yml index 803c6dcfc1..7aa5794348 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.4.11-failure.yml @@ -41,6 +41,7 @@ Tree: - (name꞉ Identifier): "Deposit" # (138..145) - (parameters꞉ EventParametersDeclaration): # "()" (145..147) - (open_paren꞉ OpenParen): "(" # (145..146) + - (parameters꞉ EventParameters): [] # (146..146) - (close_paren꞉ CloseParen): ")" # (146..147) - (semicolon꞉ Semicolon): ";" # (147..148) - (TrailingTrivia) ► (EndOfLine): "\n" # (148..149) @@ -52,6 +53,7 @@ Tree: - (variant꞉ Identifier): "deposit" # (162..169) - (parameters꞉ ParametersDeclaration): # "()" (169..171) - (open_paren꞉ OpenParen): "(" # (169..170) + - (parameters꞉ Parameters): [] # (170..170) - (close_paren꞉ CloseParen): ")" # (170..171) - (attributes꞉ FunctionAttributes): # " public payable" (171..186) - (item꞉ FunctionAttribute): # " public" (171..178) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.4.21-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.4.21-success.yml index cd160c0061..28c6f7ba65 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.4.21-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/emit_contextual/generated/0.4.21-success.yml @@ -33,6 +33,7 @@ Tree: - (name꞉ Identifier): "Deposit" # (138..145) - (parameters꞉ EventParametersDeclaration): # "()" (145..147) - (open_paren꞉ OpenParen): "(" # (145..146) + - (parameters꞉ EventParameters): [] # (146..146) - (close_paren꞉ CloseParen): ")" # (146..147) - (semicolon꞉ Semicolon): ";" # (147..148) - (TrailingTrivia) ► (EndOfLine): "\n" # (148..149) @@ -44,6 +45,7 @@ Tree: - (variant꞉ Identifier): "deposit" # (162..169) - (parameters꞉ ParametersDeclaration): # "()" (169..171) - (open_paren꞉ OpenParen): "(" # (169..170) + - (parameters꞉ Parameters): [] # (170..170) - (close_paren꞉ CloseParen): ")" # (170..171) - (attributes꞉ FunctionAttributes): # " public payable" (171..186) - (item꞉ FunctionAttribute): # " public" (171..178) @@ -73,6 +75,7 @@ Tree: - (item꞉ Identifier): "Deposit" # (224..231) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (231..233) - (open_paren꞉ OpenParen): "(" # (231..232) + - (arguments꞉ PositionalArguments): [] # (232..232) - (close_paren꞉ CloseParen): ")" # (232..233) - (semicolon꞉ Semicolon): ";" # (233..234) - (TrailingTrivia) ► (EndOfLine): "\n" # (234..235) 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 796c7ea03b..5f0ed37887 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 @@ -41,6 +41,7 @@ Tree: - (name꞉ Identifier): "Deposit" # (138..145) - (parameters꞉ EventParametersDeclaration): # "()" (145..147) - (open_paren꞉ OpenParen): "(" # (145..146) + - (parameters꞉ EventParameters): [] # (146..146) - (close_paren꞉ CloseParen): ")" # (146..147) - (semicolon꞉ Semicolon): ";" # (147..148) - (TrailingTrivia) ► (EndOfLine): "\n" # (148..149) @@ -52,6 +53,7 @@ Tree: - (variant꞉ Identifier): "deposit" # (162..169) - (parameters꞉ ParametersDeclaration): # "()" (169..171) - (open_paren꞉ OpenParen): "(" # (169..170) + - (parameters꞉ Parameters): [] # (170..170) - (close_paren꞉ CloseParen): ")" # (170..171) - (attributes꞉ FunctionAttributes): # " public payable" (171..186) - (item꞉ FunctionAttribute): # " public" (171..178) @@ -81,6 +83,7 @@ Tree: - (item꞉ Identifier): "Deposit" # (224..231) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (231..233) - (open_paren꞉ OpenParen): "(" # (231..232) + - (arguments꞉ PositionalArguments): [] # (232..232) - (close_paren꞉ CloseParen): ")" # (232..233) - (semicolon꞉ Semicolon): ";" # (233..234) - (TrailingTrivia) ► (EndOfLine): "\n" # (234..235) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/empty_contract/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/empty_contract/generated/0.4.11-success.yml index 7a2acce84e..3b1d4131af 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/empty_contract/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/empty_contract/generated/0.4.11-success.yml @@ -12,5 +12,6 @@ Tree: - (name꞉ Identifier): "Sample" # (9..15) - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) + - (members꞉ ContractMembers): [] # (17..17) - (close_brace꞉ CloseBrace): "}" # (17..18) - (TrailingTrivia) ► (EndOfLine): "\n" # (18..19) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/header_comment/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/header_comment/generated/0.4.11-success.yml index 1c39a8dac2..34048a6283 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/header_comment/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/header_comment/generated/0.4.11-success.yml @@ -35,4 +35,5 @@ Tree: - (name꞉ Identifier): "Foo" # (1995..1998) - (LeadingTrivia) ► (Whitespace): " " # (1998..1999) - (open_brace꞉ OpenBrace): "{" # (1999..2000) + - (members꞉ ContractMembers): [] # (2000..2000) - (close_brace꞉ CloseBrace): "}" # (2000..2001) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/inheritence_specifier/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/inheritence_specifier/generated/0.4.11-success.yml index 2b98744cf2..8055052592 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/inheritence_specifier/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/inheritence_specifier/generated/0.4.11-success.yml @@ -37,4 +37,5 @@ Tree: - (item꞉ Identifier): "Baz" # (35..38) - (LeadingTrivia) ► (Whitespace): " " # (38..39) - (open_brace꞉ OpenBrace): "{" # (39..40) + - (members꞉ ContractMembers): [] # (40..40) - (close_brace꞉ CloseBrace): "}" # (40..41) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_constructor_definition/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_constructor_definition/generated/0.4.11-failure.yml index b881ac145f..d98f752d73 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_constructor_definition/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_constructor_definition/generated/0.4.11-failure.yml @@ -26,8 +26,10 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) - (members꞉ ContractMembers): # " constructor" (18..31) - - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition) ► (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " constructor" (18..31) - - (LeadingTrivia) ► (Whitespace): " " # (18..20) - - (item꞉ Identifier): "constructor" # (20..31) + - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition): # " constructor" (18..31) + - (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " constructor" (18..31) + - (LeadingTrivia) ► (Whitespace): " " # (18..20) + - (item꞉ Identifier): "constructor" # (20..31) + - (attributes꞉ StateVariableAttributes): [] # (31..31) - (SKIPPED): "() public {\n }\n" # (31..47) - (close_brace꞉ CloseBrace): "}" # (47..48) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_constructor_definition/generated/0.4.22-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_constructor_definition/generated/0.4.22-success.yml index ac7354cff4..e0155fea80 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_constructor_definition/generated/0.4.22-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_constructor_definition/generated/0.4.22-success.yml @@ -22,6 +22,7 @@ Tree: - (constructor_keyword꞉ ConstructorKeyword): "constructor" # (20..31) - (parameters꞉ ParametersDeclaration): # "()" (31..33) - (open_paren꞉ OpenParen): "(" # (31..32) + - (parameters꞉ Parameters): [] # (32..32) - (close_paren꞉ CloseParen): ")" # (32..33) - (attributes꞉ ConstructorAttributes): # " public" (33..40) - (item꞉ ConstructorAttribute): # " public" (33..40) @@ -31,6 +32,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (40..41) - (open_brace꞉ OpenBrace): "{" # (41..42) - (TrailingTrivia) ► (EndOfLine): "\n" # (42..43) + - (statements꞉ Statements): [] # (43..43) - (LeadingTrivia) ► (Whitespace): " " # (43..45) - (close_brace꞉ CloseBrace): "}" # (45..46) - (TrailingTrivia) ► (EndOfLine): "\n" # (46..47) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_error_definition/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_error_definition/generated/0.4.11-failure.yml index 6b6ad5d110..360305e4dc 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_error_definition/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_error_definition/generated/0.4.11-failure.yml @@ -28,6 +28,7 @@ Tree: - (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " error" (18..25) - (LeadingTrivia) ► (Whitespace): " " # (18..20) - (item꞉ Identifier): "error" # (20..25) + - (attributes꞉ StateVariableAttributes): [] # (25..25) - (LeadingTrivia) ► (Whitespace): " " # (25..26) - (name꞉ Identifier): "Error1" # (26..32) - (SKIPPED): "()" # (32..34) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_error_definition/generated/0.8.4-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_error_definition/generated/0.8.4-success.yml index b4c0a04d28..2107f59b63 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_error_definition/generated/0.8.4-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_error_definition/generated/0.8.4-success.yml @@ -23,6 +23,7 @@ Tree: - (name꞉ Identifier): "Error1" # (26..32) - (members꞉ ErrorParametersDeclaration): # "()" (32..34) - (open_paren꞉ OpenParen): "(" # (32..33) + - (parameters꞉ ErrorParameters): [] # (33..33) - (close_paren꞉ CloseParen): ")" # (33..34) - (semicolon꞉ Semicolon): ";" # (34..35) - (TrailingTrivia) ► (EndOfLine): "\n" # (35..36) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_fallback_function_definition/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_fallback_function_definition/generated/0.4.11-failure.yml index e43d40c42e..bf88f85164 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_fallback_function_definition/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_fallback_function_definition/generated/0.4.11-failure.yml @@ -26,8 +26,10 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) - (members꞉ ContractMembers): # " fallback" (18..28) - - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition) ► (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " fallback" (18..28) - - (LeadingTrivia) ► (Whitespace): " " # (18..20) - - (item꞉ Identifier): "fallback" # (20..28) + - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition): # " fallback" (18..28) + - (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " fallback" (18..28) + - (LeadingTrivia) ► (Whitespace): " " # (18..20) + - (item꞉ Identifier): "fallback" # (20..28) + - (attributes꞉ StateVariableAttributes): [] # (28..28) - (SKIPPED): "() {\n }\n" # (28..37) - (close_brace꞉ CloseBrace): "}" # (37..38) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_fallback_function_definition/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_fallback_function_definition/generated/0.6.0-success.yml index 11e9f59fe0..498b1c7d22 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_fallback_function_definition/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_fallback_function_definition/generated/0.6.0-success.yml @@ -22,11 +22,14 @@ Tree: - (fallback_keyword꞉ FallbackKeyword): "fallback" # (20..28) - (parameters꞉ ParametersDeclaration): # "()" (28..30) - (open_paren꞉ OpenParen): "(" # (28..29) + - (parameters꞉ Parameters): [] # (29..29) - (close_paren꞉ CloseParen): ")" # (29..30) + - (attributes꞉ FallbackFunctionAttributes): [] # (30..30) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n }\n" (30..37) - (LeadingTrivia) ► (Whitespace): " " # (30..31) - (open_brace꞉ OpenBrace): "{" # (31..32) - (TrailingTrivia) ► (EndOfLine): "\n" # (32..33) + - (statements꞉ Statements): [] # (33..33) - (LeadingTrivia) ► (Whitespace): " " # (33..35) - (close_brace꞉ CloseBrace): "}" # (35..36) - (TrailingTrivia) ► (EndOfLine): "\n" # (36..37) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_function_definition/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_function_definition/generated/0.4.11-success.yml index 88c28ba031..c227738650 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_function_definition/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_function_definition/generated/0.4.11-success.yml @@ -26,7 +26,9 @@ Tree: - (variant꞉ Identifier): "foo" # (29..32) - (parameters꞉ ParametersDeclaration): # "()" (32..34) - (open_paren꞉ OpenParen): "(" # (32..33) + - (parameters꞉ Parameters): [] # (33..33) - (close_paren꞉ CloseParen): ")" # (33..34) + - (attributes꞉ FunctionAttributes): [] # (34..34) - (returns꞉ ReturnsDeclaration): # " returns (uint)" (34..49) - (LeadingTrivia) ► (Whitespace): " " # (34..35) - (returns_keyword꞉ ReturnsKeyword): "returns" # (35..42) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_modifier_definition/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_modifier_definition/generated/0.4.11-success.yml index 0f6197c27d..b931ea003a 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_modifier_definition/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_modifier_definition/generated/0.4.11-success.yml @@ -25,7 +25,9 @@ Tree: - (name꞉ Identifier): "foo" # (29..32) - (parameters꞉ ParametersDeclaration): # "()" (32..34) - (open_paren꞉ OpenParen): "(" # (32..33) + - (parameters꞉ Parameters): [] # (33..33) - (close_paren꞉ CloseParen): ")" # (33..34) + - (attributes꞉ ModifierAttributes): [] # (34..34) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n _;\n }\n" (34..48) - (LeadingTrivia) ► (Whitespace): " " # (34..35) - (open_brace꞉ OpenBrace): "{" # (35..36) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_receive_function_definition/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_receive_function_definition/generated/0.4.11-failure.yml index e0dc9f3117..d12c2045d5 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_receive_function_definition/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_receive_function_definition/generated/0.4.11-failure.yml @@ -26,8 +26,10 @@ Tree: - (open_brace꞉ OpenBrace): "{" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) - (members꞉ ContractMembers): # " receive" (18..27) - - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition) ► (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " receive" (18..27) - - (LeadingTrivia) ► (Whitespace): " " # (18..20) - - (item꞉ Identifier): "receive" # (20..27) + - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition): # " receive" (18..27) + - (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " receive" (18..27) + - (LeadingTrivia) ► (Whitespace): " " # (18..20) + - (item꞉ Identifier): "receive" # (20..27) + - (attributes꞉ StateVariableAttributes): [] # (27..27) - (SKIPPED): "() {\n }\n" # (27..36) - (close_brace꞉ CloseBrace): "}" # (36..37) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_receive_function_definition/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_receive_function_definition/generated/0.6.0-success.yml index c283adb91c..fba3c6ace6 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_receive_function_definition/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_receive_function_definition/generated/0.6.0-success.yml @@ -22,11 +22,14 @@ Tree: - (receive_keyword꞉ ReceiveKeyword): "receive" # (20..27) - (parameters꞉ ParametersDeclaration): # "()" (27..29) - (open_paren꞉ OpenParen): "(" # (27..28) + - (parameters꞉ Parameters): [] # (28..28) - (close_paren꞉ CloseParen): ")" # (28..29) + - (attributes꞉ ReceiveFunctionAttributes): [] # (29..29) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n }\n" (29..36) - (LeadingTrivia) ► (Whitespace): " " # (29..30) - (open_brace꞉ OpenBrace): "{" # (30..31) - (TrailingTrivia) ► (EndOfLine): "\n" # (31..32) + - (statements꞉ Statements): [] # (32..32) - (LeadingTrivia) ► (Whitespace): " " # (32..34) - (close_brace꞉ CloseBrace): "}" # (34..35) - (TrailingTrivia) ► (EndOfLine): "\n" # (35..36) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.4.11-success.yml index 5b3b705b58..5573b0a8be 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.4.11-success.yml @@ -23,11 +23,14 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (28..31) - (LeadingTrivia) ► (Whitespace): " " # (28..29) - (open_paren꞉ OpenParen): "(" # (29..30) + - (parameters꞉ Parameters): [] # (30..30) - (close_paren꞉ CloseParen): ")" # (30..31) + - (attributes꞉ UnnamedFunctionAttributes): [] # (31..31) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n }\n" (31..38) - (LeadingTrivia) ► (Whitespace): " " # (31..32) - (open_brace꞉ OpenBrace): "{" # (32..33) - (TrailingTrivia) ► (EndOfLine): "\n" # (33..34) + - (statements꞉ Statements): [] # (34..34) - (LeadingTrivia) ► (Whitespace): " " # (34..36) - (close_brace꞉ CloseBrace): "}" # (36..37) - (TrailingTrivia) ► (EndOfLine): "\n" # (37..38) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.6.0-failure.yml index b4d60b3336..c7ab0457b8 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.6.0-failure.yml @@ -33,7 +33,10 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (28..31) - (LeadingTrivia) ► (Whitespace): " " # (28..29) - (open_paren꞉ OpenParen): "(" # (29..30) + - (parameters꞉ Parameters): [] # (30..30) - (close_paren꞉ CloseParen): ")" # (30..31) + - (attributes꞉ FunctionTypeAttributes): [] # (31..31) + - (attributes꞉ StateVariableAttributes): [] # (31..31) - (LeadingTrivia) ► (Whitespace): " " # (31..32) - (SKIPPED): "{\n }\n" # (32..38) - (close_brace꞉ CloseBrace): "}" # (38..39) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.6.5-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.6.5-failure.yml index 506aede9af..10433116d4 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.6.5-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_definition/generated/0.6.5-failure.yml @@ -33,7 +33,10 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (28..31) - (LeadingTrivia) ► (Whitespace): " " # (28..29) - (open_paren꞉ OpenParen): "(" # (29..30) + - (parameters꞉ Parameters): [] # (30..30) - (close_paren꞉ CloseParen): ")" # (30..31) + - (attributes꞉ FunctionTypeAttributes): [] # (31..31) + - (attributes꞉ StateVariableAttributes): [] # (31..31) - (LeadingTrivia) ► (Whitespace): " " # (31..32) - (SKIPPED): "{\n }\n" # (32..38) - (close_brace꞉ CloseBrace): "}" # (38..39) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.4.11-success.yml index 646f9c8574..6161eeea56 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.4.11-success.yml @@ -21,6 +21,7 @@ Tree: - (function_keyword꞉ FunctionKeyword): "function" # (20..28) - (parameters꞉ ParametersDeclaration): # "()" (28..30) - (open_paren꞉ OpenParen): "(" # (28..29) + - (parameters꞉ Parameters): [] # (29..29) - (close_paren꞉ CloseParen): ")" # (29..30) - (attributes꞉ UnnamedFunctionAttributes): # " external payable" (30..47) - (item꞉ UnnamedFunctionAttribute): # " external" (30..39) @@ -32,6 +33,7 @@ Tree: - (body꞉ FunctionBody) ► (variant꞉ Block): # " {}\n" (47..51) - (LeadingTrivia) ► (Whitespace): " " # (47..48) - (open_brace꞉ OpenBrace): "{" # (48..49) + - (statements꞉ Statements): [] # (49..49) - (close_brace꞉ CloseBrace): "}" # (49..50) - (TrailingTrivia) ► (EndOfLine): "\n" # (50..51) - (close_brace꞉ CloseBrace): "}" # (51..52) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.6.0-failure.yml index a05695d562..cfcf86794c 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.6.0-failure.yml @@ -30,6 +30,7 @@ Tree: - (function_keyword꞉ FunctionKeyword): "function" # (20..28) - (parameters꞉ ParametersDeclaration): # "()" (28..30) - (open_paren꞉ OpenParen): "(" # (28..29) + - (parameters꞉ Parameters): [] # (29..29) - (close_paren꞉ CloseParen): ")" # (29..30) - (attributes꞉ FunctionTypeAttributes): # " external payable" (30..47) - (item꞉ FunctionTypeAttribute): # " external" (30..39) @@ -38,6 +39,7 @@ Tree: - (item꞉ FunctionTypeAttribute): # " payable" (39..47) - (LeadingTrivia) ► (Whitespace): " " # (39..40) - (variant꞉ PayableKeyword): "payable" # (40..47) + - (attributes꞉ StateVariableAttributes): [] # (47..47) - (LeadingTrivia) ► (Whitespace): " " # (47..48) - (SKIPPED): "{}\n" # (48..51) - (close_brace꞉ CloseBrace): "}" # (51..52) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.6.5-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.6.5-failure.yml index 3e4da1b557..6e42e1167e 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.6.5-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_unnamed_function_with_attrs_definition/generated/0.6.5-failure.yml @@ -30,6 +30,7 @@ Tree: - (function_keyword꞉ FunctionKeyword): "function" # (20..28) - (parameters꞉ ParametersDeclaration): # "()" (28..30) - (open_paren꞉ OpenParen): "(" # (28..29) + - (parameters꞉ Parameters): [] # (29..29) - (close_paren꞉ CloseParen): ")" # (29..30) - (attributes꞉ FunctionTypeAttributes): # " external payable" (30..47) - (item꞉ FunctionTypeAttribute): # " external" (30..39) @@ -38,6 +39,7 @@ Tree: - (item꞉ FunctionTypeAttribute): # " payable" (39..47) - (LeadingTrivia) ► (Whitespace): " " # (39..40) - (variant꞉ PayableKeyword): "payable" # (40..47) + - (attributes꞉ StateVariableAttributes): [] # (47..47) - (LeadingTrivia) ► (Whitespace): " " # (47..48) - (SKIPPED): "{}\n" # (48..51) - (close_brace꞉ CloseBrace): "}" # (51..52) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.4.11-failure.yml index 430ecbec1c..32bc4abe4a 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.4.11-failure.yml @@ -23,6 +23,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) + - (members꞉ ContractMembers): [] # (18..18) - (LeadingTrivia) ► (Whitespace): " " # (18..20) - (SKIPPED): "type Foo is bool;\n" # (20..38) - (close_brace꞉ CloseBrace): "}" # (38..39) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.4.22-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.4.22-failure.yml index 671083585d..5125b023c7 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.4.22-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.4.22-failure.yml @@ -23,6 +23,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) + - (members꞉ ContractMembers): [] # (18..18) - (LeadingTrivia) ► (Whitespace): " " # (18..20) - (SKIPPED): "type Foo is bool;\n" # (20..38) - (close_brace꞉ CloseBrace): "}" # (38..39) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.6.0-failure.yml index 40d4611945..aa537c1261 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.6.0-failure.yml @@ -23,6 +23,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) + - (members꞉ ContractMembers): [] # (18..18) - (LeadingTrivia) ► (Whitespace): " " # (18..20) - (SKIPPED): "type Foo is bool;\n" # (20..38) - (close_brace꞉ CloseBrace): "}" # (38..39) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.8.0-failure.yml index 47ca29bdcf..1c99458e53 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.8.0-failure.yml @@ -23,6 +23,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) + - (members꞉ ContractMembers): [] # (18..18) - (LeadingTrivia) ► (Whitespace): " " # (18..20) - (SKIPPED): "type Foo is bool;\n" # (20..38) - (close_brace꞉ CloseBrace): "}" # (38..39) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.8.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.8.4-failure.yml index c62909b8c7..f1c82479fe 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.8.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/member_user_defined_value_type_definition/generated/0.8.4-failure.yml @@ -23,6 +23,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) + - (members꞉ ContractMembers): [] # (18..18) - (LeadingTrivia) ► (Whitespace): " " # (18..20) - (SKIPPED): "type Foo is bool;\n" # (20..38) - (close_brace꞉ CloseBrace): "}" # (38..39) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/missing_field_type/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/missing_field_type/generated/0.4.11-failure.yml index 3f56993b87..7e0da4e07b 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/missing_field_type/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/missing_field_type/generated/0.4.11-failure.yml @@ -28,6 +28,7 @@ Tree: - (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " field" (16..23) - (LeadingTrivia) ► (Whitespace): " " # (16..18) - (item꞉ Identifier): "field" # (18..23) + - (attributes꞉ StateVariableAttributes): [] # (23..23) - (SKIPPED): "" # (23..23) - (semicolon꞉ Semicolon): ";" # (23..24) - (TrailingTrivia) ► (EndOfLine): "\n" # (24..25) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/missing_field_type/generated/0.6.5-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/missing_field_type/generated/0.6.5-failure.yml index 79a2892959..c554f7b833 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/missing_field_type/generated/0.6.5-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/missing_field_type/generated/0.6.5-failure.yml @@ -28,6 +28,7 @@ Tree: - (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # " field" (16..23) - (LeadingTrivia) ► (Whitespace): " " # (16..18) - (item꞉ Identifier): "field" # (18..23) + - (attributes꞉ StateVariableAttributes): [] # (23..23) - (SKIPPED): "" # (23..23) - (semicolon꞉ Semicolon): ";" # (23..24) - (TrailingTrivia) ► (EndOfLine): "\n" # (24..25) 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 fef69d3b64..ecfb02dfc4 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 @@ -112,7 +112,9 @@ Tree: - (variant꞉ Identifier): "abc" # (149..152) - (parameters꞉ ParametersDeclaration): # "()" (152..154) - (open_paren꞉ OpenParen): "(" # (152..153) + - (parameters꞉ Parameters): [] # (153..153) - (close_paren꞉ CloseParen): ")" # (153..154) + - (attributes꞉ FunctionAttributes): [] # (154..154) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n\t\tuint256 x = 0;\n\t\tunchecked { invalid sequence..." (154..210) - (LeadingTrivia) ► (Whitespace): " " # (154..155) - (open_brace꞉ OpenBrace): "{" # (155..156) 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 5f0d0f48bd..0634b9d21a 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 @@ -112,7 +112,9 @@ Tree: - (variant꞉ Identifier): "abc" # (149..152) - (parameters꞉ ParametersDeclaration): # "()" (152..154) - (open_paren꞉ OpenParen): "(" # (152..153) + - (parameters꞉ Parameters): [] # (153..153) - (close_paren꞉ CloseParen): ")" # (153..154) + - (attributes꞉ FunctionAttributes): [] # (154..154) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n\t\tuint256 x = 0;\n\t\tunchecked { invalid sequence..." (154..210) - (LeadingTrivia) ► (Whitespace): " " # (154..155) - (open_brace꞉ OpenBrace): "{" # (155..156) 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 8839a8e8e9..efebad8936 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 @@ -112,7 +112,9 @@ Tree: - (variant꞉ Identifier): "abc" # (149..152) - (parameters꞉ ParametersDeclaration): # "()" (152..154) - (open_paren꞉ OpenParen): "(" # (152..153) + - (parameters꞉ Parameters): [] # (153..153) - (close_paren꞉ CloseParen): ")" # (153..154) + - (attributes꞉ FunctionAttributes): [] # (154..154) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n\t\tuint256 x = 0;\n\t\tunchecked { invalid sequence..." (154..210) - (LeadingTrivia) ► (Whitespace): " " # (154..155) - (open_brace꞉ OpenBrace): "{" # (155..156) 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 4db1865de6..df12f0613e 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 @@ -112,7 +112,9 @@ Tree: - (variant꞉ Identifier): "abc" # (149..152) - (parameters꞉ ParametersDeclaration): # "()" (152..154) - (open_paren꞉ OpenParen): "(" # (152..153) + - (parameters꞉ Parameters): [] # (153..153) - (close_paren꞉ CloseParen): ")" # (153..154) + - (attributes꞉ FunctionAttributes): [] # (154..154) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n\t\tuint256 x = 0;\n\t\tunchecked { invalid sequence..." (154..210) - (LeadingTrivia) ► (Whitespace): " " # (154..155) - (open_brace꞉ OpenBrace): "{" # (155..156) 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 39dba112d1..a2e4be7d24 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 @@ -112,7 +112,9 @@ Tree: - (variant꞉ Identifier): "abc" # (149..152) - (parameters꞉ ParametersDeclaration): # "()" (152..154) - (open_paren꞉ OpenParen): "(" # (152..153) + - (parameters꞉ Parameters): [] # (153..153) - (close_paren꞉ CloseParen): ")" # (153..154) + - (attributes꞉ FunctionAttributes): [] # (154..154) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n\t\tuint256 x = 0;\n\t\tunchecked { invalid sequence..." (154..210) - (LeadingTrivia) ► (Whitespace): " " # (154..155) - (open_brace꞉ OpenBrace): "{" # (155..156) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.8.0-failure.yml index a0e3302216..cbbae05442 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/recovery_testbed/generated/0.8.0-failure.yml @@ -111,7 +111,9 @@ Tree: - (variant꞉ Identifier): "abc" # (149..152) - (parameters꞉ ParametersDeclaration): # "()" (152..154) - (open_paren꞉ OpenParen): "(" # (152..153) + - (parameters꞉ Parameters): [] # (153..153) - (close_paren꞉ CloseParen): ")" # (153..154) + - (attributes꞉ FunctionAttributes): [] # (154..154) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n\t\tuint256 x = 0;\n\t\tunchecked { invalid sequence..." (154..210) - (LeadingTrivia) ► (Whitespace): " " # (154..155) - (open_brace꞉ OpenBrace): "{" # (155..156) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.4.11-failure.yml index 96a4539fbc..282b9e4c70 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.4.11-failure.yml @@ -20,4 +20,5 @@ Tree: - (name꞉ Identifier): "Sample" # (9..15) - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) + - (members꞉ ContractMembers): [] # (17..17) - (SKIPPED): "" # (17..17) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.4.22-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.4.22-failure.yml index 6cb91c5460..ef60946eca 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.4.22-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.4.22-failure.yml @@ -20,4 +20,5 @@ Tree: - (name꞉ Identifier): "Sample" # (9..15) - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) + - (members꞉ ContractMembers): [] # (17..17) - (SKIPPED): "" # (17..17) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.6.0-failure.yml index e02c3f206a..b590bfea2a 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.6.0-failure.yml @@ -20,4 +20,5 @@ Tree: - (name꞉ Identifier): "Sample" # (9..15) - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) + - (members꞉ ContractMembers): [] # (17..17) - (SKIPPED): "" # (17..17) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.0-failure.yml index 1ffe824048..11534b9caf 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.0-failure.yml @@ -20,4 +20,5 @@ Tree: - (name꞉ Identifier): "Sample" # (9..15) - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) + - (members꞉ ContractMembers): [] # (17..17) - (SKIPPED): "" # (17..17) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.4-failure.yml index ab6c4baaf0..dabd3fdb58 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.4-failure.yml @@ -20,4 +20,5 @@ Tree: - (name꞉ Identifier): "Sample" # (9..15) - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) + - (members꞉ ContractMembers): [] # (17..17) - (SKIPPED): "" # (17..17) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.8-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.8-failure.yml index 3216077435..f1a226ade2 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.8-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractDefinition/unterminated_body/generated/0.8.8-failure.yml @@ -20,4 +20,5 @@ Tree: - (name꞉ Identifier): "Sample" # (9..15) - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) + - (members꞉ ContractMembers): [] # (17..17) - (SKIPPED): "" # (17..17) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/constructor/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/constructor/generated/0.4.11-failure.yml index a535379880..b1f51f7c4f 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/constructor/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/constructor/generated/0.4.11-failure.yml @@ -15,6 +15,8 @@ Errors: # 1 total Tree: - (ContractMembers): # "constructor() public {}\n" (0..24) - - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition) ► (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # "constructor" (0..11) - - (item꞉ Identifier): "constructor" # (0..11) + - (item꞉ ContractMember) ► (variant꞉ StateVariableDefinition): # "constructor" (0..11) + - (type_name꞉ TypeName) ► (variant꞉ IdentifierPath): # "constructor" (0..11) + - (item꞉ Identifier): "constructor" # (0..11) + - (attributes꞉ StateVariableAttributes): [] # (11..11) - (SKIPPED): "() public {}\n" # (11..24) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/constructor/generated/0.4.22-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/constructor/generated/0.4.22-success.yml index e1fe58db06..a517bd7406 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/constructor/generated/0.4.22-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/constructor/generated/0.4.22-success.yml @@ -11,6 +11,7 @@ Tree: - (constructor_keyword꞉ ConstructorKeyword): "constructor" # (0..11) - (parameters꞉ ParametersDeclaration): # "()" (11..13) - (open_paren꞉ OpenParen): "(" # (11..12) + - (parameters꞉ Parameters): [] # (12..12) - (close_paren꞉ CloseParen): ")" # (12..13) - (attributes꞉ ConstructorAttributes): # " public" (13..20) - (item꞉ ConstructorAttribute): # " public" (13..20) @@ -19,5 +20,6 @@ Tree: - (body꞉ Block): # " {}\n" (20..24) - (LeadingTrivia) ► (Whitespace): " " # (20..21) - (open_brace꞉ OpenBrace): "{" # (21..22) + - (statements꞉ Statements): [] # (22..22) - (close_brace꞉ CloseBrace): "}" # (22..23) - (TrailingTrivia) ► (EndOfLine): "\n" # (23..24) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/local_expression/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/local_expression/generated/0.4.11-success.yml index 94cdca6ae8..3b7b91bdbf 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/local_expression/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/local_expression/generated/0.4.11-success.yml @@ -16,7 +16,9 @@ Tree: - (variant꞉ Identifier): "func" # (9..13) - (parameters꞉ ParametersDeclaration): # "()" (13..15) - (open_paren꞉ OpenParen): "(" # (13..14) + - (parameters꞉ Parameters): [] # (14..14) - (close_paren꞉ CloseParen): ")" # (14..15) + - (attributes꞉ FunctionAttributes): [] # (15..15) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {\n uint a = 1 + 2 * 3;\n}\n" (15..42) - (LeadingTrivia) ► (Whitespace): " " # (15..16) - (open_brace꞉ OpenBrace): "{" # (16..17) 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 4637c505f4..398d81870d 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 @@ -35,6 +35,7 @@ Tree: - (variant꞉ Identifier): "someFunc" # (9..17) - (parameters꞉ ParametersDeclaration): # "()" (17..19) - (open_paren꞉ OpenParen): "(" # (17..18) + - (parameters꞉ Parameters): [] # (18..18) - (close_paren꞉ CloseParen): ")" # (18..19) - (attributes꞉ FunctionAttributes): # " public" (19..26) - (item꞉ FunctionAttribute): # " public" (19..26) 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 3bad6ae553..41207024b9 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 @@ -35,6 +35,7 @@ Tree: - (variant꞉ Identifier): "someFunc" # (9..17) - (parameters꞉ ParametersDeclaration): # "()" (17..19) - (open_paren꞉ OpenParen): "(" # (17..18) + - (parameters꞉ Parameters): [] # (18..18) - (close_paren꞉ CloseParen): ")" # (18..19) - (attributes꞉ FunctionAttributes): # " public" (19..26) - (item꞉ FunctionAttribute): # " public" (19..26) 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 f6e428850a..47aa0f6998 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 @@ -35,6 +35,7 @@ Tree: - (variant꞉ Identifier): "someFunc" # (9..17) - (parameters꞉ ParametersDeclaration): # "()" (17..19) - (open_paren꞉ OpenParen): "(" # (17..18) + - (parameters꞉ Parameters): [] # (18..18) - (close_paren꞉ CloseParen): ")" # (18..19) - (attributes꞉ FunctionAttributes): # " public" (19..26) - (item꞉ FunctionAttribute): # " public" (19..26) 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 6a2c84489d..5d2058f20f 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 @@ -35,6 +35,7 @@ Tree: - (variant꞉ Identifier): "someFunc" # (9..17) - (parameters꞉ ParametersDeclaration): # "()" (17..19) - (open_paren꞉ OpenParen): "(" # (17..18) + - (parameters꞉ Parameters): [] # (18..18) - (close_paren꞉ CloseParen): ")" # (18..19) - (attributes꞉ FunctionAttributes): # " public" (19..26) - (item꞉ FunctionAttribute): # " public" (19..26) 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 1406c294fe..8800f47370 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 @@ -35,6 +35,7 @@ Tree: - (variant꞉ Identifier): "someFunc" # (9..17) - (parameters꞉ ParametersDeclaration): # "()" (17..19) - (open_paren꞉ OpenParen): "(" # (17..18) + - (parameters꞉ Parameters): [] # (18..18) - (close_paren꞉ CloseParen): ")" # (18..19) - (attributes꞉ FunctionAttributes): # " public" (19..26) - (item꞉ FunctionAttribute): # " public" (19..26) 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 b0c76aa638..ad82e6b5fc 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 @@ -35,6 +35,7 @@ Tree: - (variant꞉ Identifier): "someFunc" # (9..17) - (parameters꞉ ParametersDeclaration): # "()" (17..19) - (open_paren꞉ OpenParen): "(" # (17..18) + - (parameters꞉ Parameters): [] # (18..18) - (close_paren꞉ CloseParen): ")" # (18..19) - (attributes꞉ FunctionAttributes): # " public" (19..26) - (item꞉ FunctionAttribute): # " public" (19..26) 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 6dd34e90d3..72d2884169 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 @@ -35,6 +35,7 @@ Tree: - (variant꞉ Identifier): "someFunc" # (9..17) - (parameters꞉ ParametersDeclaration): # "()" (17..19) - (open_paren꞉ OpenParen): "(" # (17..18) + - (parameters꞉ Parameters): [] # (18..18) - (close_paren꞉ CloseParen): ")" # (18..19) - (attributes꞉ FunctionAttributes): # " public" (19..26) - (item꞉ FunctionAttribute): # " public" (19..26) 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 f0cc69a12a..562bcdf08a 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 @@ -35,6 +35,7 @@ Tree: - (variant꞉ Identifier): "someFunc" # (9..17) - (parameters꞉ ParametersDeclaration): # "()" (17..19) - (open_paren꞉ OpenParen): "(" # (17..18) + - (parameters꞉ Parameters): [] # (18..18) - (close_paren꞉ CloseParen): ")" # (18..19) - (attributes꞉ FunctionAttributes): # " public" (19..26) - (item꞉ FunctionAttribute): # " public" (19..26) 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 94ff03c23e..4692e9322c 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 @@ -105,6 +105,7 @@ Tree: - (variant꞉ Identifier): "all" # (9..12) - (parameters꞉ ParametersDeclaration): # "()" (12..14) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ FunctionAttributes): # " override(some.ident unexpected tokens, ISomeInter..." (14..83) - (item꞉ FunctionAttribute) ► (variant꞉ ModifierInvocation): # " override(some.ident unexpected tokens, ISomeInter..." (14..76) @@ -192,6 +193,7 @@ Tree: - (variant꞉ Identifier): "empty" # (319..324) - (parameters꞉ ParametersDeclaration): # "()" (324..326) - (open_paren꞉ OpenParen): "(" # (324..325) + - (parameters꞉ Parameters): [] # (325..325) - (close_paren꞉ CloseParen): ")" # (325..326) - (attributes꞉ FunctionAttributes): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) - (item꞉ FunctionAttribute) ► (variant꞉ ModifierInvocation): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) @@ -222,6 +224,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (398..410) - (parameters꞉ ParametersDeclaration): # "()" (410..412) - (open_paren꞉ OpenParen): "(" # (410..411) + - (parameters꞉ Parameters): [] # (411..411) - (close_paren꞉ CloseParen): ")" # (411..412) - (attributes꞉ FunctionAttributes): # " override(some.ident, next.do.that, other.while, n..." (412..487) - (item꞉ FunctionAttribute) ► (variant꞉ ModifierInvocation): # " override(some.ident, next.do.that, other.while, n..." (412..487) @@ -268,6 +271,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (498..510) - (parameters꞉ ParametersDeclaration): # "()" (510..512) - (open_paren꞉ OpenParen): "(" # (510..511) + - (parameters꞉ Parameters): [] # (511..511) - (close_paren꞉ CloseParen): ")" # (511..512) - (attributes꞉ FunctionAttributes): # " override(some., next.arg, next.one, ultimate)" (512..558) - (item꞉ FunctionAttribute) ► (variant꞉ ModifierInvocation): # " override(some., next.arg, next.one, ultimate)" (512..558) diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.5.0-failure.yml index 56a10c2517..4a6e1017df 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembers/separated_recovery/generated/0.5.0-failure.yml @@ -105,6 +105,7 @@ Tree: - (variant꞉ Identifier): "all" # (9..12) - (parameters꞉ ParametersDeclaration): # "()" (12..14) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ FunctionAttributes): # " override(some.ident unexpected tokens, ISomeInter..." (14..83) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident unexpected tokens, ISomeInter..." (14..76) @@ -191,6 +192,7 @@ Tree: - (variant꞉ Identifier): "empty" # (319..324) - (parameters꞉ ParametersDeclaration): # "()" (324..326) - (open_paren꞉ OpenParen): "(" # (324..325) + - (parameters꞉ Parameters): [] # (325..325) - (close_paren꞉ CloseParen): ")" # (325..326) - (attributes꞉ FunctionAttributes): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) @@ -220,6 +222,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (398..410) - (parameters꞉ ParametersDeclaration): # "()" (410..412) - (open_paren꞉ OpenParen): "(" # (410..411) + - (parameters꞉ Parameters): [] # (411..411) - (close_paren꞉ CloseParen): ")" # (411..412) - (attributes꞉ FunctionAttributes): # " override(some.ident, next.do.that, other.while, n..." (412..487) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident, next.do.that, other.while, n..." (412..487) @@ -264,6 +267,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (498..510) - (parameters꞉ ParametersDeclaration): # "()" (510..512) - (open_paren꞉ OpenParen): "(" # (510..511) + - (parameters꞉ Parameters): [] # (511..511) - (close_paren꞉ CloseParen): ")" # (511..512) - (attributes꞉ FunctionAttributes): # " override(some., next.arg, next.one, ultimate)" (512..558) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some., next.arg, next.one, ultimate)" (512..558) 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 9ac90d9e30..93c8f3c94f 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 @@ -121,6 +121,7 @@ Tree: - (variant꞉ Identifier): "all" # (9..12) - (parameters꞉ ParametersDeclaration): # "()" (12..14) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ FunctionAttributes): # " override(some.ident unexpected tokens, ISomeInter..." (14..83) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident unexpected tokens, ISomeInter..." (14..76) @@ -158,10 +159,12 @@ Tree: - (options꞉ FunctionCallOptions) ► (variant꞉ NamedArgumentGroups): # "{do: 1, arg: 1 }" (103..119) - (item꞉ NamedArgumentGroup): # "{do: 1, arg: 1 }" (103..119) - (open_brace꞉ OpenBrace): "{" # (103..104) + - (arguments꞉ NamedArguments): [] # (104..104) - (SKIPPED): "do: 1, arg: 1 " # (104..118) - (close_brace꞉ CloseBrace): "}" # (118..119) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (119..121) - (open_paren꞉ OpenParen): "(" # (119..120) + - (arguments꞉ PositionalArguments): [] # (120..120) - (close_paren꞉ CloseParen): ")" # (120..121) - (semicolon꞉ Semicolon): ";" # (121..122) - (TrailingTrivia) ► (EndOfLine): "\n" # (122..123) @@ -179,10 +182,12 @@ Tree: - (options꞉ FunctionCallOptions) ► (variant꞉ NamedArgumentGroups): # "{, empty: 1, parse: 2 }" (140..163) - (item꞉ NamedArgumentGroup): # "{, empty: 1, parse: 2 }" (140..163) - (open_brace꞉ OpenBrace): "{" # (140..141) + - (arguments꞉ NamedArguments): [] # (141..141) - (SKIPPED): ", empty: 1, parse: 2 " # (141..162) - (close_brace꞉ CloseBrace): "}" # (162..163) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (163..165) - (open_paren꞉ OpenParen): "(" # (163..164) + - (arguments꞉ PositionalArguments): [] # (164..164) - (close_paren꞉ CloseParen): ")" # (164..165) - (semicolon꞉ Semicolon): ";" # (165..166) - (TrailingTrivia) ► (EndOfLine): "\n" # (166..167) @@ -224,6 +229,7 @@ Tree: - (close_brace꞉ CloseBrace): "}" # (225..226) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (226..228) - (open_paren꞉ OpenParen): "(" # (226..227) + - (arguments꞉ PositionalArguments): [] # (227..227) - (close_paren꞉ CloseParen): ")" # (227..228) - (semicolon꞉ Semicolon): ";" # (228..229) - (TrailingTrivia) ► (EndOfLine): "\n" # (229..230) @@ -253,6 +259,7 @@ Tree: - (close_brace꞉ CloseBrace): "}" # (301..302) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (302..304) - (open_paren꞉ OpenParen): "(" # (302..303) + - (arguments꞉ PositionalArguments): [] # (303..303) - (close_paren꞉ CloseParen): ")" # (303..304) - (semicolon꞉ Semicolon): ";" # (304..305) - (TrailingTrivia) ► (EndOfLine): "\n" # (305..306) @@ -267,6 +274,7 @@ Tree: - (variant꞉ Identifier): "empty" # (319..324) - (parameters꞉ ParametersDeclaration): # "()" (324..326) - (open_paren꞉ OpenParen): "(" # (324..325) + - (parameters꞉ Parameters): [] # (325..325) - (close_paren꞉ CloseParen): ")" # (325..326) - (attributes꞉ FunctionAttributes): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) @@ -296,6 +304,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (398..410) - (parameters꞉ ParametersDeclaration): # "()" (410..412) - (open_paren꞉ OpenParen): "(" # (410..411) + - (parameters꞉ Parameters): [] # (411..411) - (close_paren꞉ CloseParen): ")" # (411..412) - (attributes꞉ FunctionAttributes): # " override(some.ident, next.do.that, other.while, n..." (412..487) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident, next.do.that, other.while, n..." (412..487) @@ -340,6 +349,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (498..510) - (parameters꞉ ParametersDeclaration): # "()" (510..512) - (open_paren꞉ OpenParen): "(" # (510..511) + - (parameters꞉ Parameters): [] # (511..511) - (close_paren꞉ CloseParen): ")" # (511..512) - (attributes꞉ FunctionAttributes): # " override(some., next.arg, next.one, ultimate)" (512..558) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some., next.arg, next.one, ultimate)" (512..558) 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 b4f521b13a..db96584472 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 @@ -121,6 +121,7 @@ Tree: - (variant꞉ Identifier): "all" # (9..12) - (parameters꞉ ParametersDeclaration): # "()" (12..14) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ FunctionAttributes): # " override(some.ident unexpected tokens, ISomeInter..." (14..83) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident unexpected tokens, ISomeInter..." (14..76) @@ -158,10 +159,12 @@ Tree: - (options꞉ FunctionCallOptions) ► (variant꞉ NamedArgumentGroups): # "{do: 1, arg: 1 }" (103..119) - (item꞉ NamedArgumentGroup): # "{do: 1, arg: 1 }" (103..119) - (open_brace꞉ OpenBrace): "{" # (103..104) + - (arguments꞉ NamedArguments): [] # (104..104) - (SKIPPED): "do: 1, arg: 1 " # (104..118) - (close_brace꞉ CloseBrace): "}" # (118..119) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (119..121) - (open_paren꞉ OpenParen): "(" # (119..120) + - (arguments꞉ PositionalArguments): [] # (120..120) - (close_paren꞉ CloseParen): ")" # (120..121) - (semicolon꞉ Semicolon): ";" # (121..122) - (TrailingTrivia) ► (EndOfLine): "\n" # (122..123) @@ -179,10 +182,12 @@ Tree: - (options꞉ FunctionCallOptions) ► (variant꞉ NamedArgumentGroups): # "{, empty: 1, parse: 2 }" (140..163) - (item꞉ NamedArgumentGroup): # "{, empty: 1, parse: 2 }" (140..163) - (open_brace꞉ OpenBrace): "{" # (140..141) + - (arguments꞉ NamedArguments): [] # (141..141) - (SKIPPED): ", empty: 1, parse: 2 " # (141..162) - (close_brace꞉ CloseBrace): "}" # (162..163) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (163..165) - (open_paren꞉ OpenParen): "(" # (163..164) + - (arguments꞉ PositionalArguments): [] # (164..164) - (close_paren꞉ CloseParen): ")" # (164..165) - (semicolon꞉ Semicolon): ";" # (165..166) - (TrailingTrivia) ► (EndOfLine): "\n" # (166..167) @@ -224,6 +229,7 @@ Tree: - (close_brace꞉ CloseBrace): "}" # (225..226) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (226..228) - (open_paren꞉ OpenParen): "(" # (226..227) + - (arguments꞉ PositionalArguments): [] # (227..227) - (close_paren꞉ CloseParen): ")" # (227..228) - (semicolon꞉ Semicolon): ";" # (228..229) - (TrailingTrivia) ► (EndOfLine): "\n" # (229..230) @@ -253,6 +259,7 @@ Tree: - (close_brace꞉ CloseBrace): "}" # (301..302) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (302..304) - (open_paren꞉ OpenParen): "(" # (302..303) + - (arguments꞉ PositionalArguments): [] # (303..303) - (close_paren꞉ CloseParen): ")" # (303..304) - (semicolon꞉ Semicolon): ";" # (304..305) - (TrailingTrivia) ► (EndOfLine): "\n" # (305..306) @@ -267,6 +274,7 @@ Tree: - (variant꞉ Identifier): "empty" # (319..324) - (parameters꞉ ParametersDeclaration): # "()" (324..326) - (open_paren꞉ OpenParen): "(" # (324..325) + - (parameters꞉ Parameters): [] # (325..325) - (close_paren꞉ CloseParen): ")" # (325..326) - (attributes꞉ FunctionAttributes): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) @@ -296,6 +304,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (398..410) - (parameters꞉ ParametersDeclaration): # "()" (410..412) - (open_paren꞉ OpenParen): "(" # (410..411) + - (parameters꞉ Parameters): [] # (411..411) - (close_paren꞉ CloseParen): ")" # (411..412) - (attributes꞉ FunctionAttributes): # " override(some.ident, next.do.that, other.while, n..." (412..487) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident, next.do.that, other.while, n..." (412..487) @@ -340,6 +349,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (498..510) - (parameters꞉ ParametersDeclaration): # "()" (510..512) - (open_paren꞉ OpenParen): "(" # (510..511) + - (parameters꞉ Parameters): [] # (511..511) - (close_paren꞉ CloseParen): ")" # (511..512) - (attributes꞉ FunctionAttributes): # " override(some., next.arg, next.one, ultimate)" (512..558) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some., next.arg, next.one, ultimate)" (512..558) 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 86aad2a39f..4989fc507c 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 @@ -121,6 +121,7 @@ Tree: - (variant꞉ Identifier): "all" # (9..12) - (parameters꞉ ParametersDeclaration): # "()" (12..14) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (attributes꞉ FunctionAttributes): # " override(some.ident unexpected tokens, ISomeInter..." (14..83) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident unexpected tokens, ISomeInter..." (14..76) @@ -157,10 +158,12 @@ Tree: - (member꞉ MemberAccess) ► (variant꞉ Identifier): "call" # (99..103) - (options꞉ FunctionCallOptions) ► (variant꞉ NamedArgumentGroup): # "{do: 1, arg: 1 }" (103..119) - (open_brace꞉ OpenBrace): "{" # (103..104) + - (arguments꞉ NamedArguments): [] # (104..104) - (SKIPPED): "do: 1, arg: 1 " # (104..118) - (close_brace꞉ CloseBrace): "}" # (118..119) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (119..121) - (open_paren꞉ OpenParen): "(" # (119..120) + - (arguments꞉ PositionalArguments): [] # (120..120) - (close_paren꞉ CloseParen): ")" # (120..121) - (semicolon꞉ Semicolon): ";" # (121..122) - (TrailingTrivia) ► (EndOfLine): "\n" # (122..123) @@ -177,10 +180,12 @@ Tree: - (member꞉ MemberAccess) ► (variant꞉ Identifier): "call" # (136..140) - (options꞉ FunctionCallOptions) ► (variant꞉ NamedArgumentGroup): # "{, empty: 1, parse: 2 }" (140..163) - (open_brace꞉ OpenBrace): "{" # (140..141) + - (arguments꞉ NamedArguments): [] # (141..141) - (SKIPPED): ", empty: 1, parse: 2 " # (141..162) - (close_brace꞉ CloseBrace): "}" # (162..163) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (163..165) - (open_paren꞉ OpenParen): "(" # (163..164) + - (arguments꞉ PositionalArguments): [] # (164..164) - (close_paren꞉ CloseParen): ")" # (164..165) - (semicolon꞉ Semicolon): ";" # (165..166) - (TrailingTrivia) ► (EndOfLine): "\n" # (166..167) @@ -221,6 +226,7 @@ Tree: - (close_brace꞉ CloseBrace): "}" # (225..226) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (226..228) - (open_paren꞉ OpenParen): "(" # (226..227) + - (arguments꞉ PositionalArguments): [] # (227..227) - (close_paren꞉ CloseParen): ")" # (227..228) - (semicolon꞉ Semicolon): ";" # (228..229) - (TrailingTrivia) ► (EndOfLine): "\n" # (229..230) @@ -249,6 +255,7 @@ Tree: - (close_brace꞉ CloseBrace): "}" # (301..302) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (302..304) - (open_paren꞉ OpenParen): "(" # (302..303) + - (arguments꞉ PositionalArguments): [] # (303..303) - (close_paren꞉ CloseParen): ")" # (303..304) - (semicolon꞉ Semicolon): ";" # (304..305) - (TrailingTrivia) ► (EndOfLine): "\n" # (305..306) @@ -263,6 +270,7 @@ Tree: - (variant꞉ Identifier): "empty" # (319..324) - (parameters꞉ ParametersDeclaration): # "()" (324..326) - (open_paren꞉ OpenParen): "(" # (324..325) + - (parameters꞉ Parameters): [] # (325..325) - (close_paren꞉ CloseParen): ")" # (325..326) - (attributes꞉ FunctionAttributes): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident, /* empty */, other.arg.here,..." (326..386) @@ -292,6 +300,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (398..410) - (parameters꞉ ParametersDeclaration): # "()" (410..412) - (open_paren꞉ OpenParen): "(" # (410..411) + - (parameters꞉ Parameters): [] # (411..411) - (close_paren꞉ CloseParen): ")" # (411..412) - (attributes꞉ FunctionAttributes): # " override(some.ident, next.do.that, other.while, n..." (412..487) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some.ident, next.do.that, other.while, n..." (412..487) @@ -336,6 +345,7 @@ Tree: - (variant꞉ Identifier): "nested_lists" # (498..510) - (parameters꞉ ParametersDeclaration): # "()" (510..512) - (open_paren꞉ OpenParen): "(" # (510..511) + - (parameters꞉ Parameters): [] # (511..511) - (close_paren꞉ CloseParen): ")" # (511..512) - (attributes꞉ FunctionAttributes): # " override(some., next.arg, next.one, ultimate)" (512..558) - (item꞉ FunctionAttribute) ► (variant꞉ OverrideSpecifier): # " override(some., next.arg, next.one, ultimate)" (512..558) diff --git a/crates/solidity/testing/snapshots/cst_output/EnumDefinition/no_members/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/EnumDefinition/no_members/generated/0.4.11-success.yml index e6b274b897..3afb569b51 100644 --- a/crates/solidity/testing/snapshots/cst_output/EnumDefinition/no_members/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/EnumDefinition/no_members/generated/0.4.11-success.yml @@ -12,5 +12,6 @@ Tree: - (name꞉ Identifier): "Foo" # (5..8) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_brace꞉ OpenBrace): "{" # (9..10) + - (members꞉ EnumMembers): [] # (10..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (close_brace꞉ CloseBrace): "}" # (11..12) diff --git a/crates/solidity/testing/snapshots/cst_output/ErrorDefinition/top_level/generated/0.8.4-success.yml b/crates/solidity/testing/snapshots/cst_output/ErrorDefinition/top_level/generated/0.8.4-success.yml index 2b75f5e519..9d1dcbc6ed 100644 --- a/crates/solidity/testing/snapshots/cst_output/ErrorDefinition/top_level/generated/0.8.4-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ErrorDefinition/top_level/generated/0.8.4-success.yml @@ -12,5 +12,6 @@ Tree: - (name꞉ Identifier): "MyError" # (6..13) - (members꞉ ErrorParametersDeclaration): # "()" (13..15) - (open_paren꞉ OpenParen): "(" # (13..14) + - (parameters꞉ ErrorParameters): [] # (14..14) - (close_paren꞉ CloseParen): ")" # (14..15) - (semicolon꞉ Semicolon): ";" # (15..16) diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/function_call_chain/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/Expression/function_call_chain/generated/0.4.11-success.yml index 5463db9224..c284a7b5f0 100644 --- a/crates/solidity/testing/snapshots/cst_output/Expression/function_call_chain/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/Expression/function_call_chain/generated/0.4.11-success.yml @@ -11,7 +11,9 @@ Tree: - (operand꞉ Expression) ► (variant꞉ Identifier): "x" # (0..1) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (1..3) - (open_paren꞉ OpenParen): "(" # (1..2) + - (arguments꞉ PositionalArguments): [] # (2..2) - (close_paren꞉ CloseParen): ")" # (2..3) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (3..5) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ PositionalArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/function_call_member_access/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/Expression/function_call_member_access/generated/0.4.11-success.yml index bcee187f9b..cdee330f58 100644 --- a/crates/solidity/testing/snapshots/cst_output/Expression/function_call_member_access/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/Expression/function_call_member_access/generated/0.4.11-success.yml @@ -11,6 +11,7 @@ Tree: - (operand꞉ Expression) ► (variant꞉ Identifier): "x" # (0..1) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (1..3) - (open_paren꞉ OpenParen): "(" # (1..2) + - (arguments꞉ PositionalArguments): [] # (2..2) - (close_paren꞉ CloseParen): ")" # (2..3) - (period꞉ Period): "." # (3..4) - (member꞉ MemberAccess) ► (variant꞉ Identifier): "y" # (4..5) diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/member_access_function_call/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/Expression/member_access_function_call/generated/0.4.11-success.yml index a09b1d7381..41f4ba0c73 100644 --- a/crates/solidity/testing/snapshots/cst_output/Expression/member_access_function_call/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/Expression/member_access_function_call/generated/0.4.11-success.yml @@ -13,4 +13,5 @@ Tree: - (member꞉ MemberAccess) ► (variant꞉ Identifier): "y" # (2..3) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (3..5) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ PositionalArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) diff --git a/crates/solidity/testing/snapshots/cst_output/FallbackFunctionDefinition/simple/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/FallbackFunctionDefinition/simple/generated/0.6.0-success.yml index abf1ddf959..18eea34f3a 100644 --- a/crates/solidity/testing/snapshots/cst_output/FallbackFunctionDefinition/simple/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/FallbackFunctionDefinition/simple/generated/0.6.0-success.yml @@ -11,8 +11,11 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (8..11) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (parameters꞉ Parameters): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) + - (attributes꞉ FallbackFunctionAttributes): [] # (11..11) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {}" (11..14) - (LeadingTrivia) ► (Whitespace): " " # (11..12) - (open_brace꞉ OpenBrace): "{" # (12..13) + - (statements꞉ Statements): [] # (13..13) - (close_brace꞉ CloseBrace): "}" # (13..14) diff --git a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/constant_state_mutability/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/constant_state_mutability/generated/0.4.11-success.yml index 58f66538a7..0f7d5a8a58 100644 --- a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/constant_state_mutability/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/constant_state_mutability/generated/0.4.11-success.yml @@ -13,6 +13,7 @@ Tree: - (variant꞉ Identifier): "a" # (9..10) - (parameters꞉ ParametersDeclaration): # "()" (10..12) - (open_paren꞉ OpenParen): "(" # (10..11) + - (parameters꞉ Parameters): [] # (11..11) - (close_paren꞉ CloseParen): ")" # (11..12) - (attributes꞉ FunctionAttributes): # " constant" (12..21) - (item꞉ FunctionAttribute): # " constant" (12..21) @@ -21,4 +22,5 @@ Tree: - (body꞉ FunctionBody) ► (variant꞉ Block): # " {}" (21..24) - (LeadingTrivia) ► (Whitespace): " " # (21..22) - (open_brace꞉ OpenBrace): "{" # (22..23) + - (statements꞉ Statements): [] # (23..23) - (close_brace꞉ CloseBrace): "}" # (23..24) diff --git a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/constant_state_mutability/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/constant_state_mutability/generated/0.5.0-failure.yml index 1df8052006..38a699fef6 100644 --- a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/constant_state_mutability/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/constant_state_mutability/generated/0.5.0-failure.yml @@ -21,5 +21,7 @@ Tree: - (variant꞉ Identifier): "a" # (9..10) - (parameters꞉ ParametersDeclaration): # "()" (10..12) - (open_paren꞉ OpenParen): "(" # (10..11) + - (parameters꞉ Parameters): [] # (11..11) - (close_paren꞉ CloseParen): ")" # (11..12) + - (attributes꞉ FunctionAttributes): [] # (12..12) - (SKIPPED): " constant {}" # (12..24) diff --git a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.4.11-success.yml index 19126c9a57..647f77f0e3 100644 --- a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.4.11-success.yml @@ -15,6 +15,7 @@ Tree: - (variant꞉ Identifier): "some" # (9..13) - (parameters꞉ ParametersDeclaration): # "()" (13..15) - (open_paren꞉ OpenParen): "(" # (13..14) + - (parameters꞉ Parameters): [] # (14..14) - (close_paren꞉ CloseParen): ")" # (14..15) - (attributes꞉ FunctionAttributes): # " public virtual override" (15..39) - (item꞉ FunctionAttribute): # " public" (15..22) diff --git a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.5.0-success.yml b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.5.0-success.yml index cc134b03da..5e7ea142ab 100644 --- a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.5.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.5.0-success.yml @@ -15,6 +15,7 @@ Tree: - (variant꞉ Identifier): "some" # (9..13) - (parameters꞉ ParametersDeclaration): # "()" (13..15) - (open_paren꞉ OpenParen): "(" # (13..14) + - (parameters꞉ Parameters): [] # (14..14) - (close_paren꞉ CloseParen): ")" # (14..15) - (attributes꞉ FunctionAttributes): # " public virtual override" (15..39) - (item꞉ FunctionAttribute): # " public" (15..22) diff --git a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.6.0-success.yml index 8ca85aacc8..1f8527236c 100644 --- a/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/FunctionDefinition/overridden/generated/0.6.0-success.yml @@ -15,6 +15,7 @@ Tree: - (variant꞉ Identifier): "some" # (9..13) - (parameters꞉ ParametersDeclaration): # "()" (13..15) - (open_paren꞉ OpenParen): "(" # (13..14) + - (parameters꞉ Parameters): [] # (14..14) - (close_paren꞉ CloseParen): ")" # (14..15) - (attributes꞉ FunctionAttributes): # " public virtual override" (15..39) - (item꞉ FunctionAttribute): # " public" (15..22) diff --git a/crates/solidity/testing/snapshots/cst_output/InterfaceDefinition/sample_counter/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/InterfaceDefinition/sample_counter/generated/0.4.11-success.yml index 1c4bdb441d..2681acaf1e 100644 --- a/crates/solidity/testing/snapshots/cst_output/InterfaceDefinition/sample_counter/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/InterfaceDefinition/sample_counter/generated/0.4.11-success.yml @@ -32,6 +32,7 @@ Tree: - (variant꞉ Identifier): "count" # (67..72) - (parameters꞉ ParametersDeclaration): # "()" (72..74) - (open_paren꞉ OpenParen): "(" # (72..73) + - (parameters꞉ Parameters): [] # (73..73) - (close_paren꞉ CloseParen): ")" # (73..74) - (attributes꞉ FunctionAttributes): # " external view" (74..88) - (item꞉ FunctionAttribute): # " external" (74..83) @@ -65,6 +66,7 @@ Tree: - (variant꞉ Identifier): "increment" # (149..158) - (parameters꞉ ParametersDeclaration): # "()" (158..160) - (open_paren꞉ OpenParen): "(" # (158..159) + - (parameters꞉ Parameters): [] # (159..159) - (close_paren꞉ CloseParen): ")" # (159..160) - (attributes꞉ FunctionAttributes): # " external" (160..169) - (item꞉ FunctionAttribute): # " external" (160..169) diff --git a/crates/solidity/testing/snapshots/cst_output/ReceiveFunctionDefinition/simple/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/ReceiveFunctionDefinition/simple/generated/0.6.0-success.yml index f1423e1fbf..e7622f6e87 100644 --- a/crates/solidity/testing/snapshots/cst_output/ReceiveFunctionDefinition/simple/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ReceiveFunctionDefinition/simple/generated/0.6.0-success.yml @@ -11,8 +11,11 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (7..10) - (LeadingTrivia) ► (Whitespace): " " # (7..8) - (open_paren꞉ OpenParen): "(" # (8..9) + - (parameters꞉ Parameters): [] # (9..9) - (close_paren꞉ CloseParen): ")" # (9..10) + - (attributes꞉ ReceiveFunctionAttributes): [] # (10..10) - (body꞉ FunctionBody) ► (variant꞉ Block): # " {}" (10..13) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (statements꞉ Statements): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_file/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_file/generated/0.4.11-success.yml index e7f1774ff5..427621cef3 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_file/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_file/generated/0.4.11-success.yml @@ -5,4 +5,4 @@ Source: "" Errors: [] Tree: - - (SourceUnit): [] # (0..0) + - (SourceUnit) ► (members꞉ SourceUnitMembers): [] # (0..0) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_1_asterisk/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_1_asterisk/generated/0.4.11-success.yml index c00403609e..68f439172e 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_1_asterisk/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_1_asterisk/generated/0.4.11-success.yml @@ -6,6 +6,8 @@ Source: > Errors: [] Tree: - - (SourceUnit) ► (LeadingTrivia): # "/*/ needs another one to terminate: /*/\n" (0..40) - - (MultiLineComment): "/*/ needs another one to terminate: /*/" # (0..39) - - (EndOfLine): "\n" # (39..40) + - (SourceUnit): # "/*/ needs another one to terminate: /*/\n" (0..40) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (LeadingTrivia): # "/*/ needs another one to terminate: /*/\n" (0..40) + - (MultiLineComment): "/*/ needs another one to terminate: /*/" # (0..39) + - (EndOfLine): "\n" # (39..40) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_2_asterisks/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_2_asterisks/generated/0.4.11-success.yml index 86317bbefb..f988663efa 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_2_asterisks/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_2_asterisks/generated/0.4.11-success.yml @@ -6,6 +6,8 @@ Source: > Errors: [] Tree: - - (SourceUnit) ► (LeadingTrivia): # "/**/\n" (0..5) - - (MultiLineComment): "/**/" # (0..4) - - (EndOfLine): "\n" # (4..5) + - (SourceUnit): # "/**/\n" (0..5) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (LeadingTrivia): # "/**/\n" (0..5) + - (MultiLineComment): "/**/" # (0..4) + - (EndOfLine): "\n" # (4..5) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_3_asterisks/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_3_asterisks/generated/0.4.11-success.yml index c73e7392f1..ac6ee968b8 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_3_asterisks/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_3_asterisks/generated/0.4.11-success.yml @@ -6,6 +6,8 @@ Source: > Errors: [] Tree: - - (SourceUnit) ► (LeadingTrivia): # "/***/\n" (0..6) - - (MultiLineNatSpecComment): "/***/" # (0..5) - - (EndOfLine): "\n" # (5..6) + - (SourceUnit): # "/***/\n" (0..6) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (LeadingTrivia): # "/***/\n" (0..6) + - (MultiLineNatSpecComment): "/***/" # (0..5) + - (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_4_asterisks/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_4_asterisks/generated/0.4.11-success.yml index ff42203939..2c88bb9999 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_4_asterisks/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_comment_4_asterisks/generated/0.4.11-success.yml @@ -6,6 +6,8 @@ Source: > Errors: [] Tree: - - (SourceUnit) ► (LeadingTrivia): # "/****/\n" (0..7) - - (MultiLineNatSpecComment): "/****/" # (0..6) - - (EndOfLine): "\n" # (6..7) + - (SourceUnit): # "/****/\n" (0..7) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (LeadingTrivia): # "/****/\n" (0..7) + - (MultiLineNatSpecComment): "/****/" # (0..6) + - (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_over_natspec/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_over_natspec/generated/0.4.11-success.yml index f671d222aa..f2f4f73b5f 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_over_natspec/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_over_natspec/generated/0.4.11-success.yml @@ -24,6 +24,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (110..111) - (open_brace꞉ OpenBrace): "{" # (111..112) - (TrailingTrivia) ► (EndOfLine): "\n" # (112..113) + - (members꞉ ContractMembers): [] # (113..113) - (LeadingTrivia): # " /**/\n" (113..120) - (Whitespace): " " # (113..115) - (MultiLineComment): "/**/" # (115..119) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia/generated/0.4.11-success.yml index 036f8b90da..73bf8402a0 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia/generated/0.4.11-success.yml @@ -19,6 +19,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (LeadingTrivia) ► (Whitespace): " " # (12..13) - (close_brace꞉ CloseBrace): "}" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.4.11-failure.yml index 789354fe36..a73a1310eb 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.4.11-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.6.0-failure.yml index d88f31038f..2940a0f3e2 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.6.0-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.7.1-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.7.1-failure.yml index 5ec7b37d44..687638e80b 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.7.1-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.7.1-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.7.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.7.4-failure.yml index b52670b743..a182987172 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.7.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.7.4-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.0-failure.yml index c203df4eba..82d8e4ff2c 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.0-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.13-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.13-failure.yml index 2235b61046..7d9e0f1ff7 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.13-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.13-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.22-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.22-failure.yml index fbdd85318c..b27b50d64b 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.22-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.22-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.4-failure.yml index cd18643d31..b8e1d37acc 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.4-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.8-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.8-failure.yml index fc68f48e60..ec91dd46f7 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.8-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_incomplete/generated/0.8.8-failure.yml @@ -24,6 +24,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (close_brace꞉ CloseBrace): "}" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) - (LeadingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.4.11-failure.yml index 3caf5e3cef..a2901248cb 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.4.11-failure.yml @@ -26,6 +26,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (LeadingTrivia) ► (Whitespace): " " # (12..13) - (close_brace꞉ CloseBrace): "}" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.6.0-failure.yml index 17bfc49a0f..7151ec4d84 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.6.0-failure.yml @@ -26,6 +26,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (LeadingTrivia) ► (Whitespace): " " # (12..13) - (close_brace꞉ CloseBrace): "}" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.7.1-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.7.1-failure.yml index 14d4511776..20f724a7d9 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.7.1-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.7.1-failure.yml @@ -26,6 +26,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (LeadingTrivia) ► (Whitespace): " " # (12..13) - (close_brace꞉ CloseBrace): "}" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.7.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.7.4-failure.yml index 5b6959fb8a..65f619f7b3 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.7.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/end_of_file_trivia_unexpected_after/generated/0.7.4-failure.yml @@ -26,6 +26,7 @@ Tree: - (name꞉ Identifier): "X" # (9..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (open_brace꞉ OpenBrace): "{" # (11..12) + - (members꞉ ContractMembers): [] # (12..12) - (LeadingTrivia) ► (Whitespace): " " # (12..13) - (close_brace꞉ CloseBrace): "}" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/everything/generated/0.8.13-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/everything/generated/0.8.13-failure.yml index 34e94c4198..6478c72be7 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/everything/generated/0.8.13-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/everything/generated/0.8.13-failure.yml @@ -83,6 +83,7 @@ Tree: - (name꞉ Identifier): "C" # (68..69) - (LeadingTrivia) ► (Whitespace): " " # (69..70) - (open_brace꞉ OpenBrace): "{" # (70..71) + - (members꞉ ContractMembers): [] # (71..71) - (LeadingTrivia) ► (Whitespace): " " # (71..72) - (close_brace꞉ CloseBrace): "}" # (72..73) - (TrailingTrivia) ► (EndOfLine): "\n" # (73..74) @@ -93,6 +94,7 @@ Tree: - (name꞉ Identifier): "I" # (85..86) - (LeadingTrivia) ► (Whitespace): " " # (86..87) - (open_brace꞉ OpenBrace): "{" # (87..88) + - (members꞉ InterfaceMembers): [] # (88..88) - (LeadingTrivia) ► (Whitespace): " " # (88..89) - (close_brace꞉ CloseBrace): "}" # (89..90) - (TrailingTrivia) ► (EndOfLine): "\n" # (90..91) @@ -103,6 +105,7 @@ Tree: - (name꞉ Identifier): "L" # (100..101) - (LeadingTrivia) ► (Whitespace): " " # (101..102) - (open_brace꞉ OpenBrace): "{" # (102..103) + - (members꞉ LibraryMembers): [] # (103..103) - (LeadingTrivia) ► (Whitespace): " " # (103..104) - (close_brace꞉ CloseBrace): "}" # (104..105) - (TrailingTrivia) ► (EndOfLine): "\n" # (105..106) @@ -113,6 +116,7 @@ Tree: - (name꞉ Identifier): "S" # (114..115) - (LeadingTrivia) ► (Whitespace): " " # (115..116) - (open_brace꞉ OpenBrace): "{" # (116..117) + - (members꞉ StructMembers): [] # (117..117) - (LeadingTrivia) ► (Whitespace): " " # (117..118) - (close_brace꞉ CloseBrace): "}" # (118..119) - (TrailingTrivia) ► (EndOfLine): "\n" # (119..120) @@ -123,6 +127,7 @@ Tree: - (name꞉ Identifier): "E" # (126..127) - (LeadingTrivia) ► (Whitespace): " " # (127..128) - (open_brace꞉ OpenBrace): "{" # (128..129) + - (members꞉ EnumMembers): [] # (129..129) - (LeadingTrivia) ► (Whitespace): " " # (129..130) - (close_brace꞉ CloseBrace): "}" # (130..131) - (TrailingTrivia) ► (EndOfLine): "\n" # (131..132) @@ -149,6 +154,7 @@ Tree: - (variant꞉ Identifier): "f" # (166..167) - (parameters꞉ ParametersDeclaration): # "()" (167..169) - (open_paren꞉ OpenParen): "(" # (167..168) + - (parameters꞉ Parameters): [] # (168..168) - (close_paren꞉ CloseParen): ")" # (168..169) - (attributes꞉ FunctionAttributes): # " public" (169..176) - (item꞉ FunctionAttribute): # " public" (169..176) @@ -157,6 +163,7 @@ Tree: - (body꞉ FunctionBody) ► (variant꞉ Block): # " { }\n" (176..181) - (LeadingTrivia) ► (Whitespace): " " # (176..177) - (open_brace꞉ OpenBrace): "{" # (177..178) + - (statements꞉ Statements): [] # (178..178) - (LeadingTrivia) ► (Whitespace): " " # (178..179) - (close_brace꞉ CloseBrace): "}" # (179..180) - (TrailingTrivia) ► (EndOfLine): "\n" # (180..181) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/everything/generated/0.8.22-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/everything/generated/0.8.22-success.yml index 759dc540db..66d945783d 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/everything/generated/0.8.22-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/everything/generated/0.8.22-success.yml @@ -74,6 +74,7 @@ Tree: - (name꞉ Identifier): "C" # (68..69) - (LeadingTrivia) ► (Whitespace): " " # (69..70) - (open_brace꞉ OpenBrace): "{" # (70..71) + - (members꞉ ContractMembers): [] # (71..71) - (LeadingTrivia) ► (Whitespace): " " # (71..72) - (close_brace꞉ CloseBrace): "}" # (72..73) - (TrailingTrivia) ► (EndOfLine): "\n" # (73..74) @@ -84,6 +85,7 @@ Tree: - (name꞉ Identifier): "I" # (85..86) - (LeadingTrivia) ► (Whitespace): " " # (86..87) - (open_brace꞉ OpenBrace): "{" # (87..88) + - (members꞉ InterfaceMembers): [] # (88..88) - (LeadingTrivia) ► (Whitespace): " " # (88..89) - (close_brace꞉ CloseBrace): "}" # (89..90) - (TrailingTrivia) ► (EndOfLine): "\n" # (90..91) @@ -94,6 +96,7 @@ Tree: - (name꞉ Identifier): "L" # (100..101) - (LeadingTrivia) ► (Whitespace): " " # (101..102) - (open_brace꞉ OpenBrace): "{" # (102..103) + - (members꞉ LibraryMembers): [] # (103..103) - (LeadingTrivia) ► (Whitespace): " " # (103..104) - (close_brace꞉ CloseBrace): "}" # (104..105) - (TrailingTrivia) ► (EndOfLine): "\n" # (105..106) @@ -104,6 +107,7 @@ Tree: - (name꞉ Identifier): "S" # (114..115) - (LeadingTrivia) ► (Whitespace): " " # (115..116) - (open_brace꞉ OpenBrace): "{" # (116..117) + - (members꞉ StructMembers): [] # (117..117) - (LeadingTrivia) ► (Whitespace): " " # (117..118) - (close_brace꞉ CloseBrace): "}" # (118..119) - (TrailingTrivia) ► (EndOfLine): "\n" # (119..120) @@ -114,6 +118,7 @@ Tree: - (name꞉ Identifier): "E" # (126..127) - (LeadingTrivia) ► (Whitespace): " " # (127..128) - (open_brace꞉ OpenBrace): "{" # (128..129) + - (members꞉ EnumMembers): [] # (129..129) - (LeadingTrivia) ► (Whitespace): " " # (129..130) - (close_brace꞉ CloseBrace): "}" # (130..131) - (TrailingTrivia) ► (EndOfLine): "\n" # (131..132) @@ -140,6 +145,7 @@ Tree: - (variant꞉ Identifier): "f" # (166..167) - (parameters꞉ ParametersDeclaration): # "()" (167..169) - (open_paren꞉ OpenParen): "(" # (167..168) + - (parameters꞉ Parameters): [] # (168..168) - (close_paren꞉ CloseParen): ")" # (168..169) - (attributes꞉ FunctionAttributes): # " public" (169..176) - (item꞉ FunctionAttribute): # " public" (169..176) @@ -148,6 +154,7 @@ Tree: - (body꞉ FunctionBody) ► (variant꞉ Block): # " { }\n" (176..181) - (LeadingTrivia) ► (Whitespace): " " # (176..177) - (open_brace꞉ OpenBrace): "{" # (177..178) + - (statements꞉ Statements): [] # (178..178) - (LeadingTrivia) ► (Whitespace): " " # (178..179) - (close_brace꞉ CloseBrace): "}" # (179..180) - (TrailingTrivia) ► (EndOfLine): "\n" # (180..181) 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 0e3d8f307a..43e47c66dc 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 @@ -78,6 +78,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (96..97) - (open_brace꞉ OpenBrace): "{" # (97..98) - (TrailingTrivia) ► (EndOfLine): "\n" # (98..99) + - (statements꞉ Statements): [] # (99..99) - (LeadingTrivia) ► (Whitespace): " " # (99..103) - (SKIPPED): "unchecked {\n uint256 c = a + b;\n if (c <..." # (103..208) - (close_brace꞉ CloseBrace): "}" # (208..209) 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 a9b067db03..3d3866ea7a 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 @@ -78,6 +78,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (96..97) - (open_brace꞉ OpenBrace): "{" # (97..98) - (TrailingTrivia) ► (EndOfLine): "\n" # (98..99) + - (statements꞉ Statements): [] # (99..99) - (LeadingTrivia) ► (Whitespace): " " # (99..103) - (SKIPPED): "unchecked {\n uint256 c = a + b;\n if (c <..." # (103..208) - (close_brace꞉ CloseBrace): "}" # (208..209) 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 7ef12b8ab2..2f74cb1ca9 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 @@ -78,6 +78,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (96..97) - (open_brace꞉ OpenBrace): "{" # (97..98) - (TrailingTrivia) ► (EndOfLine): "\n" # (98..99) + - (statements꞉ Statements): [] # (99..99) - (LeadingTrivia) ► (Whitespace): " " # (99..103) - (SKIPPED): "unchecked {\n uint256 c = a + b;\n if (c <..." # (103..208) - (close_brace꞉ CloseBrace): "}" # (208..209) 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 4d63e38fa0..a3ce5b6e66 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 @@ -78,6 +78,7 @@ Tree: - (LeadingTrivia) ► (Whitespace): " " # (96..97) - (open_brace꞉ OpenBrace): "{" # (97..98) - (TrailingTrivia) ► (EndOfLine): "\n" # (98..99) + - (statements꞉ Statements): [] # (99..99) - (LeadingTrivia) ► (Whitespace): " " # (99..103) - (SKIPPED): "unchecked {\n uint256 c = a + b;\n if (c <..." # (103..208) - (close_brace꞉ CloseBrace): "}" # (208..209) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.4.11-failure.yml index 1e723e80ec..a24843c0b1 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.4.11-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "event E1(uint256 value);\n" # (0..25) + - (SourceUnit): # "event E1(uint256 value);\n" (0..25) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "event E1(uint256 value);\n" # (0..25) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.6.0-failure.yml index 4d6668ff12..661dab9668 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.6.0-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "event E1(uint256 value);\n" # (0..25) + - (SourceUnit): # "event E1(uint256 value);\n" (0..25) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "event E1(uint256 value);\n" # (0..25) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.7.1-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.7.1-failure.yml index cb6bc79b60..c32186b054 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.7.1-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.7.1-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "event E1(uint256 value);\n" # (0..25) + - (SourceUnit): # "event E1(uint256 value);\n" (0..25) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "event E1(uint256 value);\n" # (0..25) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.7.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.7.4-failure.yml index 34eb1287a5..17d8e503c5 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.7.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.7.4-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "event E1(uint256 value);\n" # (0..25) + - (SourceUnit): # "event E1(uint256 value);\n" (0..25) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "event E1(uint256 value);\n" # (0..25) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.0-failure.yml index 6d842333fa..c7ad154628 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.0-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "event E1(uint256 value);\n" # (0..25) + - (SourceUnit): # "event E1(uint256 value);\n" (0..25) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "event E1(uint256 value);\n" # (0..25) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.13-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.13-failure.yml index c04c3be1d4..c6cfcf8199 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.13-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.13-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "event E1(uint256 value);\n" # (0..25) + - (SourceUnit): # "event E1(uint256 value);\n" (0..25) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "event E1(uint256 value);\n" # (0..25) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.4-failure.yml index 4e1afb3798..4a93578fcd 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.4-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "event E1(uint256 value);\n" # (0..25) + - (SourceUnit): # "event E1(uint256 value);\n" (0..25) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "event E1(uint256 value);\n" # (0..25) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.8-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.8-failure.yml index 106e47c7a6..2f35c3ac53 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.8-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_event/generated/0.8.8-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "event E1(uint256 value);\n" # (0..25) + - (SourceUnit): # "event E1(uint256 value);\n" (0..25) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "event E1(uint256 value);\n" # (0..25) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.4.11-failure.yml index 19a9f83c94..a5f1cd1e35 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.4.11-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "function foo() { }" # (0..18) + - (SourceUnit): # "function foo() { }" (0..18) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "function foo() { }" # (0..18) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.6.0-failure.yml index 52d0d407f3..4dcb33e529 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.6.0-failure.yml @@ -14,4 +14,6 @@ Errors: # 1 total ───╯ Tree: - - (SourceUnit) ► (SKIPPED): "function foo() { }" # (0..18) + - (SourceUnit): # "function foo() { }" (0..18) + - (members꞉ SourceUnitMembers): [] # (0..0) + - (SKIPPED): "function foo() { }" # (0..18) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.7.1-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.7.1-success.yml index 5600019929..cf710a29b3 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.7.1-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/top_level_function/generated/0.7.1-success.yml @@ -14,9 +14,12 @@ Tree: - (variant꞉ Identifier): "foo" # (9..12) - (parameters꞉ ParametersDeclaration): # "()" (12..14) - (open_paren꞉ OpenParen): "(" # (12..13) + - (parameters꞉ Parameters): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) + - (attributes꞉ FunctionAttributes): [] # (14..14) - (body꞉ FunctionBody) ► (variant꞉ Block): # " { }" (14..18) - (LeadingTrivia) ► (Whitespace): " " # (14..15) - (open_brace꞉ OpenBrace): "{" # (15..16) + - (statements꞉ Statements): [] # (16..16) - (LeadingTrivia) ► (Whitespace): " " # (16..17) - (close_brace꞉ CloseBrace): "}" # (17..18) diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/trailing_trivia/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/trailing_trivia/generated/0.4.11-success.yml index 3230db8b2f..2963c58197 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/trailing_trivia/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/trailing_trivia/generated/0.4.11-success.yml @@ -20,6 +20,7 @@ Tree: - (name꞉ Identifier): "First" # (9..14) - (LeadingTrivia) ► (Whitespace): " " # (14..15) - (open_brace꞉ OpenBrace): "{" # (15..16) + - (members꞉ ContractMembers): [] # (16..16) - (close_brace꞉ CloseBrace): "}" # (16..17) - (TrailingTrivia) ► (EndOfLine): "\n" # (17..18) - (item꞉ SourceUnitMember) ► (variant꞉ ContractDefinition): # "\n\n// Newlines both before and after this comment s..." (18..148) @@ -37,5 +38,6 @@ Tree: - (name꞉ Identifier): "Second" # (138..144) - (LeadingTrivia) ► (Whitespace): " " # (144..145) - (open_brace꞉ OpenBrace): "{" # (145..146) + - (members꞉ ContractMembers): [] # (146..146) - (close_brace꞉ CloseBrace): "}" # (146..147) - (TrailingTrivia) ► (EndOfLine): "\n" # (147..148) 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 0489f05f38..00062def2e 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 @@ -8,14 +8,15 @@ 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. - ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:1:1] + ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ - 1 │ ╭─▶ - ┆ ┆ + 2 │ ╭─▶ throw invalid ; 3 │ ├─▶ { 1 * 2; 3 * b invalid; } │ │ │ ╰─────────────────────────────── Error occurred here. ───╯ Tree: - - (SKIPPED): "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (0..43) + - (Statements): # "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" (0..43) + - (LeadingTrivia) ► (EndOfLine): "\n" # (0..1) + - (SKIPPED): "throw invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (1..43) 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 f3f2e5aefb..58c83e66d1 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 @@ -8,14 +8,15 @@ 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. - ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:1:1] + ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ - 1 │ ╭─▶ - ┆ ┆ + 2 │ ╭─▶ throw invalid ; 3 │ ├─▶ { 1 * 2; 3 * b invalid; } │ │ │ ╰─────────────────────────────── Error occurred here. ───╯ Tree: - - (SKIPPED): "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (0..43) + - (Statements): # "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" (0..43) + - (LeadingTrivia) ► (EndOfLine): "\n" # (0..1) + - (SKIPPED): "throw invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (1..43) 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 338084ea77..1bfd4b1b90 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 @@ -8,14 +8,15 @@ 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. - ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:1:1] + ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ - 1 │ ╭─▶ - ┆ ┆ + 2 │ ╭─▶ throw invalid ; 3 │ ├─▶ { 1 * 2; 3 * b invalid; } │ │ │ ╰─────────────────────────────── Error occurred here. ───╯ Tree: - - (SKIPPED): "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (0..43) + - (Statements): # "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" (0..43) + - (LeadingTrivia) ► (EndOfLine): "\n" # (0..1) + - (SKIPPED): "throw invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (1..43) 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 7da78efb22..6ba90bf604 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 @@ -8,14 +8,15 @@ 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. - ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:1:1] + ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ - 1 │ ╭─▶ - ┆ ┆ + 2 │ ╭─▶ throw invalid ; 3 │ ├─▶ { 1 * 2; 3 * b invalid; } │ │ │ ╰─────────────────────────────── Error occurred here. ───╯ Tree: - - (SKIPPED): "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (0..43) + - (Statements): # "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" (0..43) + - (LeadingTrivia) ► (EndOfLine): "\n" # (0..1) + - (SKIPPED): "throw invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (1..43) 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 53717e57b1..7fc177da2c 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 @@ -8,14 +8,15 @@ 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. - ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:1:1] + ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ - 1 │ ╭─▶ - ┆ ┆ + 2 │ ╭─▶ throw invalid ; 3 │ ├─▶ { 1 * 2; 3 * b invalid; } │ │ │ ╰─────────────────────────────── Error occurred here. ───╯ Tree: - - (SKIPPED): "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (0..43) + - (Statements): # "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" (0..43) + - (LeadingTrivia) ► (EndOfLine): "\n" # (0..1) + - (SKIPPED): "throw invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (1..43) 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 f1b5c5120d..205234b266 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 @@ -8,14 +8,15 @@ 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. - ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:1:1] + ╭─[crates/solidity/testing/snapshots/cst_output/Statements/invalid_termination/input.sol:2:1] │ - 1 │ ╭─▶ - ┆ ┆ + 2 │ ╭─▶ throw invalid ; 3 │ ├─▶ { 1 * 2; 3 * b invalid; } │ │ │ ╰─────────────────────────────── Error occurred here. ───╯ Tree: - - (SKIPPED): "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (0..43) + - (Statements): # "\nthrow invalid ;\n{ 1 * 2; 3 * b invalid; }\n" (0..43) + - (LeadingTrivia) ► (EndOfLine): "\n" # (0..1) + - (SKIPPED): "throw invalid ;\n{ 1 * 2; 3 * b invalid; }\n" # (1..43) diff --git a/crates/solidity/testing/snapshots/cst_output/StructDefinition/no_members/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/StructDefinition/no_members/generated/0.4.11-success.yml index 52f3a82943..2a9f2b22a5 100644 --- a/crates/solidity/testing/snapshots/cst_output/StructDefinition/no_members/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/StructDefinition/no_members/generated/0.4.11-success.yml @@ -12,6 +12,7 @@ Tree: - (name꞉ Identifier): "S" # (7..8) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_brace꞉ OpenBrace): "{" # (9..10) + - (members꞉ StructMembers): [] # (10..10) - (LeadingTrivia) ► (Whitespace): " " # (10..11) - (close_brace꞉ CloseBrace): "}" # (11..12) - (TrailingTrivia) ► (EndOfLine): "\n" # (12..13) diff --git a/crates/solidity/testing/snapshots/cst_output/TryStatement/try_catch/generated/0.6.0-success.yml b/crates/solidity/testing/snapshots/cst_output/TryStatement/try_catch/generated/0.6.0-success.yml index 3e82b9295b..b65072533a 100644 --- a/crates/solidity/testing/snapshots/cst_output/TryStatement/try_catch/generated/0.6.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/TryStatement/try_catch/generated/0.6.0-success.yml @@ -17,10 +17,12 @@ Tree: - (member꞉ MemberAccess) ► (variant꞉ Identifier): "b" # (6..7) - (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()" (7..9) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ PositionalArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (body꞉ Block): # " {}" (9..12) - (LeadingTrivia) ► (Whitespace): " " # (9..10) - (open_brace꞉ OpenBrace): "{" # (10..11) + - (statements꞉ Statements): [] # (11..11) - (close_brace꞉ CloseBrace): "}" # (11..12) - (catch_clauses꞉ CatchClauses): # " catch {}" (12..21) - (item꞉ CatchClause): # " catch {}" (12..21) @@ -29,4 +31,5 @@ Tree: - (body꞉ Block): # " {}" (18..21) - (LeadingTrivia) ► (Whitespace): " " # (18..19) - (open_brace꞉ OpenBrace): "{" # (19..20) + - (statements꞉ Statements): [] # (20..20) - (close_brace꞉ CloseBrace): "}" # (20..21) diff --git a/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.6.2-failure.yml b/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.6.2-failure.yml index 18a870d2bb..7b3a02fa9f 100644 --- a/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.6.2-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.6.2-failure.yml @@ -45,6 +45,7 @@ Tree: - (MultiLineComment): "/**/" # (20..24) - (EndOfLine): "\n" # (24..25) - (open_brace꞉ OpenBrace): "{" # (25..26) + - (arguments꞉ NamedArguments): [] # (26..26) - (LeadingTrivia) ► (Whitespace): " " # (26..27) - (SKIPPED): "throw" # (27..32) - (semicolon꞉ Semicolon): ";" # (32..33) diff --git a/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.8.0-failure.yml index 180f280720..ea3b97b72a 100644 --- a/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.8.0-failure.yml @@ -44,6 +44,7 @@ Tree: - (MultiLineComment): "/**/" # (20..24) - (EndOfLine): "\n" # (24..25) - (open_brace꞉ OpenBrace): "{" # (25..26) + - (arguments꞉ NamedArguments): [] # (26..26) - (LeadingTrivia) ► (Whitespace): " " # (26..27) - (SKIPPED): "throw" # (27..32) - (semicolon꞉ Semicolon): ";" # (32..33) diff --git a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/internal_attribute/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/internal_attribute/generated/0.4.11-success.yml index 38427b5e4e..83a9800f0a 100644 --- a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/internal_attribute/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/internal_attribute/generated/0.4.11-success.yml @@ -11,6 +11,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (8..11) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (parameters꞉ Parameters): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) - (attributes꞉ UnnamedFunctionAttributes): # " internal" (11..20) - (item꞉ UnnamedFunctionAttribute): # " internal" (11..20) @@ -19,5 +20,6 @@ Tree: - (body꞉ FunctionBody) ► (variant꞉ Block): # " {}\n" (20..24) - (LeadingTrivia) ► (Whitespace): " " # (20..21) - (open_brace꞉ OpenBrace): "{" # (21..22) + - (statements꞉ Statements): [] # (22..22) - (close_brace꞉ CloseBrace): "}" # (22..23) - (TrailingTrivia) ► (EndOfLine): "\n" # (23..24) diff --git a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/internal_attribute/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/internal_attribute/generated/0.5.0-failure.yml index 03ffc54891..6a21f48af4 100644 --- a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/internal_attribute/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/internal_attribute/generated/0.5.0-failure.yml @@ -19,5 +19,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (8..11) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (parameters꞉ Parameters): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) + - (attributes꞉ UnnamedFunctionAttributes): [] # (11..11) - (SKIPPED): " internal {}\n" # (11..24) diff --git a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/private_attribute/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/private_attribute/generated/0.4.11-success.yml index 6dfd128753..14c5aa3674 100644 --- a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/private_attribute/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/private_attribute/generated/0.4.11-success.yml @@ -11,6 +11,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (8..11) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (parameters꞉ Parameters): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) - (attributes꞉ UnnamedFunctionAttributes): # " private" (11..19) - (item꞉ UnnamedFunctionAttribute): # " private" (11..19) @@ -19,5 +20,6 @@ Tree: - (body꞉ FunctionBody) ► (variant꞉ Block): # " {}\n" (19..23) - (LeadingTrivia) ► (Whitespace): " " # (19..20) - (open_brace꞉ OpenBrace): "{" # (20..21) + - (statements꞉ Statements): [] # (21..21) - (close_brace꞉ CloseBrace): "}" # (21..22) - (TrailingTrivia) ► (EndOfLine): "\n" # (22..23) diff --git a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/private_attribute/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/private_attribute/generated/0.5.0-failure.yml index 84dbec7733..ceb718ffb8 100644 --- a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/private_attribute/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/private_attribute/generated/0.5.0-failure.yml @@ -19,5 +19,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (8..11) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (parameters꞉ Parameters): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) + - (attributes꞉ UnnamedFunctionAttributes): [] # (11..11) - (SKIPPED): " private {}\n" # (11..23) diff --git a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/public_attribute/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/public_attribute/generated/0.4.11-success.yml index 6bbd36aebf..acad4e9bcc 100644 --- a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/public_attribute/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/public_attribute/generated/0.4.11-success.yml @@ -11,6 +11,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (8..11) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (parameters꞉ Parameters): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) - (attributes꞉ UnnamedFunctionAttributes): # " public" (11..18) - (item꞉ UnnamedFunctionAttribute): # " public" (11..18) @@ -19,5 +20,6 @@ Tree: - (body꞉ FunctionBody) ► (variant꞉ Block): # " {}\n" (18..22) - (LeadingTrivia) ► (Whitespace): " " # (18..19) - (open_brace꞉ OpenBrace): "{" # (19..20) + - (statements꞉ Statements): [] # (20..20) - (close_brace꞉ CloseBrace): "}" # (20..21) - (TrailingTrivia) ► (EndOfLine): "\n" # (21..22) diff --git a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/public_attribute/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/public_attribute/generated/0.5.0-failure.yml index 99bb83f779..9239261d3c 100644 --- a/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/public_attribute/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/UnnamedFunctionDefinition/public_attribute/generated/0.5.0-failure.yml @@ -19,5 +19,7 @@ Tree: - (parameters꞉ ParametersDeclaration): # " ()" (8..11) - (LeadingTrivia) ► (Whitespace): " " # (8..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (parameters꞉ Parameters): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) + - (attributes꞉ UnnamedFunctionAttributes): [] # (11..11) - (SKIPPED): " public {}\n" # (11..22) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_add/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_add/generated/0.4.11-success.yml index 3933313e2f..e51aa1ac4f 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_add/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_add/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "add()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulAddKeyword): "add" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_addmod/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_addmod/generated/0.4.11-success.yml index d65c874a21..fd6d19904e 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_addmod/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_addmod/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "addmod()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulAddModKeyword): "addmod" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_address/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_address/generated/0.4.11-success.yml index a89d9ce0ca..a18205dfe0 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_address/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_address/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "address()\n" (0..10) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulAddressKeyword): "address" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_and/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_and/generated/0.4.11-success.yml index af6b01dae0..70df33ee32 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_and/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_and/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "and()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulAndKeyword): "and" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_balance/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_balance/generated/0.4.11-success.yml index 2cf97b24ee..f4f72db618 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_balance/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_balance/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "balance()\n" (0..10) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulBalanceKeyword): "balance" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_basefee/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_basefee/generated/0.4.11-success.yml index 45c738531c..386b1e49a4 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_basefee/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_basefee/generated/0.4.11-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "basefee" (0..7) - (item꞉ YulIdentifier): "basefee" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_basefee/generated/0.8.7-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_basefee/generated/0.8.7-success.yml index 7b1ee1bd5e..6308c47b81 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_basefee/generated/0.8.7-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_basefee/generated/0.8.7-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "basefee()\n" (0..10) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulBaseFeeKeyword): "basefee" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blockhash/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blockhash/generated/0.4.11-success.yml index 0054ffd7dc..a9927868b3 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blockhash/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_blockhash/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "blockhash()\n" (0..12) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulBlockHashKeyword): "blockhash" # (0..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (arguments꞉ YulArguments): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) - (TrailingTrivia) ► (EndOfLine): "\n" # (11..12) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_byte/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_byte/generated/0.4.11-success.yml index a61e23411d..b53eb290ea 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_byte/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_byte/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "byte()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulByteKeyword): "byte" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_call/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_call/generated/0.4.11-success.yml index 922ee52982..c6a8d3356b 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_call/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_call/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "call()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCallKeyword): "call" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_callcode/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_callcode/generated/0.4.11-success.yml index 4dc07d7d1c..7225a3d505 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_callcode/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_callcode/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "callcode()\n" (0..11) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCallCodeKeyword): "callcode" # (0..8) - (open_paren꞉ OpenParen): "(" # (8..9) + - (arguments꞉ YulArguments): [] # (9..9) - (close_paren꞉ CloseParen): ")" # (9..10) - (TrailingTrivia) ► (EndOfLine): "\n" # (10..11) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldatacopy/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldatacopy/generated/0.4.11-success.yml index a0ddff9d6d..9227388ee3 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldatacopy/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldatacopy/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "calldatacopy()\n" (0..15) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCallDataCopyKeyword): "calldatacopy" # (0..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (arguments꞉ YulArguments): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldataload/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldataload/generated/0.4.11-success.yml index a0bc0278f1..4a010d8b4b 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldataload/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldataload/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "calldataload()\n" (0..15) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCallDataLoadKeyword): "calldataload" # (0..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (arguments꞉ YulArguments): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldatasize/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldatasize/generated/0.4.11-success.yml index ea3dbc6e1b..f5672351fd 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldatasize/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_calldatasize/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "calldatasize()\n" (0..15) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCallDataSizeKeyword): "calldatasize" # (0..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (arguments꞉ YulArguments): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_caller/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_caller/generated/0.4.11-success.yml index 75ed7dfa69..8a3ac64c64 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_caller/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_caller/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "caller()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCallerKeyword): "caller" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_callvalue/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_callvalue/generated/0.4.11-success.yml index ecc96c41f3..eb75342f38 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_callvalue/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_callvalue/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "callvalue()\n" (0..12) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCallValueKeyword): "callvalue" # (0..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (arguments꞉ YulArguments): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) - (TrailingTrivia) ► (EndOfLine): "\n" # (11..12) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_chainid/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_chainid/generated/0.4.11-success.yml index dcf2f776df..b8f462a484 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_chainid/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_chainid/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "chainid()\n" (0..10) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulChainIdKeyword): "chainid" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_coinbase/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_coinbase/generated/0.4.11-success.yml index 9e8211acbb..7b448f39d6 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_coinbase/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_coinbase/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "coinbase()\n" (0..11) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCoinBaseKeyword): "coinbase" # (0..8) - (open_paren꞉ OpenParen): "(" # (8..9) + - (arguments꞉ YulArguments): [] # (9..9) - (close_paren꞉ CloseParen): ")" # (9..10) - (TrailingTrivia) ► (EndOfLine): "\n" # (10..11) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create/generated/0.4.11-success.yml index 8ee43f1bb5..5084727602 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "create()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCreateKeyword): "create" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create2/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create2/generated/0.4.11-success.yml index 2efde23fc0..ce1944f3e1 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create2/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create2/generated/0.4.11-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "create2" (0..7) - (item꞉ YulIdentifier): "create2" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create2/generated/0.4.12-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create2/generated/0.4.12-success.yml index cd9e6592c7..bf55dc04dd 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create2/generated/0.4.12-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_create2/generated/0.4.12-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "create2()\n" (0..10) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulCreate2Keyword): "create2" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_delegatecall/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_delegatecall/generated/0.4.11-success.yml index 9593b8dfa6..f2713ff0d4 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_delegatecall/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_delegatecall/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "delegatecall()\n" (0..15) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulDelegateCallKeyword): "delegatecall" # (0..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (arguments꞉ YulArguments): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/generated/0.4.11-success.yml index b5e78ec269..f8637b4a40 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_difficulty/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "difficulty()\n" (0..13) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulDifficultyKeyword): "difficulty" # (0..10) - (open_paren꞉ OpenParen): "(" # (10..11) + - (arguments꞉ YulArguments): [] # (11..11) - (close_paren꞉ CloseParen): ")" # (11..12) - (TrailingTrivia) ► (EndOfLine): "\n" # (12..13) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_div/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_div/generated/0.4.11-success.yml index 343f0bd3bd..885af9a5a4 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_div/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_div/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "div()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulDivKeyword): "div" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_eq/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_eq/generated/0.4.11-success.yml index ff5aab4581..6005754031 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_eq/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_eq/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "eq()\n" (0..5) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulEqKeyword): "eq" # (0..2) - (open_paren꞉ OpenParen): "(" # (2..3) + - (arguments꞉ YulArguments): [] # (3..3) - (close_paren꞉ CloseParen): ")" # (3..4) - (TrailingTrivia) ► (EndOfLine): "\n" # (4..5) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_exp/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_exp/generated/0.4.11-success.yml index 550b822b15..dc28325a87 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_exp/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_exp/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "exp()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulExpKeyword): "exp" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodecopy/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodecopy/generated/0.4.11-success.yml index 2573118446..d4a0872ccf 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodecopy/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodecopy/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "extcodecopy()\n" (0..14) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulExtCodeCopyKeyword): "extcodecopy" # (0..11) - (open_paren꞉ OpenParen): "(" # (11..12) + - (arguments꞉ YulArguments): [] # (12..12) - (close_paren꞉ CloseParen): ")" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodehash/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodehash/generated/0.4.11-success.yml index bd7d642d8e..8ec1337d0c 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodehash/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodehash/generated/0.4.11-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "extcodehash" (0..11) - (item꞉ YulIdentifier): "extcodehash" # (0..11) - (open_paren꞉ OpenParen): "(" # (11..12) + - (arguments꞉ YulArguments): [] # (12..12) - (close_paren꞉ CloseParen): ")" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodehash/generated/0.5.0-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodehash/generated/0.5.0-success.yml index 554bb54c08..8f792b49e7 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodehash/generated/0.5.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodehash/generated/0.5.0-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "extcodehash()\n" (0..14) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulExtCodeHashKeyword): "extcodehash" # (0..11) - (open_paren꞉ OpenParen): "(" # (11..12) + - (arguments꞉ YulArguments): [] # (12..12) - (close_paren꞉ CloseParen): ")" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodesize/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodesize/generated/0.4.11-success.yml index f6efba1e8e..09f5441a78 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodesize/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_extcodesize/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "extcodesize()\n" (0..14) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulExtCodeSizeKeyword): "extcodesize" # (0..11) - (open_paren꞉ OpenParen): "(" # (11..12) + - (arguments꞉ YulArguments): [] # (12..12) - (close_paren꞉ CloseParen): ")" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gas/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gas/generated/0.4.11-success.yml index 6e7a5c1b13..3aef21bc3b 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gas/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gas/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "gas()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulGasKeyword): "gas" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gaslimit/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gaslimit/generated/0.4.11-success.yml index 716a142191..ce97c2dcd9 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gaslimit/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gaslimit/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "gaslimit()\n" (0..11) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulGasLimitKeyword): "gaslimit" # (0..8) - (open_paren꞉ OpenParen): "(" # (8..9) + - (arguments꞉ YulArguments): [] # (9..9) - (close_paren꞉ CloseParen): ")" # (9..10) - (TrailingTrivia) ► (EndOfLine): "\n" # (10..11) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gasprice/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gasprice/generated/0.4.11-success.yml index fbd2db45fe..ecafaad208 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gasprice/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gasprice/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "gasprice()\n" (0..11) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulGasPriceKeyword): "gasprice" # (0..8) - (open_paren꞉ OpenParen): "(" # (8..9) + - (arguments꞉ YulArguments): [] # (9..9) - (close_paren꞉ CloseParen): ")" # (9..10) - (TrailingTrivia) ► (EndOfLine): "\n" # (10..11) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gt/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gt/generated/0.4.11-success.yml index 28a76af18d..3fa2e102f8 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gt/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_gt/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "gt()\n" (0..5) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulGtKeyword): "gt" # (0..2) - (open_paren꞉ OpenParen): "(" # (2..3) + - (arguments꞉ YulArguments): [] # (3..3) - (close_paren꞉ CloseParen): ")" # (3..4) - (TrailingTrivia) ► (EndOfLine): "\n" # (4..5) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_invalid/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_invalid/generated/0.4.11-success.yml index f1b60a16ec..2a4c956c12 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_invalid/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_invalid/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "invalid()\n" (0..10) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulInvalidKeyword): "invalid" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_iszero/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_iszero/generated/0.4.11-success.yml index 445ed53be8..ab9a084ebc 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_iszero/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_iszero/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "iszero()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulIsZeroKeyword): "iszero" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_keccak256/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_keccak256/generated/0.4.11-success.yml index 000003c890..826db8c559 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_keccak256/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_keccak256/generated/0.4.11-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "keccak256" (0..9) - (item꞉ YulIdentifier): "keccak256" # (0..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (arguments꞉ YulArguments): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) - (TrailingTrivia) ► (EndOfLine): "\n" # (11..12) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_keccak256/generated/0.4.12-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_keccak256/generated/0.4.12-success.yml index 57969e683d..a2587951d7 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_keccak256/generated/0.4.12-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_keccak256/generated/0.4.12-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "keccak256()\n" (0..12) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulKeccak256Keyword): "keccak256" # (0..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (arguments꞉ YulArguments): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) - (TrailingTrivia) ► (EndOfLine): "\n" # (11..12) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log0/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log0/generated/0.4.11-success.yml index ec0303f5fd..dc52616249 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log0/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log0/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "log0()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulLog0Keyword): "log0" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log1/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log1/generated/0.4.11-success.yml index 5b9e93e814..2f3ea5af31 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log1/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log1/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "log1()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulLog1Keyword): "log1" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log2/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log2/generated/0.4.11-success.yml index 923e7c8187..0385c83741 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log2/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log2/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "log2()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulLog2Keyword): "log2" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log3/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log3/generated/0.4.11-success.yml index da8cc12055..0155df2361 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log3/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log3/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "log3()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulLog3Keyword): "log3" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log4/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log4/generated/0.4.11-success.yml index 15398fd8cb..ef60f52823 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log4/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_log4/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "log4()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulLog4Keyword): "log4" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_lt/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_lt/generated/0.4.11-success.yml index 0e0b99cd84..d090f9d090 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_lt/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_lt/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "lt()\n" (0..5) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulLtKeyword): "lt" # (0..2) - (open_paren꞉ OpenParen): "(" # (2..3) + - (arguments꞉ YulArguments): [] # (3..3) - (close_paren꞉ CloseParen): ")" # (3..4) - (TrailingTrivia) ► (EndOfLine): "\n" # (4..5) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mload/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mload/generated/0.4.11-success.yml index b49036a8df..3d11b97eb6 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mload/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mload/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "mload()\n" (0..8) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulMLoadKeyword): "mload" # (0..5) - (open_paren꞉ OpenParen): "(" # (5..6) + - (arguments꞉ YulArguments): [] # (6..6) - (close_paren꞉ CloseParen): ")" # (6..7) - (TrailingTrivia) ► (EndOfLine): "\n" # (7..8) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mod/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mod/generated/0.4.11-success.yml index 124fa826a5..9445fb14d0 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mod/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mod/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "mod()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulModKeyword): "mod" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_msize/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_msize/generated/0.4.11-success.yml index 85b70a2e83..3119e7e62e 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_msize/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_msize/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "msize()\n" (0..8) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulMSizeKeyword): "msize" # (0..5) - (open_paren꞉ OpenParen): "(" # (5..6) + - (arguments꞉ YulArguments): [] # (6..6) - (close_paren꞉ CloseParen): ")" # (6..7) - (TrailingTrivia) ► (EndOfLine): "\n" # (7..8) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mstore/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mstore/generated/0.4.11-success.yml index 83186b4b2b..1ac893c3c0 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mstore/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mstore/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "mstore()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulMStoreKeyword): "mstore" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mstore8/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mstore8/generated/0.4.11-success.yml index cb72be3fcc..b966414d1c 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mstore8/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mstore8/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "mstore8()\n" (0..10) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulMStore8Keyword): "mstore8" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mul/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mul/generated/0.4.11-success.yml index 5bffa88019..d9b222eb5b 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mul/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mul/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "mul()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulMulKeyword): "mul" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mulmod/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mulmod/generated/0.4.11-success.yml index 56cc4fb7da..e001a2facf 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mulmod/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_mulmod/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "mulmod()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulMulModKeyword): "mulmod" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_not/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_not/generated/0.4.11-success.yml index fbf0a73fa6..09103d83ac 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_not/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_not/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "not()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulNotKeyword): "not" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_number/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_number/generated/0.4.11-success.yml index 2b76d622c0..626e0f592b 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_number/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_number/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "number()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulNumberKeyword): "number" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_or/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_or/generated/0.4.11-success.yml index d4a40059bf..3b51a3a97c 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_or/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_or/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "or()\n" (0..5) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulOrKeyword): "or" # (0..2) - (open_paren꞉ OpenParen): "(" # (2..3) + - (arguments꞉ YulArguments): [] # (3..3) - (close_paren꞉ CloseParen): ")" # (3..4) - (TrailingTrivia) ► (EndOfLine): "\n" # (4..5) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_origin/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_origin/generated/0.4.11-success.yml index 32b2a1f250..194076bbf6 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_origin/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_origin/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "origin()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulOriginKeyword): "origin" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_pop/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_pop/generated/0.4.11-success.yml index f36765d40e..9d35ebc47f 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_pop/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_pop/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "pop()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulPopKeyword): "pop" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_prevrandao/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_prevrandao/generated/0.4.11-success.yml index 8c857c31dc..0aa3ab3174 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_prevrandao/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_prevrandao/generated/0.4.11-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "prevrandao" (0..10) - (item꞉ YulIdentifier): "prevrandao" # (0..10) - (open_paren꞉ OpenParen): "(" # (10..11) + - (arguments꞉ YulArguments): [] # (11..11) - (close_paren꞉ CloseParen): ")" # (11..12) - (TrailingTrivia) ► (EndOfLine): "\n" # (12..13) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_prevrandao/generated/0.8.18-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_prevrandao/generated/0.8.18-success.yml index ee3998192f..7a3475057d 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_prevrandao/generated/0.8.18-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_prevrandao/generated/0.8.18-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "prevrandao()\n" (0..13) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulPrevRandaoKeyword): "prevrandao" # (0..10) - (open_paren꞉ OpenParen): "(" # (10..11) + - (arguments꞉ YulArguments): [] # (11..11) - (close_paren꞉ CloseParen): ")" # (11..12) - (TrailingTrivia) ► (EndOfLine): "\n" # (12..13) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_return/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_return/generated/0.4.11-success.yml index e3e8d79c3e..7ec3c5d318 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_return/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_return/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "return()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulReturnKeyword): "return" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatacopy/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatacopy/generated/0.4.11-success.yml index 996269a2b3..27688ac782 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatacopy/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatacopy/generated/0.4.11-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "returndatacopy" (0..14) - (item꞉ YulIdentifier): "returndatacopy" # (0..14) - (open_paren꞉ OpenParen): "(" # (14..15) + - (arguments꞉ YulArguments): [] # (15..15) - (close_paren꞉ CloseParen): ")" # (15..16) - (TrailingTrivia) ► (EndOfLine): "\n" # (16..17) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatacopy/generated/0.4.12-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatacopy/generated/0.4.12-success.yml index 18c4ac9b80..6ad8e6dda9 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatacopy/generated/0.4.12-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatacopy/generated/0.4.12-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "returndatacopy()\n" (0..17) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulReturnDataCopyKeyword): "returndatacopy" # (0..14) - (open_paren꞉ OpenParen): "(" # (14..15) + - (arguments꞉ YulArguments): [] # (15..15) - (close_paren꞉ CloseParen): ")" # (15..16) - (TrailingTrivia) ► (EndOfLine): "\n" # (16..17) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatasize/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatasize/generated/0.4.11-success.yml index 0b69b56fde..2e00219546 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatasize/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatasize/generated/0.4.11-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "returndatasize" (0..14) - (item꞉ YulIdentifier): "returndatasize" # (0..14) - (open_paren꞉ OpenParen): "(" # (14..15) + - (arguments꞉ YulArguments): [] # (15..15) - (close_paren꞉ CloseParen): ")" # (15..16) - (TrailingTrivia) ► (EndOfLine): "\n" # (16..17) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatasize/generated/0.4.12-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatasize/generated/0.4.12-success.yml index ab9f4c3df6..1307c05317 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatasize/generated/0.4.12-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_returndatasize/generated/0.4.12-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "returndatasize()\n" (0..17) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulReturnDataSizeKeyword): "returndatasize" # (0..14) - (open_paren꞉ OpenParen): "(" # (14..15) + - (arguments꞉ YulArguments): [] # (15..15) - (close_paren꞉ CloseParen): ")" # (15..16) - (TrailingTrivia) ► (EndOfLine): "\n" # (16..17) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_revert/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_revert/generated/0.4.11-success.yml index 1735bf3d36..10dee1fd42 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_revert/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_revert/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "revert()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulRevertKeyword): "revert" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sar/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sar/generated/0.4.11-success.yml index cbd58479cd..a7dba1f99f 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sar/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sar/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "sar()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSarKeyword): "sar" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sdiv/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sdiv/generated/0.4.11-success.yml index 207a22b3cf..0f4205f931 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sdiv/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sdiv/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "sdiv()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSDivKeyword): "sdiv" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_selfbalance/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_selfbalance/generated/0.4.11-success.yml index 16da22699f..269667b86f 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_selfbalance/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_selfbalance/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "selfbalance()\n" (0..14) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSelfBalanceKeyword): "selfbalance" # (0..11) - (open_paren꞉ OpenParen): "(" # (11..12) + - (arguments꞉ YulArguments): [] # (12..12) - (close_paren꞉ CloseParen): ")" # (12..13) - (TrailingTrivia) ► (EndOfLine): "\n" # (13..14) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_selfdestruct/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_selfdestruct/generated/0.4.11-success.yml index de266a4455..8fff63cb8d 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_selfdestruct/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_selfdestruct/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "selfdestruct()\n" (0..15) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSelfDestructKeyword): "selfdestruct" # (0..12) - (open_paren꞉ OpenParen): "(" # (12..13) + - (arguments꞉ YulArguments): [] # (13..13) - (close_paren꞉ CloseParen): ")" # (13..14) - (TrailingTrivia) ► (EndOfLine): "\n" # (14..15) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sgt/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sgt/generated/0.4.11-success.yml index 488a49032d..ae5860502a 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sgt/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sgt/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "sgt()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSgtKeyword): "sgt" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sha3/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sha3/generated/0.4.11-success.yml index dadfb550cb..96e4dabc3f 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sha3/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sha3/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "sha3()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSha3Keyword): "sha3" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sha3/generated/0.5.0-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sha3/generated/0.5.0-success.yml index 30e0df7d8b..db0f330235 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sha3/generated/0.5.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sha3/generated/0.5.0-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "sha3" (0..4) - (item꞉ YulIdentifier): "sha3" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_shl/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_shl/generated/0.4.11-success.yml index 9a1ab7c62d..3f883f8147 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_shl/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_shl/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "shl()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulShlKeyword): "shl" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_shr/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_shr/generated/0.4.11-success.yml index b30faea83c..0ca3c96b77 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_shr/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_shr/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "shr()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulShrKeyword): "shr" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_signextend/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_signextend/generated/0.4.11-success.yml index 27004043de..baed7dfeb0 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_signextend/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_signextend/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "signextend()\n" (0..13) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSignExtendKeyword): "signextend" # (0..10) - (open_paren꞉ OpenParen): "(" # (10..11) + - (arguments꞉ YulArguments): [] # (11..11) - (close_paren꞉ CloseParen): ")" # (11..12) - (TrailingTrivia) ► (EndOfLine): "\n" # (12..13) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sload/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sload/generated/0.4.11-success.yml index c636f5e294..b918e7070f 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sload/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sload/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "sload()\n" (0..8) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSLoadKeyword): "sload" # (0..5) - (open_paren꞉ OpenParen): "(" # (5..6) + - (arguments꞉ YulArguments): [] # (6..6) - (close_paren꞉ CloseParen): ")" # (6..7) - (TrailingTrivia) ► (EndOfLine): "\n" # (7..8) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_slt/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_slt/generated/0.4.11-success.yml index eb380c8897..4a7ec4b7e2 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_slt/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_slt/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "slt()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSltKeyword): "slt" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_smod/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_smod/generated/0.4.11-success.yml index efbc2e59e5..b804952ba7 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_smod/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_smod/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "smod()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSModKeyword): "smod" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sstore/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sstore/generated/0.4.11-success.yml index 271eaccf9f..93da6ea277 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sstore/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sstore/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "sstore()\n" (0..9) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSStoreKeyword): "sstore" # (0..6) - (open_paren꞉ OpenParen): "(" # (6..7) + - (arguments꞉ YulArguments): [] # (7..7) - (close_paren꞉ CloseParen): ")" # (7..8) - (TrailingTrivia) ► (EndOfLine): "\n" # (8..9) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_staticcall/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_staticcall/generated/0.4.11-success.yml index 9455c446c9..95fde32aab 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_staticcall/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_staticcall/generated/0.4.11-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "staticcall" (0..10) - (item꞉ YulIdentifier): "staticcall" # (0..10) - (open_paren꞉ OpenParen): "(" # (10..11) + - (arguments꞉ YulArguments): [] # (11..11) - (close_paren꞉ CloseParen): ")" # (11..12) - (TrailingTrivia) ► (EndOfLine): "\n" # (12..13) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_staticcall/generated/0.4.12-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_staticcall/generated/0.4.12-success.yml index 60a93da2f2..f85b16d6bd 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_staticcall/generated/0.4.12-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_staticcall/generated/0.4.12-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "staticcall()\n" (0..13) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulStaticCallKeyword): "staticcall" # (0..10) - (open_paren꞉ OpenParen): "(" # (10..11) + - (arguments꞉ YulArguments): [] # (11..11) - (close_paren꞉ CloseParen): ")" # (11..12) - (TrailingTrivia) ► (EndOfLine): "\n" # (12..13) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_stop/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_stop/generated/0.4.11-success.yml index 732a5144a4..4a1e484d49 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_stop/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_stop/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "stop()\n" (0..7) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulStopKeyword): "stop" # (0..4) - (open_paren꞉ OpenParen): "(" # (4..5) + - (arguments꞉ YulArguments): [] # (5..5) - (close_paren꞉ CloseParen): ")" # (5..6) - (TrailingTrivia) ► (EndOfLine): "\n" # (6..7) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sub/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sub/generated/0.4.11-success.yml index c00ec9d7dd..081eaba1d7 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sub/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_sub/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "sub()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSubKeyword): "sub" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_suicide/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_suicide/generated/0.4.11-success.yml index ec18e81036..6ee3d80716 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_suicide/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_suicide/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "suicide()\n" (0..10) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulSuicideKeyword): "suicide" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_suicide/generated/0.5.0-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_suicide/generated/0.5.0-success.yml index 204d97918a..ef6be2b965 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_suicide/generated/0.5.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_suicide/generated/0.5.0-success.yml @@ -10,5 +10,6 @@ Tree: - (operand꞉ YulExpression) ► (variant꞉ YulIdentifierPath): # "suicide" (0..7) - (item꞉ YulIdentifier): "suicide" # (0..7) - (open_paren꞉ OpenParen): "(" # (7..8) + - (arguments꞉ YulArguments): [] # (8..8) - (close_paren꞉ CloseParen): ")" # (8..9) - (TrailingTrivia) ► (EndOfLine): "\n" # (9..10) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_timestamp/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_timestamp/generated/0.4.11-success.yml index cdebd9dea7..ede1ff17f0 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_timestamp/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_timestamp/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "timestamp()\n" (0..12) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulTimestampKeyword): "timestamp" # (0..9) - (open_paren꞉ OpenParen): "(" # (9..10) + - (arguments꞉ YulArguments): [] # (10..10) - (close_paren꞉ CloseParen): ")" # (10..11) - (TrailingTrivia) ► (EndOfLine): "\n" # (11..12) diff --git a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_xor/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_xor/generated/0.4.11-success.yml index 15db31af97..56d4213000 100644 --- a/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_xor/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/YulFunctionCallExpression/built_in_xor/generated/0.4.11-success.yml @@ -9,5 +9,6 @@ Tree: - (YulFunctionCallExpression): # "xor()\n" (0..6) - (operand꞉ YulExpression) ► (variant꞉ YulBuiltInFunction) ► (variant꞉ YulXorKeyword): "xor" # (0..3) - (open_paren꞉ OpenParen): "(" # (3..4) + - (arguments꞉ YulArguments): [] # (4..4) - (close_paren꞉ CloseParen): ")" # (4..5) - (TrailingTrivia) ► (EndOfLine): "\n" # (5..6) diff --git a/crates/testlang/outputs/cargo/slang_testlang/src/generated/napi_interface/ast_selectors.rs b/crates/testlang/outputs/cargo/slang_testlang/src/generated/napi_interface/ast_selectors.rs index 08a9d1facc..824e941076 100644 --- a/crates/testlang/outputs/cargo/slang_testlang/src/generated/napi_interface/ast_selectors.rs +++ b/crates/testlang/outputs/cargo/slang_testlang/src/generated/napi_interface/ast_selectors.rs @@ -250,14 +250,18 @@ impl Selector { let mut separated = vec![]; let mut separators = vec![]; - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); - - while let Some(separator) = - self.try_select(|node| node.is_token_with_kind(TokenKind::Period))? + if let Some(first) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Identifier))? { - separators.push(separator); + separated.push(first); + + while let Some(separator) = + self.try_select(|node| node.is_token_with_kind(TokenKind::Period))? + { + separators.push(separator); - separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); + separated.push(self.select(|node| node.is_token_with_kind(TokenKind::Identifier))?); + } } Ok(vec![separated, separators])