diff --git a/crates/solidity/inputs/language/definition/05-expressions/04-numbers/productions.yml b/crates/solidity/inputs/language/definition/05-expressions/04-numbers/productions.yml index 5bf8586110..e2d1b7b682 100644 --- a/crates/solidity/inputs/language/definition/05-expressions/04-numbers/productions.yml +++ b/crates/solidity/inputs/language/definition/05-expressions/04-numbers/productions.yml @@ -1,23 +1,32 @@ # yaml-language-server: $schema=../../../generated/productions.schema.json - name: "NumericExpression" + kind: "Parser" + inlined: true + unversioned: + choice: + - reference: "DecimalNumberExpression" + - reference: "HexNumberExpression" + +- name: "DecimalNumberExpression" + kind: "Parser" + unversioned: + sequence: + - reference: "DecimalLiteral" + - optional: + reference: "NumberUnit" + +- name: "HexNumberExpression" kind: "Parser" versioned: 0.4.11: sequence: - - choice: - - reference: "HexLiteral" - - reference: "DecimalLiteral" + - reference: "HexLiteral" - optional: reference: "NumberUnit" 0.5.0: - # "HexLiteral" no longer allows a "NumberUnit" - choice: - - reference: "HexLiteral" - - sequence: - - reference: "DecimalLiteral" - - optional: - reference: "NumberUnit" + # Removed optional "NumberUnit" + reference: "HexLiteral" - name: "HexLiteral" kind: "Scanner" diff --git a/crates/solidity/inputs/language/src/dsl.rs b/crates/solidity/inputs/language/src/dsl.rs index a7faf1c95f..af7586d6c2 100644 --- a/crates/solidity/inputs/language/src/dsl.rs +++ b/crates/solidity/inputs/language/src/dsl.rs @@ -420,10 +420,10 @@ slang_grammar! { { removed in "0.7.0" (FinneyKeyword | SzaboKeyword) } ) ; - parser NumericExpression = ( - (HexLiteral { removed in "0.5.0" (NumberUnit ?) }) | - (DecimalLiteral (NumberUnit ?)) - ) ; + inline parser NumericExpression = ( DecimalNumberExpression | HexNumberExpression ) ; + + parser DecimalNumberExpression = (DecimalLiteral (NumberUnit ?)) ; + parser HexNumberExpression = (HexLiteral { removed in "0.5.0" (NumberUnit ?) }) ; inline parser OrOperator = BarBar ; diff --git a/crates/solidity/outputs/cargo/crate/src/generated/kinds.rs b/crates/solidity/outputs/cargo/crate/src/generated/kinds.rs index 2907502d19..f4a1554b89 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/kinds.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/kinds.rs @@ -36,6 +36,7 @@ pub enum ProductionKind { ContinueStatement, ContractDefinition, ContractMembersList, + DecimalNumberExpression, DeconstructionImport, DeconstructionImportSymbol, DeconstructionImportSymbolsList, @@ -61,6 +62,7 @@ pub enum ProductionKind { FunctionDefinition, FunctionType, FunctionTypeAttributesList, + HexNumberExpression, HexStringLiteralsList, IdentifierPath, IdentifierPathsList, @@ -86,7 +88,6 @@ pub enum ProductionKind { NamedArgumentsList, NamedImport, NewExpression, - NumericExpression, OverrideSpecifier, Parameter, ParametersDeclaration, @@ -194,6 +195,7 @@ pub enum RuleKind { ContinueStatement, ContractDefinition, ContractMembersList, + DecimalNumberExpression, DeconstructionImport, DeconstructionImportSymbol, DeconstructionImportSymbolsList, @@ -220,6 +222,7 @@ pub enum RuleKind { FunctionDefinition, FunctionType, FunctionTypeAttributesList, + HexNumberExpression, HexStringLiteralsList, IdentifierPath, IdentifierPathsList, @@ -247,7 +250,6 @@ pub enum RuleKind { NamedArgumentsList, NamedImport, NewExpression, - NumericExpression, OverrideSpecifier, Parameter, ParametersDeclaration, diff --git a/crates/solidity/outputs/cargo/crate/src/generated/language.rs b/crates/solidity/outputs/cargo/crate/src/generated/language.rs index 5068f4002e..9eb2ad9575 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/language.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/language.rs @@ -673,6 +673,91 @@ impl Language { .with_kind(RuleKind::ContractMembersList) } + #[allow(unused_assignments, unused_parens)] + fn decimal_number_expression(&self, input: &mut ParserContext) -> ParserResult { + SequenceHelper::run(|mut seq| { + seq.elem(self.parse_token_with_trivia::( + input, + TokenKind::DecimalLiteral, + ))?; + seq.elem(OptionalHelper::transform(ChoiceHelper::run( + input, + |mut choice, input| { + let result = self.parse_token_with_trivia::( + input, + TokenKind::DaysKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::EtherKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::HoursKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::MinutesKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::SecondsKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::WeeksKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::WeiKeyword, + ); + choice.consider(input, result)?; + if !self.version_is_at_least_0_5_0 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::YearsKeyword, + ); + choice.consider(input, result)?; + } + if self.version_is_at_least_0_6_11 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::GweiKeyword, + ); + choice.consider(input, result)?; + } + if !self.version_is_at_least_0_7_0 { + let result = ChoiceHelper::run(input, |mut choice, input| { + let result = self + .parse_token_with_trivia::( + input, + TokenKind::FinneyKeyword, + ); + choice.consider(input, result)?; + let result = self + .parse_token_with_trivia::( + input, + TokenKind::SzaboKeyword, + ); + choice.consider(input, result)?; + choice.finish(input) + }); + choice.consider(input, result)?; + } + choice.finish(input) + }, + )))?; + seq.finish() + }) + .with_kind(RuleKind::DecimalNumberExpression) + } + #[allow(unused_assignments, unused_parens)] fn deconstruction_import(&self, input: &mut ParserContext) -> ParserResult { SequenceHelper::run(|mut seq| { @@ -1531,7 +1616,13 @@ impl Language { choice.finish(input) }); choice.consider(input, result)?; - let result = self.numeric_expression(input); + let result = ChoiceHelper::run(input, |mut choice, input| { + let result = self.decimal_number_expression(input); + choice.consider(input, result)?; + let result = self.hex_number_expression(input); + choice.consider(input, result)?; + choice.finish(input) + }); choice.consider(input, result)?; let result = ChoiceHelper::run(input, |mut choice, input| { let result = self.hex_string_literals_list(input); @@ -2041,6 +2132,95 @@ impl Language { .with_kind(RuleKind::FunctionTypeAttributesList) } + #[allow(unused_assignments, unused_parens)] + fn hex_number_expression(&self, input: &mut ParserContext) -> ParserResult { + SequenceHelper::run(|mut seq| { + seq.elem(self.parse_token_with_trivia::( + input, + TokenKind::HexLiteral, + ))?; + if !self.version_is_at_least_0_5_0 { + seq.elem(OptionalHelper::transform(ChoiceHelper::run( + input, + |mut choice, input| { + let result = self.parse_token_with_trivia::( + input, + TokenKind::DaysKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::EtherKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::HoursKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::MinutesKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::SecondsKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::WeeksKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::WeiKeyword, + ); + choice.consider(input, result)?; + if !self.version_is_at_least_0_5_0 { + let result = self + .parse_token_with_trivia::( + input, + TokenKind::YearsKeyword, + ); + choice.consider(input, result)?; + } + if self.version_is_at_least_0_6_11 { + let result = self + .parse_token_with_trivia::( + input, + TokenKind::GweiKeyword, + ); + choice.consider(input, result)?; + } + if !self.version_is_at_least_0_7_0 { + let result = ChoiceHelper::run(input, |mut choice, input| { + let result = self + .parse_token_with_trivia::( + input, + TokenKind::FinneyKeyword, + ); + choice.consider(input, result)?; + let result = self + .parse_token_with_trivia::( + input, + TokenKind::SzaboKeyword, + ); + choice.consider(input, result)?; + choice.finish(input) + }); + choice.consider(input, result)?; + } + choice.finish(input) + }, + )))?; + } + seq.finish() + }) + .with_kind(RuleKind::HexNumberExpression) + } + #[allow(unused_assignments, unused_parens)] fn hex_string_literals_list(&self, input: &mut ParserContext) -> ParserResult { OneOrMoreHelper::run(input, |input| { @@ -2696,189 +2876,6 @@ impl Language { .with_kind(RuleKind::NewExpression) } - #[allow(unused_assignments, unused_parens)] - fn numeric_expression(&self, input: &mut ParserContext) -> ParserResult { - ChoiceHelper::run(input, |mut choice, input| { - let result = SequenceHelper::run(|mut seq| { - seq.elem(self.parse_token_with_trivia::( - input, - TokenKind::HexLiteral, - ))?; - if !self.version_is_at_least_0_5_0 { - seq.elem(OptionalHelper::transform(ChoiceHelper::run( - input, - |mut choice, input| { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::DaysKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::EtherKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::HoursKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::MinutesKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::SecondsKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::WeeksKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::WeiKeyword, - ); - choice.consider(input, result)?; - if !self.version_is_at_least_0_5_0 { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::YearsKeyword, - ); - choice.consider(input, result)?; - } - if self.version_is_at_least_0_6_11 { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::GweiKeyword, - ); - choice.consider(input, result)?; - } - if !self.version_is_at_least_0_7_0 { - let result = ChoiceHelper::run(input, |mut choice, input| { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::FinneyKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::SzaboKeyword, - ); - choice.consider(input, result)?; - choice.finish(input) - }); - choice.consider(input, result)?; - } - choice.finish(input) - }, - )))?; - } - seq.finish() - }); - choice.consider(input, result)?; - let result = SequenceHelper::run(|mut seq| { - seq.elem(self.parse_token_with_trivia::( - input, - TokenKind::DecimalLiteral, - ))?; - seq.elem(OptionalHelper::transform(ChoiceHelper::run( - input, - |mut choice, input| { - let result = self.parse_token_with_trivia::( - input, - TokenKind::DaysKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::EtherKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::HoursKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::MinutesKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::SecondsKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::WeeksKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::WeiKeyword, - ); - choice.consider(input, result)?; - if !self.version_is_at_least_0_5_0 { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::YearsKeyword, - ); - choice.consider(input, result)?; - } - if self.version_is_at_least_0_6_11 { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::GweiKeyword, - ); - choice.consider(input, result)?; - } - if !self.version_is_at_least_0_7_0 { - let result = ChoiceHelper::run(input, |mut choice, input| { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::FinneyKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::SzaboKeyword, - ); - choice.consider(input, result)?; - choice.finish(input) - }); - choice.consider(input, result)?; - } - choice.finish(input) - }, - )))?; - seq.finish() - }); - choice.consider(input, result)?; - choice.finish(input) - }) - .with_kind(RuleKind::NumericExpression) - } - #[allow(unused_assignments, unused_parens)] fn override_specifier(&self, input: &mut ParserContext) -> ParserResult { SequenceHelper::run(|mut seq| { @@ -5627,6 +5624,9 @@ impl Language { ProductionKind::ContinueStatement => Self::continue_statement.parse(self, input), ProductionKind::ContractDefinition => Self::contract_definition.parse(self, input), ProductionKind::ContractMembersList => Self::contract_members_list.parse(self, input), + ProductionKind::DecimalNumberExpression => { + Self::decimal_number_expression.parse(self, input) + } ProductionKind::DeconstructionImport => Self::deconstruction_import.parse(self, input), ProductionKind::DeconstructionImportSymbol => { Self::deconstruction_import_symbol.parse(self, input) @@ -5664,6 +5664,7 @@ impl Language { ProductionKind::FunctionTypeAttributesList => { Self::function_type_attributes_list.parse(self, input) } + ProductionKind::HexNumberExpression => Self::hex_number_expression.parse(self, input), ProductionKind::HexStringLiteralsList => { Self::hex_string_literals_list.parse(self, input) } @@ -5695,7 +5696,6 @@ impl Language { ProductionKind::NamedArgumentsList => Self::named_arguments_list.parse(self, input), ProductionKind::NamedImport => Self::named_import.parse(self, input), ProductionKind::NewExpression => Self::new_expression.parse(self, input), - ProductionKind::NumericExpression => Self::numeric_expression.parse(self, input), ProductionKind::OverrideSpecifier => Self::override_specifier.parse(self, input), ProductionKind::Parameter => Self::parameter.parse(self, input), ProductionKind::ParametersDeclaration => { diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/DecimalNumberExpression.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/DecimalNumberExpression.rs new file mode 100644 index 0000000000..47dcec6497 --- /dev/null +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/DecimalNumberExpression.rs @@ -0,0 +1,59 @@ +// This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +use crate::cst_output::runner::run; +use anyhow::Result; + +#[test] +fn days_unit() -> Result<()> { + return run("DecimalNumberExpression", "days_unit"); +} + +#[test] +fn decimal_no_unit() -> Result<()> { + return run("DecimalNumberExpression", "decimal_no_unit"); +} + +#[test] +fn decimal_trailing_ident_start() -> Result<()> { + return run("DecimalNumberExpression", "decimal_trailing_ident_start"); +} + +#[test] +fn ether_unit() -> Result<()> { + return run("DecimalNumberExpression", "ether_unit"); +} + +#[test] +fn float() -> Result<()> { + return run("DecimalNumberExpression", "float"); +} + +#[test] +fn float_no_fraction() -> Result<()> { + return run("DecimalNumberExpression", "float_no_fraction"); +} + +#[test] +fn float_no_mantissa() -> Result<()> { + return run("DecimalNumberExpression", "float_no_mantissa"); +} + +#[test] +fn integer() -> Result<()> { + return run("DecimalNumberExpression", "integer"); +} + +#[test] +fn integer_with_exponent() -> Result<()> { + return run("DecimalNumberExpression", "integer_with_exponent"); +} + +#[test] +fn integer_with_separators() -> Result<()> { + return run("DecimalNumberExpression", "integer_with_separators"); +} + +#[test] +fn years_unit() -> Result<()> { + return run("DecimalNumberExpression", "years_unit"); +} diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/HexNumberExpression.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/HexNumberExpression.rs new file mode 100644 index 0000000000..4d1ac29293 --- /dev/null +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/HexNumberExpression.rs @@ -0,0 +1,54 @@ +// This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +use crate::cst_output::runner::run; +use anyhow::Result; + +#[test] +fn hex_consecutive_underscores() -> Result<()> { + return run("HexNumberExpression", "hex_consecutive_underscores"); +} + +#[test] +fn hex_leading_underscore() -> Result<()> { + return run("HexNumberExpression", "hex_leading_underscore"); +} + +#[test] +fn hex_multiple_digits() -> Result<()> { + return run("HexNumberExpression", "hex_multiple_digits"); +} + +#[test] +fn hex_no_digits() -> Result<()> { + return run("HexNumberExpression", "hex_no_digits"); +} + +#[test] +fn hex_no_unit() -> Result<()> { + return run("HexNumberExpression", "hex_no_unit"); +} + +#[test] +fn hex_trailing_ident_start() -> Result<()> { + return run("HexNumberExpression", "hex_trailing_ident_start"); +} + +#[test] +fn hex_trailing_underscore() -> Result<()> { + return run("HexNumberExpression", "hex_trailing_underscore"); +} + +#[test] +fn hex_unit() -> Result<()> { + return run("HexNumberExpression", "hex_unit"); +} + +#[test] +fn hex_uppercase_prefix() -> Result<()> { + return run("HexNumberExpression", "hex_uppercase_prefix"); +} + +#[test] +fn hex_with_underscores() -> Result<()> { + return run("HexNumberExpression", "hex_with_underscores"); +} diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/NumericExpression.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/NumericExpression.rs deleted file mode 100644 index b135afdd74..0000000000 --- a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/NumericExpression.rs +++ /dev/null @@ -1,109 +0,0 @@ -// This file is generated automatically by infrastructure scripts. Please don't edit by hand. - -use crate::cst_output::runner::run; -use anyhow::Result; - -#[test] -fn days_unit() -> Result<()> { - return run("NumericExpression", "days_unit"); -} - -#[test] -fn decimal_no_unit() -> Result<()> { - return run("NumericExpression", "decimal_no_unit"); -} - -#[test] -fn decimal_trailing_ident_start() -> Result<()> { - return run("NumericExpression", "decimal_trailing_ident_start"); -} - -#[test] -fn ether_unit() -> Result<()> { - return run("NumericExpression", "ether_unit"); -} - -#[test] -fn float() -> Result<()> { - return run("NumericExpression", "float"); -} - -#[test] -fn float_no_fraction() -> Result<()> { - return run("NumericExpression", "float_no_fraction"); -} - -#[test] -fn float_no_mantissa() -> Result<()> { - return run("NumericExpression", "float_no_mantissa"); -} - -#[test] -fn hex_consecutive_underscores() -> Result<()> { - return run("NumericExpression", "hex_consecutive_underscores"); -} - -#[test] -fn hex_leading_underscore() -> Result<()> { - return run("NumericExpression", "hex_leading_underscore"); -} - -#[test] -fn hex_multiple_digits() -> Result<()> { - return run("NumericExpression", "hex_multiple_digits"); -} - -#[test] -fn hex_no_digits() -> Result<()> { - return run("NumericExpression", "hex_no_digits"); -} - -#[test] -fn hex_no_unit() -> Result<()> { - return run("NumericExpression", "hex_no_unit"); -} - -#[test] -fn hex_trailing_ident_start() -> Result<()> { - return run("NumericExpression", "hex_trailing_ident_start"); -} - -#[test] -fn hex_trailing_underscore() -> Result<()> { - return run("NumericExpression", "hex_trailing_underscore"); -} - -#[test] -fn hex_unit() -> Result<()> { - return run("NumericExpression", "hex_unit"); -} - -#[test] -fn hex_uppercase_prefix() -> Result<()> { - return run("NumericExpression", "hex_uppercase_prefix"); -} - -#[test] -fn hex_with_underscores() -> Result<()> { - return run("NumericExpression", "hex_with_underscores"); -} - -#[test] -fn integer() -> Result<()> { - return run("NumericExpression", "integer"); -} - -#[test] -fn integer_with_exponent() -> Result<()> { - return run("NumericExpression", "integer_with_exponent"); -} - -#[test] -fn integer_with_separators() -> Result<()> { - return run("NumericExpression", "integer_with_separators"); -} - -#[test] -fn years_unit() -> Result<()> { - return run("NumericExpression", "years_unit"); -} diff --git a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/mod.rs b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/mod.rs index 3b2f1fdb12..67e75af389 100644 --- a/crates/solidity/outputs/cargo/tests/src/cst_output/generated/mod.rs +++ b/crates/solidity/outputs/cargo/tests/src/cst_output/generated/mod.rs @@ -16,6 +16,8 @@ mod ContractDefinition; #[allow(non_snake_case)] mod ContractMembersList; #[allow(non_snake_case)] +mod DecimalNumberExpression; +#[allow(non_snake_case)] mod DeleteStatement; #[allow(non_snake_case)] mod EnumDefinition; @@ -30,6 +32,8 @@ mod FallbackFunctionDefinition; #[allow(non_snake_case)] mod FunctionDefinition; #[allow(non_snake_case)] +mod HexNumberExpression; +#[allow(non_snake_case)] mod HexStringLiteralsList; #[allow(non_snake_case)] mod ImportDirective; @@ -40,8 +44,6 @@ mod MappingType; #[allow(non_snake_case)] mod NewExpression; #[allow(non_snake_case)] -mod NumericExpression; -#[allow(non_snake_case)] mod PragmaDirective; #[allow(non_snake_case)] mod ReceiveFunctionDefinition; diff --git a/crates/solidity/outputs/npm/crate/src/generated/kinds.rs b/crates/solidity/outputs/npm/crate/src/generated/kinds.rs index 2907502d19..f4a1554b89 100644 --- a/crates/solidity/outputs/npm/crate/src/generated/kinds.rs +++ b/crates/solidity/outputs/npm/crate/src/generated/kinds.rs @@ -36,6 +36,7 @@ pub enum ProductionKind { ContinueStatement, ContractDefinition, ContractMembersList, + DecimalNumberExpression, DeconstructionImport, DeconstructionImportSymbol, DeconstructionImportSymbolsList, @@ -61,6 +62,7 @@ pub enum ProductionKind { FunctionDefinition, FunctionType, FunctionTypeAttributesList, + HexNumberExpression, HexStringLiteralsList, IdentifierPath, IdentifierPathsList, @@ -86,7 +88,6 @@ pub enum ProductionKind { NamedArgumentsList, NamedImport, NewExpression, - NumericExpression, OverrideSpecifier, Parameter, ParametersDeclaration, @@ -194,6 +195,7 @@ pub enum RuleKind { ContinueStatement, ContractDefinition, ContractMembersList, + DecimalNumberExpression, DeconstructionImport, DeconstructionImportSymbol, DeconstructionImportSymbolsList, @@ -220,6 +222,7 @@ pub enum RuleKind { FunctionDefinition, FunctionType, FunctionTypeAttributesList, + HexNumberExpression, HexStringLiteralsList, IdentifierPath, IdentifierPathsList, @@ -247,7 +250,6 @@ pub enum RuleKind { NamedArgumentsList, NamedImport, NewExpression, - NumericExpression, OverrideSpecifier, Parameter, ParametersDeclaration, diff --git a/crates/solidity/outputs/npm/crate/src/generated/language.rs b/crates/solidity/outputs/npm/crate/src/generated/language.rs index 5068f4002e..9eb2ad9575 100644 --- a/crates/solidity/outputs/npm/crate/src/generated/language.rs +++ b/crates/solidity/outputs/npm/crate/src/generated/language.rs @@ -673,6 +673,91 @@ impl Language { .with_kind(RuleKind::ContractMembersList) } + #[allow(unused_assignments, unused_parens)] + fn decimal_number_expression(&self, input: &mut ParserContext) -> ParserResult { + SequenceHelper::run(|mut seq| { + seq.elem(self.parse_token_with_trivia::( + input, + TokenKind::DecimalLiteral, + ))?; + seq.elem(OptionalHelper::transform(ChoiceHelper::run( + input, + |mut choice, input| { + let result = self.parse_token_with_trivia::( + input, + TokenKind::DaysKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::EtherKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::HoursKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::MinutesKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::SecondsKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::WeeksKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::WeiKeyword, + ); + choice.consider(input, result)?; + if !self.version_is_at_least_0_5_0 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::YearsKeyword, + ); + choice.consider(input, result)?; + } + if self.version_is_at_least_0_6_11 { + let result = self.parse_token_with_trivia::( + input, + TokenKind::GweiKeyword, + ); + choice.consider(input, result)?; + } + if !self.version_is_at_least_0_7_0 { + let result = ChoiceHelper::run(input, |mut choice, input| { + let result = self + .parse_token_with_trivia::( + input, + TokenKind::FinneyKeyword, + ); + choice.consider(input, result)?; + let result = self + .parse_token_with_trivia::( + input, + TokenKind::SzaboKeyword, + ); + choice.consider(input, result)?; + choice.finish(input) + }); + choice.consider(input, result)?; + } + choice.finish(input) + }, + )))?; + seq.finish() + }) + .with_kind(RuleKind::DecimalNumberExpression) + } + #[allow(unused_assignments, unused_parens)] fn deconstruction_import(&self, input: &mut ParserContext) -> ParserResult { SequenceHelper::run(|mut seq| { @@ -1531,7 +1616,13 @@ impl Language { choice.finish(input) }); choice.consider(input, result)?; - let result = self.numeric_expression(input); + let result = ChoiceHelper::run(input, |mut choice, input| { + let result = self.decimal_number_expression(input); + choice.consider(input, result)?; + let result = self.hex_number_expression(input); + choice.consider(input, result)?; + choice.finish(input) + }); choice.consider(input, result)?; let result = ChoiceHelper::run(input, |mut choice, input| { let result = self.hex_string_literals_list(input); @@ -2041,6 +2132,95 @@ impl Language { .with_kind(RuleKind::FunctionTypeAttributesList) } + #[allow(unused_assignments, unused_parens)] + fn hex_number_expression(&self, input: &mut ParserContext) -> ParserResult { + SequenceHelper::run(|mut seq| { + seq.elem(self.parse_token_with_trivia::( + input, + TokenKind::HexLiteral, + ))?; + if !self.version_is_at_least_0_5_0 { + seq.elem(OptionalHelper::transform(ChoiceHelper::run( + input, + |mut choice, input| { + let result = self.parse_token_with_trivia::( + input, + TokenKind::DaysKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::EtherKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::HoursKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::MinutesKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::SecondsKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::WeeksKeyword, + ); + choice.consider(input, result)?; + let result = self.parse_token_with_trivia::( + input, + TokenKind::WeiKeyword, + ); + choice.consider(input, result)?; + if !self.version_is_at_least_0_5_0 { + let result = self + .parse_token_with_trivia::( + input, + TokenKind::YearsKeyword, + ); + choice.consider(input, result)?; + } + if self.version_is_at_least_0_6_11 { + let result = self + .parse_token_with_trivia::( + input, + TokenKind::GweiKeyword, + ); + choice.consider(input, result)?; + } + if !self.version_is_at_least_0_7_0 { + let result = ChoiceHelper::run(input, |mut choice, input| { + let result = self + .parse_token_with_trivia::( + input, + TokenKind::FinneyKeyword, + ); + choice.consider(input, result)?; + let result = self + .parse_token_with_trivia::( + input, + TokenKind::SzaboKeyword, + ); + choice.consider(input, result)?; + choice.finish(input) + }); + choice.consider(input, result)?; + } + choice.finish(input) + }, + )))?; + } + seq.finish() + }) + .with_kind(RuleKind::HexNumberExpression) + } + #[allow(unused_assignments, unused_parens)] fn hex_string_literals_list(&self, input: &mut ParserContext) -> ParserResult { OneOrMoreHelper::run(input, |input| { @@ -2696,189 +2876,6 @@ impl Language { .with_kind(RuleKind::NewExpression) } - #[allow(unused_assignments, unused_parens)] - fn numeric_expression(&self, input: &mut ParserContext) -> ParserResult { - ChoiceHelper::run(input, |mut choice, input| { - let result = SequenceHelper::run(|mut seq| { - seq.elem(self.parse_token_with_trivia::( - input, - TokenKind::HexLiteral, - ))?; - if !self.version_is_at_least_0_5_0 { - seq.elem(OptionalHelper::transform(ChoiceHelper::run( - input, - |mut choice, input| { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::DaysKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::EtherKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::HoursKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::MinutesKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::SecondsKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::WeeksKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::WeiKeyword, - ); - choice.consider(input, result)?; - if !self.version_is_at_least_0_5_0 { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::YearsKeyword, - ); - choice.consider(input, result)?; - } - if self.version_is_at_least_0_6_11 { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::GweiKeyword, - ); - choice.consider(input, result)?; - } - if !self.version_is_at_least_0_7_0 { - let result = ChoiceHelper::run(input, |mut choice, input| { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::FinneyKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::SzaboKeyword, - ); - choice.consider(input, result)?; - choice.finish(input) - }); - choice.consider(input, result)?; - } - choice.finish(input) - }, - )))?; - } - seq.finish() - }); - choice.consider(input, result)?; - let result = SequenceHelper::run(|mut seq| { - seq.elem(self.parse_token_with_trivia::( - input, - TokenKind::DecimalLiteral, - ))?; - seq.elem(OptionalHelper::transform(ChoiceHelper::run( - input, - |mut choice, input| { - let result = self.parse_token_with_trivia::( - input, - TokenKind::DaysKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::EtherKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::HoursKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::MinutesKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::SecondsKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::WeeksKeyword, - ); - choice.consider(input, result)?; - let result = self.parse_token_with_trivia::( - input, - TokenKind::WeiKeyword, - ); - choice.consider(input, result)?; - if !self.version_is_at_least_0_5_0 { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::YearsKeyword, - ); - choice.consider(input, result)?; - } - if self.version_is_at_least_0_6_11 { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::GweiKeyword, - ); - choice.consider(input, result)?; - } - if !self.version_is_at_least_0_7_0 { - let result = ChoiceHelper::run(input, |mut choice, input| { - let result = self - .parse_token_with_trivia::( - input, - TokenKind::FinneyKeyword, - ); - choice.consider(input, result)?; - let result = self - .parse_token_with_trivia::( - input, - TokenKind::SzaboKeyword, - ); - choice.consider(input, result)?; - choice.finish(input) - }); - choice.consider(input, result)?; - } - choice.finish(input) - }, - )))?; - seq.finish() - }); - choice.consider(input, result)?; - choice.finish(input) - }) - .with_kind(RuleKind::NumericExpression) - } - #[allow(unused_assignments, unused_parens)] fn override_specifier(&self, input: &mut ParserContext) -> ParserResult { SequenceHelper::run(|mut seq| { @@ -5627,6 +5624,9 @@ impl Language { ProductionKind::ContinueStatement => Self::continue_statement.parse(self, input), ProductionKind::ContractDefinition => Self::contract_definition.parse(self, input), ProductionKind::ContractMembersList => Self::contract_members_list.parse(self, input), + ProductionKind::DecimalNumberExpression => { + Self::decimal_number_expression.parse(self, input) + } ProductionKind::DeconstructionImport => Self::deconstruction_import.parse(self, input), ProductionKind::DeconstructionImportSymbol => { Self::deconstruction_import_symbol.parse(self, input) @@ -5664,6 +5664,7 @@ impl Language { ProductionKind::FunctionTypeAttributesList => { Self::function_type_attributes_list.parse(self, input) } + ProductionKind::HexNumberExpression => Self::hex_number_expression.parse(self, input), ProductionKind::HexStringLiteralsList => { Self::hex_string_literals_list.parse(self, input) } @@ -5695,7 +5696,6 @@ impl Language { ProductionKind::NamedArgumentsList => Self::named_arguments_list.parse(self, input), ProductionKind::NamedImport => Self::named_import.parse(self, input), ProductionKind::NewExpression => Self::new_expression.parse(self, input), - ProductionKind::NumericExpression => Self::numeric_expression.parse(self, input), ProductionKind::OverrideSpecifier => Self::override_specifier.parse(self, input), ProductionKind::Parameter => Self::parameter.parse(self, input), ProductionKind::ParametersDeclaration => { diff --git a/crates/solidity/outputs/npm/package/src/generated/index.d.ts b/crates/solidity/outputs/npm/package/src/generated/index.d.ts index 614b4bad76..553c9c63b0 100644 --- a/crates/solidity/outputs/npm/package/src/generated/index.d.ts +++ b/crates/solidity/outputs/npm/package/src/generated/index.d.ts @@ -31,6 +31,7 @@ export namespace kinds { ContinueStatement = "ContinueStatement", ContractDefinition = "ContractDefinition", ContractMembersList = "ContractMembersList", + DecimalNumberExpression = "DecimalNumberExpression", DeconstructionImport = "DeconstructionImport", DeconstructionImportSymbol = "DeconstructionImportSymbol", DeconstructionImportSymbolsList = "DeconstructionImportSymbolsList", @@ -56,6 +57,7 @@ export namespace kinds { FunctionDefinition = "FunctionDefinition", FunctionType = "FunctionType", FunctionTypeAttributesList = "FunctionTypeAttributesList", + HexNumberExpression = "HexNumberExpression", HexStringLiteralsList = "HexStringLiteralsList", IdentifierPath = "IdentifierPath", IdentifierPathsList = "IdentifierPathsList", @@ -81,7 +83,6 @@ export namespace kinds { NamedArgumentsList = "NamedArgumentsList", NamedImport = "NamedImport", NewExpression = "NewExpression", - NumericExpression = "NumericExpression", OverrideSpecifier = "OverrideSpecifier", Parameter = "Parameter", ParametersDeclaration = "ParametersDeclaration", @@ -175,6 +176,7 @@ export namespace kinds { ContinueStatement = "ContinueStatement", ContractDefinition = "ContractDefinition", ContractMembersList = "ContractMembersList", + DecimalNumberExpression = "DecimalNumberExpression", DeconstructionImport = "DeconstructionImport", DeconstructionImportSymbol = "DeconstructionImportSymbol", DeconstructionImportSymbolsList = "DeconstructionImportSymbolsList", @@ -201,6 +203,7 @@ export namespace kinds { FunctionDefinition = "FunctionDefinition", FunctionType = "FunctionType", FunctionTypeAttributesList = "FunctionTypeAttributesList", + HexNumberExpression = "HexNumberExpression", HexStringLiteralsList = "HexStringLiteralsList", IdentifierPath = "IdentifierPath", IdentifierPathsList = "IdentifierPathsList", @@ -228,7 +231,6 @@ export namespace kinds { NamedArgumentsList = "NamedArgumentsList", NamedImport = "NamedImport", NewExpression = "NewExpression", - NumericExpression = "NumericExpression", OverrideSpecifier = "OverrideSpecifier", Parameter = "Parameter", ParametersDeclaration = "ParametersDeclaration", diff --git a/crates/solidity/outputs/npm/tests/src/tests/cst-cursor.ts b/crates/solidity/outputs/npm/tests/src/tests/cst-cursor.ts index 428982db3f..bc16516c96 100644 --- a/crates/solidity/outputs/npm/tests/src/tests/cst-cursor.ts +++ b/crates/solidity/outputs/npm/tests/src/tests/cst-cursor.ts @@ -61,7 +61,7 @@ test("use cursor", () => { expectRule(cursor.node(), RuleKind.Expression); expect(cursor.goToNext()).toBe(true); - expectRule(cursor.node(), RuleKind.NumericExpression); + expectRule(cursor.node(), RuleKind.DecimalNumberExpression); expect(cursor.goToNext()).toBe(true); expectRule(cursor.node(), RuleKind.LeadingTrivia); @@ -85,7 +85,7 @@ test("use cursor", () => { expectRule(cursor.node(), RuleKind.Expression); expect(cursor.goToNext()).toBe(true); - expectRule(cursor.node(), RuleKind.NumericExpression); + expectRule(cursor.node(), RuleKind.DecimalNumberExpression); expect(cursor.goToNext()).toBe(true); expectRule(cursor.node(), RuleKind.LeadingTrivia); diff --git a/crates/solidity/outputs/npm/tests/src/tests/cst-output.ts b/crates/solidity/outputs/npm/tests/src/tests/cst-output.ts index cdf80af8d9..d367ea393b 100644 --- a/crates/solidity/outputs/npm/tests/src/tests/cst-output.ts +++ b/crates/solidity/outputs/npm/tests/src/tests/cst-output.ts @@ -6,8 +6,8 @@ test("parse token", () => { const source = "5_286_981"; const language = new Language("0.8.1"); - const parseTree = language.parse(ProductionKind.NumericExpression, source).tree(); - expectRule(parseTree, RuleKind.NumericExpression); + const parseTree = language.parse(ProductionKind.DecimalNumberExpression, source).tree(); + expectRule(parseTree, RuleKind.DecimalNumberExpression); const children = parseTree.children(); expect(children).toHaveLength(1); diff --git a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/03-primary-expressions/primary-expression/0.4.11.md b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/03-primary-expressions/primary-expression/0.4.11.md index 832f50ae44..d2f9530887 100644 --- a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/03-primary-expressions/primary-expression/0.4.11.md +++ b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/03-primary-expressions/primary-expression/0.4.11.md @@ -5,7 +5,7 @@ | TupleExpression | ArrayExpression | «BooleanExpression» - | NumericExpression + | «NumericExpression» | «StringExpression» | «ElementaryType» | IDENTIFIER; diff --git a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/03-primary-expressions/primary-expression/0.5.3.md b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/03-primary-expressions/primary-expression/0.5.3.md index 0ab87460f4..5474ec54eb 100644 --- a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/03-primary-expressions/primary-expression/0.5.3.md +++ b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/03-primary-expressions/primary-expression/0.5.3.md @@ -6,7 +6,7 @@ | TypeExpression | ArrayExpression | «BooleanExpression» - | NumericExpression + | «NumericExpression» | «StringExpression» | «ElementaryType» | IDENTIFIER; diff --git a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md new file mode 100644 index 0000000000..77ab9f1bdf --- /dev/null +++ b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md @@ -0,0 +1,5 @@ + + +```{ .ebnf .slang-ebnf #DecimalNumberExpression } +DecimalNumberExpression = DECIMAL_LITERAL «NumberUnit»?; +``` diff --git a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.4.11.md b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.4.11.md new file mode 100644 index 0000000000..288b8ecb93 --- /dev/null +++ b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.4.11.md @@ -0,0 +1,5 @@ + + +```{ .ebnf .slang-ebnf #HexNumberExpression } +HexNumberExpression = HEX_LITERAL «NumberUnit»?; +``` diff --git a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md new file mode 100644 index 0000000000..52bb365cad --- /dev/null +++ b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md @@ -0,0 +1,5 @@ + + +```{ .ebnf .slang-ebnf #HexNumberExpression } +HexNumberExpression = HEX_LITERAL; +``` diff --git a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md deleted file mode 100644 index 85b4bc4409..0000000000 --- a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md +++ /dev/null @@ -1,5 +0,0 @@ - - -```{ .ebnf .slang-ebnf #NumericExpression } -NumericExpression = HEX_LITERAL | (DECIMAL_LITERAL «NumberUnit»?); -``` diff --git a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.4.11.md b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md similarity index 67% rename from crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.4.11.md rename to crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md index 351727f59a..87c0bed158 100644 --- a/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.4.11.md +++ b/crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md @@ -1,5 +1,5 @@ ```{ .ebnf .slang-ebnf #NumericExpression } -NumericExpression = (HEX_LITERAL | DECIMAL_LITERAL) «NumberUnit»?; +«NumericExpression» = DecimalNumberExpression | HexNumberExpression; ``` diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.11/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.11/index.md index 1422761512..31a44818f1 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.11/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.11/index.md @@ -337,7 +337,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.4.11.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.21/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.21/index.md index c669fb264a..e199ef1090 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.21/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.21/index.md @@ -339,7 +339,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.4.11.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.22/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.22/index.md index 4e06d60864..e517ed3071 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.4.22/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.4.22/index.md @@ -343,7 +343,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.4.11.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.4.11.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.5.0/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.5.0/index.md index 24ec8336b5..11152b19aa 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.5.0/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.5.0/index.md @@ -337,7 +337,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.5.3/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.5.3/index.md index 8731178f54..4d32d5017f 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.5.3/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.5.3/index.md @@ -339,7 +339,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.0/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.0/index.md index 48b41e4a09..1ca224e4e8 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.0/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.0/index.md @@ -354,7 +354,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.11/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.11/index.md index 3fcccc56bc..851dae3af3 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.11/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.11/index.md @@ -357,7 +357,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.2/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.2/index.md index d75232ced0..e7fea06a2e 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.2/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.2/index.md @@ -355,7 +355,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.5/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.5/index.md index bba2cd6ad3..2210641a08 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.6.5/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.6.5/index.md @@ -356,7 +356,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.0/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.0/index.md index a02ec4d70e..415acc04b4 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.0/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.0/index.md @@ -355,7 +355,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.1/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.1/index.md index 70dff7e73b..161de79b3e 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.1/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.1/index.md @@ -355,7 +355,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.4/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.4/index.md index a2e0398701..2ba2829a2b 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.7.4/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.7.4/index.md @@ -359,7 +359,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.0/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.0/index.md index 5988e2eeea..8391e605be 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.0/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.0/index.md @@ -360,7 +360,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.13/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.13/index.md index 7fe95d83e1..7f0001a72d 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.13/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.13/index.md @@ -377,7 +377,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.18/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.18/index.md index 2f1ad73860..97cac6b3e1 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.18/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.18/index.md @@ -377,7 +377,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.19/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.19/index.md index c0894ad45a..baa8c95f59 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.19/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.19/index.md @@ -378,7 +378,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.22/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.22/index.md index cffd967a11..b1852070e3 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.22/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.22/index.md @@ -378,7 +378,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.4/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.4/index.md index b78de2587a..1742d0d986 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.4/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.4/index.md @@ -369,7 +369,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.8/index.md b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.8/index.md index b7bbc10032..b88ff801d6 100644 --- a/crates/solidity/outputs/spec/generated/public/grammar/v0.8.8/index.md +++ b/crates/solidity/outputs/spec/generated/public/grammar/v0.8.8/index.md @@ -373,7 +373,9 @@ ### 5.4. Numbers ---8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/0.5.0.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/numeric-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-number-expression/unversioned.md" +--8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-number-expression/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/hex-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-literal/0.5.0.md" --8<-- "crates/solidity/outputs/spec/generated/ebnf/05-expressions/04-numbers/decimal-digits/unversioned.md" diff --git a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.8.0-success.yml b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.8.0-success.yml index 4779b7c45a..6aca689492 100644 --- a/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.8.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/Block/unchecked/generated/0.8.0-success.yml @@ -23,7 +23,7 @@ Tree: - Identifier (Token): "x" # 14..15 - Equal (Token): "=" # 16..17 - Expression (Rule): # 17..19 " 1" - - NumericExpression (Rule): # 17..19 " 1" + - DecimalNumberExpression (Rule): # 17..19 " 1" - DecimalLiteral (Token): "1" # 18..19 - Semicolon (Token): ";" # 19..20 - CloseBrace (Token): "}" # 21..22 diff --git a/crates/solidity/testing/snapshots/cst_output/ConstantDefinition/int/generated/0.7.4-success.yml b/crates/solidity/testing/snapshots/cst_output/ConstantDefinition/int/generated/0.7.4-success.yml index c69014cca6..03f221574b 100644 --- a/crates/solidity/testing/snapshots/cst_output/ConstantDefinition/int/generated/0.7.4-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ConstantDefinition/int/generated/0.7.4-success.yml @@ -13,6 +13,6 @@ Tree: - Identifier (Token): "foo" # 13..16 - Equal (Token): "=" # 17..18 - Expression (Rule): # 18..20 " 0" - - NumericExpression (Rule): # 18..20 " 0" + - DecimalNumberExpression (Rule): # 18..20 " 0" - DecimalLiteral (Token): "0" # 19..20 - Semicolon (Token): ";" # 20..21 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 c52bf5eaa5..4fa244002f 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 @@ -23,11 +23,11 @@ Tree: - OpenParen (Token): "(" # 27..28 - PositionalArgumentsList (Rule): # 28..32 "1, 2" - Expression (Rule): # 28..29 "1" - - NumericExpression (Rule): # 28..29 "1" + - DecimalNumberExpression (Rule): # 28..29 "1" - DecimalLiteral (Token): "1" # 28..29 - Comma (Token): "," # 29..30 - Expression (Rule): # 30..32 " 2" - - NumericExpression (Rule): # 30..32 " 2" + - DecimalNumberExpression (Rule): # 30..32 " 2" - DecimalLiteral (Token): "2" # 31..32 - CloseParen (Token): ")" # 32..33 - Comma (Token): "," # 33..34 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 d74dd4d743..60dfc6ef3f 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 @@ -37,7 +37,7 @@ Tree: - ReturnStatement (Rule): # 52..66 " return 1;\n" - ReturnKeyword (Token): "return" # 56..62 - Expression (Rule): # 62..64 " 1" - - NumericExpression (Rule): # 62..64 " 1" + - DecimalNumberExpression (Rule): # 62..64 " 1" - DecimalLiteral (Token): "1" # 63..64 - Semicolon (Token): ";" # 64..65 - CloseBrace (Token): "}" # 68..69 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 853d48d94a..aa3a1c972f 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 @@ -82,7 +82,7 @@ Tree: - Identifier (Token): "a" # 124..125 - Equal (Token): "=" # 126..127 - Expression (Rule): # 127..129 " 1" - - NumericExpression (Rule): # 127..129 " 1" + - DecimalNumberExpression (Rule): # 127..129 " 1" - DecimalLiteral (Token): "1" # 128..129 - Semicolon (Token): ";" # 129..130 - CloseBrace (Token): "}" # 133..134 @@ -104,7 +104,7 @@ Tree: - Identifier (Token): "x" # 167..168 - Equal (Token): "=" # 169..170 - Expression (Rule): # 170..172 " 0" - - NumericExpression (Rule): # 170..172 " 0" + - DecimalNumberExpression (Rule): # 170..172 " 0" - DecimalLiteral (Token): "0" # 171..172 - Semicolon (Token): ";" # 172..173 - Statement (Rule): # 174..186 "\t\tunchecked " 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 663699031f..d3cd50fd19 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 @@ -82,7 +82,7 @@ Tree: - Identifier (Token): "a" # 124..125 - Equal (Token): "=" # 126..127 - Expression (Rule): # 127..129 " 1" - - NumericExpression (Rule): # 127..129 " 1" + - DecimalNumberExpression (Rule): # 127..129 " 1" - DecimalLiteral (Token): "1" # 128..129 - Semicolon (Token): ";" # 129..130 - CloseBrace (Token): "}" # 133..134 @@ -104,7 +104,7 @@ Tree: - Identifier (Token): "x" # 167..168 - Equal (Token): "=" # 169..170 - Expression (Rule): # 170..172 " 0" - - NumericExpression (Rule): # 170..172 " 0" + - DecimalNumberExpression (Rule): # 170..172 " 0" - DecimalLiteral (Token): "0" # 171..172 - Semicolon (Token): ";" # 172..173 - SKIPPED (Token): "unchecked { invalid sequence }\n\t" # 176..208 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 cff00c3411..c6e57449a1 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 @@ -82,7 +82,7 @@ Tree: - Identifier (Token): "a" # 124..125 - Equal (Token): "=" # 126..127 - Expression (Rule): # 127..129 " 1" - - NumericExpression (Rule): # 127..129 " 1" + - DecimalNumberExpression (Rule): # 127..129 " 1" - DecimalLiteral (Token): "1" # 128..129 - Semicolon (Token): ";" # 129..130 - CloseBrace (Token): "}" # 133..134 @@ -104,7 +104,7 @@ Tree: - Identifier (Token): "x" # 167..168 - Equal (Token): "=" # 169..170 - Expression (Rule): # 170..172 " 0" - - NumericExpression (Rule): # 170..172 " 0" + - DecimalNumberExpression (Rule): # 170..172 " 0" - DecimalLiteral (Token): "0" # 171..172 - Semicolon (Token): ";" # 172..173 - SKIPPED (Token): "unchecked { invalid sequence }\n\t" # 176..208 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 9456b4101e..f14fc5379e 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 @@ -82,7 +82,7 @@ Tree: - Identifier (Token): "a" # 124..125 - Equal (Token): "=" # 126..127 - Expression (Rule): # 127..129 " 1" - - NumericExpression (Rule): # 127..129 " 1" + - DecimalNumberExpression (Rule): # 127..129 " 1" - DecimalLiteral (Token): "1" # 128..129 - Semicolon (Token): ";" # 129..130 - CloseBrace (Token): "}" # 133..134 @@ -104,7 +104,7 @@ Tree: - Identifier (Token): "x" # 167..168 - Equal (Token): "=" # 169..170 - Expression (Rule): # 170..172 " 0" - - NumericExpression (Rule): # 170..172 " 0" + - DecimalNumberExpression (Rule): # 170..172 " 0" - DecimalLiteral (Token): "0" # 171..172 - Semicolon (Token): ";" # 172..173 - SKIPPED (Token): "unchecked { invalid sequence }\n\t" # 176..208 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 9d164e462c..26a41f478f 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 @@ -82,7 +82,7 @@ Tree: - Identifier (Token): "a" # 124..125 - Equal (Token): "=" # 126..127 - Expression (Rule): # 127..129 " 1" - - NumericExpression (Rule): # 127..129 " 1" + - DecimalNumberExpression (Rule): # 127..129 " 1" - DecimalLiteral (Token): "1" # 128..129 - Semicolon (Token): ";" # 129..130 - CloseBrace (Token): "}" # 133..134 @@ -104,7 +104,7 @@ Tree: - Identifier (Token): "x" # 167..168 - Equal (Token): "=" # 169..170 - Expression (Rule): # 170..172 " 0" - - NumericExpression (Rule): # 170..172 " 0" + - DecimalNumberExpression (Rule): # 170..172 " 0" - DecimalLiteral (Token): "0" # 171..172 - Semicolon (Token): ";" # 172..173 - SKIPPED (Token): "unchecked { invalid sequence }\n\t" # 176..208 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 3267d38264..ebb94757a7 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 @@ -81,7 +81,7 @@ Tree: - Identifier (Token): "a" # 124..125 - Equal (Token): "=" # 126..127 - Expression (Rule): # 127..129 " 1" - - NumericExpression (Rule): # 127..129 " 1" + - DecimalNumberExpression (Rule): # 127..129 " 1" - DecimalLiteral (Token): "1" # 128..129 - Semicolon (Token): ";" # 129..130 - CloseBrace (Token): "}" # 133..134 @@ -103,7 +103,7 @@ Tree: - Identifier (Token): "x" # 167..168 - Equal (Token): "=" # 169..170 - Expression (Rule): # 170..172 " 0" - - NumericExpression (Rule): # 170..172 " 0" + - DecimalNumberExpression (Rule): # 170..172 " 0" - DecimalLiteral (Token): "0" # 171..172 - Semicolon (Token): ";" # 172..173 - Statement (Rule): # 174..207 "\t\tunchecked { invalid sequence }\n" diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/local_expression/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/local_expression/generated/0.4.11-success.yml index 1c8297871c..d21b509f0e 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/local_expression/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/local_expression/generated/0.4.11-success.yml @@ -28,17 +28,17 @@ Tree: - Expression (Rule): # 28..38 " 1 + 2 * 3" - BinaryExpression (Rule): # 28..38 " 1 + 2 * 3" - Expression (Rule): # 28..30 " 1" - - NumericExpression (Rule): # 28..30 " 1" + - DecimalNumberExpression (Rule): # 28..30 " 1" - DecimalLiteral (Token): "1" # 29..30 - Plus (Token): "+" # 31..32 - Expression (Rule): # 32..38 " 2 * 3" - BinaryExpression (Rule): # 32..38 " 2 * 3" - Expression (Rule): # 32..34 " 2" - - NumericExpression (Rule): # 32..34 " 2" + - DecimalNumberExpression (Rule): # 32..34 " 2" - DecimalLiteral (Token): "2" # 33..34 - Asterisk (Token): "*" # 35..36 - Expression (Rule): # 36..38 " 3" - - NumericExpression (Rule): # 36..38 " 3" + - DecimalNumberExpression (Rule): # 36..38 " 3" - DecimalLiteral (Token): "3" # 37..38 - Semicolon (Token): ";" # 38..39 - CloseBrace (Token): "}" # 40..41 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.4.11-failure.yml index 3e0eb63032..d14ea24157 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.4.11-failure.yml @@ -57,11 +57,11 @@ Tree: - Expression (Rule): # 58..63 "1 + 2" - BinaryExpression (Rule): # 58..63 "1 + 2" - Expression (Rule): # 58..59 "1" - - NumericExpression (Rule): # 58..59 "1" + - DecimalNumberExpression (Rule): # 58..59 "1" - DecimalLiteral (Token): "1" # 58..59 - Plus (Token): "+" # 60..61 - Expression (Rule): # 61..63 " 2" - - NumericExpression (Rule): # 61..63 " 2" + - DecimalNumberExpression (Rule): # 61..63 " 2" - DecimalLiteral (Token): "2" # 62..63 - SKIPPED (Token): ";\n " # 63..69 - CloseBrace (Token): "}" # 69..70 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.4.21-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.4.21-failure.yml index 7a9ed5c3be..6c5cf820bf 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.4.21-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.4.21-failure.yml @@ -57,11 +57,11 @@ Tree: - Expression (Rule): # 58..63 "1 + 2" - BinaryExpression (Rule): # 58..63 "1 + 2" - Expression (Rule): # 58..59 "1" - - NumericExpression (Rule): # 58..59 "1" + - DecimalNumberExpression (Rule): # 58..59 "1" - DecimalLiteral (Token): "1" # 58..59 - Plus (Token): "+" # 60..61 - Expression (Rule): # 61..63 " 2" - - NumericExpression (Rule): # 61..63 " 2" + - DecimalNumberExpression (Rule): # 61..63 " 2" - DecimalLiteral (Token): "2" # 62..63 - SKIPPED (Token): ";\n " # 63..69 - CloseBrace (Token): "}" # 69..70 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.5.0-failure.yml index 845262152f..9415860f15 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.5.0-failure.yml @@ -57,11 +57,11 @@ Tree: - Expression (Rule): # 58..63 "1 + 2" - BinaryExpression (Rule): # 58..63 "1 + 2" - Expression (Rule): # 58..59 "1" - - NumericExpression (Rule): # 58..59 "1" + - DecimalNumberExpression (Rule): # 58..59 "1" - DecimalLiteral (Token): "1" # 58..59 - Plus (Token): "+" # 60..61 - Expression (Rule): # 61..63 " 2" - - NumericExpression (Rule): # 61..63 " 2" + - DecimalNumberExpression (Rule): # 61..63 " 2" - DecimalLiteral (Token): "2" # 62..63 - SKIPPED (Token): ";\n " # 63..69 - CloseBrace (Token): "}" # 69..70 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.5.3-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.5.3-failure.yml index 315b52aec8..376268a6e5 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.5.3-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.5.3-failure.yml @@ -57,11 +57,11 @@ Tree: - Expression (Rule): # 58..63 "1 + 2" - BinaryExpression (Rule): # 58..63 "1 + 2" - Expression (Rule): # 58..59 "1" - - NumericExpression (Rule): # 58..59 "1" + - DecimalNumberExpression (Rule): # 58..59 "1" - DecimalLiteral (Token): "1" # 58..59 - Plus (Token): "+" # 60..61 - Expression (Rule): # 61..63 " 2" - - NumericExpression (Rule): # 61..63 " 2" + - DecimalNumberExpression (Rule): # 61..63 " 2" - DecimalLiteral (Token): "2" # 62..63 - SKIPPED (Token): ";\n " # 63..69 - CloseBrace (Token): "}" # 69..70 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.6.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.6.0-failure.yml index f12f9bd170..03a35f6581 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.6.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.6.0-failure.yml @@ -57,11 +57,11 @@ Tree: - Expression (Rule): # 58..63 "1 + 2" - BinaryExpression (Rule): # 58..63 "1 + 2" - Expression (Rule): # 58..59 "1" - - NumericExpression (Rule): # 58..59 "1" + - DecimalNumberExpression (Rule): # 58..59 "1" - DecimalLiteral (Token): "1" # 58..59 - Plus (Token): "+" # 60..61 - Expression (Rule): # 61..63 " 2" - - NumericExpression (Rule): # 61..63 " 2" + - DecimalNumberExpression (Rule): # 61..63 " 2" - DecimalLiteral (Token): "2" # 62..63 - SKIPPED (Token): ";\n " # 63..69 - CloseBrace (Token): "}" # 69..70 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.7.0-failure.yml index cceec63bfa..fa1723a09b 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.7.0-failure.yml @@ -57,11 +57,11 @@ Tree: - Expression (Rule): # 58..63 "1 + 2" - BinaryExpression (Rule): # 58..63 "1 + 2" - Expression (Rule): # 58..59 "1" - - NumericExpression (Rule): # 58..59 "1" + - DecimalNumberExpression (Rule): # 58..59 "1" - DecimalLiteral (Token): "1" # 58..59 - Plus (Token): "+" # 60..61 - Expression (Rule): # 61..63 " 2" - - NumericExpression (Rule): # 61..63 " 2" + - DecimalNumberExpression (Rule): # 61..63 " 2" - DecimalLiteral (Token): "2" # 62..63 - SKIPPED (Token): ";\n " # 63..69 - CloseBrace (Token): "}" # 69..70 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.8.0-failure.yml index 16467394a4..cf00a29717 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.8.0-failure.yml @@ -57,11 +57,11 @@ Tree: - Expression (Rule): # 58..63 "1 + 2" - BinaryExpression (Rule): # 58..63 "1 + 2" - Expression (Rule): # 58..59 "1" - - NumericExpression (Rule): # 58..59 "1" + - DecimalNumberExpression (Rule): # 58..59 "1" - DecimalLiteral (Token): "1" # 58..59 - Plus (Token): "+" # 60..61 - Expression (Rule): # 61..63 " 2" - - NumericExpression (Rule): # 61..63 " 2" + - DecimalNumberExpression (Rule): # 61..63 " 2" - DecimalLiteral (Token): "2" # 62..63 - SKIPPED (Token): ";\n " # 63..69 - CloseBrace (Token): "}" # 69..70 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.8.4-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.8.4-failure.yml index 7a6dc64944..da57bef2a3 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.8.4-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/mismatched_delimiter/generated/0.8.4-failure.yml @@ -57,11 +57,11 @@ Tree: - Expression (Rule): # 58..63 "1 + 2" - BinaryExpression (Rule): # 58..63 "1 + 2" - Expression (Rule): # 58..59 "1" - - NumericExpression (Rule): # 58..59 "1" + - DecimalNumberExpression (Rule): # 58..59 "1" - DecimalLiteral (Token): "1" # 58..59 - Plus (Token): "+" # 60..61 - Expression (Rule): # 61..63 " 2" - - NumericExpression (Rule): # 61..63 " 2" + - DecimalNumberExpression (Rule): # 61..63 " 2" - DecimalLiteral (Token): "2" # 62..63 - SKIPPED (Token): ";\n " # 63..69 - CloseBrace (Token): "}" # 69..70 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.6.2-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.6.2-failure.yml index e739e6c311..a8179ad39c 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.6.2-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.6.2-failure.yml @@ -203,7 +203,7 @@ Tree: - Identifier (Token): "arg" # 185..188 - Colon (Token): ":" # 188..189 - Expression (Rule): # 189..191 " 1" - - NumericExpression (Rule): # 189..191 " 1" + - DecimalNumberExpression (Rule): # 189..191 " 1" - DecimalLiteral (Token): "1" # 190..191 - Comma (Token): "," # 191..192 - NamedArgument (Rule): # 192..206 " missing_expr:" @@ -243,7 +243,7 @@ Tree: - Identifier (Token): "arg" # 248..251 - Colon (Token): ":" # 251..252 - Expression (Rule): # 252..254 " 1" - - NumericExpression (Rule): # 252..254 " 1" + - DecimalNumberExpression (Rule): # 252..254 " 1" - DecimalLiteral (Token): "1" # 253..254 - SKIPPED (Token): "unexpected tokens, not: 2, recovered, yet: 3, " # 255..301 - CloseBrace (Token): "}" # 301..302 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.7.0-failure.yml index 6dc05f3059..cdc0cb9f79 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.7.0-failure.yml @@ -203,7 +203,7 @@ Tree: - Identifier (Token): "arg" # 185..188 - Colon (Token): ":" # 188..189 - Expression (Rule): # 189..191 " 1" - - NumericExpression (Rule): # 189..191 " 1" + - DecimalNumberExpression (Rule): # 189..191 " 1" - DecimalLiteral (Token): "1" # 190..191 - Comma (Token): "," # 191..192 - NamedArgument (Rule): # 192..206 " missing_expr:" @@ -243,7 +243,7 @@ Tree: - Identifier (Token): "arg" # 248..251 - Colon (Token): ":" # 251..252 - Expression (Rule): # 252..254 " 1" - - NumericExpression (Rule): # 252..254 " 1" + - DecimalNumberExpression (Rule): # 252..254 " 1" - DecimalLiteral (Token): "1" # 253..254 - SKIPPED (Token): "unexpected tokens, not: 2, recovered, yet: 3, " # 255..301 - CloseBrace (Token): "}" # 301..302 diff --git a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.8.0-failure.yml index 564c9af893..28fe5af819 100644 --- a/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ContractMembersList/separated_recovery/generated/0.8.0-failure.yml @@ -203,7 +203,7 @@ Tree: - Identifier (Token): "arg" # 185..188 - Colon (Token): ":" # 188..189 - Expression (Rule): # 189..191 " 1" - - NumericExpression (Rule): # 189..191 " 1" + - DecimalNumberExpression (Rule): # 189..191 " 1" - DecimalLiteral (Token): "1" # 190..191 - Comma (Token): "," # 191..192 - NamedArgument (Rule): # 192..206 " missing_expr:" @@ -243,7 +243,7 @@ Tree: - Identifier (Token): "arg" # 248..251 - Colon (Token): ":" # 251..252 - Expression (Rule): # 252..254 " 1" - - NumericExpression (Rule): # 252..254 " 1" + - DecimalNumberExpression (Rule): # 252..254 " 1" - DecimalLiteral (Token): "1" # 253..254 - SKIPPED (Token): "unexpected tokens, not: 2, recovered, yet: 3, " # 255..301 - CloseBrace (Token): "}" # 301..302 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/days_unit/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/days_unit/generated/0.4.11-success.yml similarity index 85% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/days_unit/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/days_unit/generated/0.4.11-success.yml index 795f0429ab..c75cfbf2de 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/days_unit/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/days_unit/generated/0.4.11-success.yml @@ -6,6 +6,6 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..7 "10 days" + - DecimalNumberExpression (Rule): # 0..7 "10 days" - DecimalLiteral (Token): "10" # 0..2 - DaysKeyword (Token): "days" # 3..7 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/days_unit/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/days_unit/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/days_unit/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/days_unit/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_no_unit/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_no_unit/generated/0.4.11-success.yml similarity index 83% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_no_unit/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_no_unit/generated/0.4.11-success.yml index 0d4198a691..7ffdbcf0f3 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_no_unit/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_no_unit/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..9 "123456789" + - DecimalNumberExpression (Rule): # 0..9 "123456789" - DecimalLiteral (Token): "123456789" # 0..9 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_no_unit/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_no_unit/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_no_unit/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_no_unit/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_trailing_ident_start/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_trailing_ident_start/generated/0.4.11-failure.yml similarity index 69% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_trailing_ident_start/generated/0.4.11-failure.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_trailing_ident_start/generated/0.4.11-failure.yml index b3e720a613..4da8e806d2 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_trailing_ident_start/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_trailing_ident_start/generated/0.4.11-failure.yml @@ -5,8 +5,8 @@ Source: > Errors: # 1 total - > - Error: Expected DecimalLiteral or HexLiteral. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_trailing_ident_start/input.sol:1:1] + Error: Expected DecimalLiteral. + ╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_trailing_ident_start/input.sol:1:1] │ 1 │ 1a │ ─┬─ diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_trailing_ident_start/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_trailing_ident_start/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/decimal_trailing_ident_start/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/decimal_trailing_ident_start/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/ether_unit/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/ether_unit/generated/0.4.11-success.yml similarity index 85% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/ether_unit/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/ether_unit/generated/0.4.11-success.yml index af9795b507..f405d08bca 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/ether_unit/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/ether_unit/generated/0.4.11-success.yml @@ -6,6 +6,6 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..8 "10 ether" + - DecimalNumberExpression (Rule): # 0..8 "10 ether" - DecimalLiteral (Token): "10" # 0..2 - EtherKeyword (Token): "ether" # 3..8 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/ether_unit/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/ether_unit/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/ether_unit/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/ether_unit/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float/generated/0.4.11-success.yml similarity index 84% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/float/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float/generated/0.4.11-success.yml index 3c62732257..0ec1a74e80 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..3 "1.2" + - DecimalNumberExpression (Rule): # 0..3 "1.2" - DecimalLiteral (Token): "1.2" # 0..3 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/float/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/generated/0.4.11-success.yml similarity index 84% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/generated/0.4.11-success.yml index 143fb36ecc..fa46c12556 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..2 "1." + - DecimalNumberExpression (Rule): # 0..2 "1." - DecimalLiteral (Token): "1." # 0..2 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/generated/0.5.0-failure.yml similarity index 69% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/generated/0.5.0-failure.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/generated/0.5.0-failure.yml index 39bf9bced7..0992695b9d 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/generated/0.5.0-failure.yml @@ -5,8 +5,8 @@ Source: > Errors: # 1 total - > - Error: Expected DecimalLiteral or HexLiteral. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/input.sol:1:1] + Error: Expected DecimalLiteral. + ╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/input.sol:1:1] │ 1 │ 1. │ ─┬ diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_fraction/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_mantissa/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_mantissa/generated/0.4.11-success.yml similarity index 84% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_mantissa/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_mantissa/generated/0.4.11-success.yml index e75df17851..e7b796fdf6 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_mantissa/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_mantissa/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..2 ".2" + - DecimalNumberExpression (Rule): # 0..2 ".2" - DecimalLiteral (Token): ".2" # 0..2 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_mantissa/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_mantissa/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/float_no_mantissa/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_mantissa/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer/generated/0.4.11-success.yml similarity index 84% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/integer/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer/generated/0.4.11-success.yml index 3f58b6f844..c43b6eca56 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..3 "123" + - DecimalNumberExpression (Rule): # 0..3 "123" - DecimalLiteral (Token): "123" # 0..3 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/integer/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_exponent/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_exponent/generated/0.4.11-success.yml similarity index 84% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_exponent/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_exponent/generated/0.4.11-success.yml index d9489f2fbd..0b0076a6f1 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_exponent/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_exponent/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..3 "1e2" + - DecimalNumberExpression (Rule): # 0..3 "1e2" - DecimalLiteral (Token): "1e2" # 0..3 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_exponent/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_exponent/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_exponent/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_exponent/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_separators/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_separators/generated/0.4.11-success.yml similarity index 84% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_separators/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_separators/generated/0.4.11-success.yml index 240d5ff616..6b9d47a8d9 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_separators/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_separators/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..5 "1_2_3" + - DecimalNumberExpression (Rule): # 0..5 "1_2_3" - DecimalLiteral (Token): "1_2_3" # 0..5 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_separators/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_separators/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/integer_with_separators/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_with_separators/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.4.11-success.yml similarity index 84% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.4.11-success.yml index c342754daf..5268035f29 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.4.11-success.yml @@ -6,6 +6,6 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..9 "10 years\n" + - DecimalNumberExpression (Rule): # 0..9 "10 years\n" - DecimalLiteral (Token): "10" # 0..2 - YearsKeyword (Token): "years" # 3..8 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.5.0-failure.yml similarity index 79% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.5.0-failure.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.5.0-failure.yml index 9d86d1bc53..b3feba6cc9 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.5.0-failure.yml @@ -6,7 +6,7 @@ Source: > Errors: # 1 total - > Error: Expected DaysKeyword or EtherKeyword or FinneyKeyword or HoursKeyword or MinutesKeyword or SecondsKeyword or SzaboKeyword or WeeksKeyword or WeiKeyword. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/input.sol:1:3] + ╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/input.sol:1:3] │ 1 │ 10 years │ ───┬─── @@ -14,6 +14,6 @@ Errors: # 1 total ───╯ Tree: - - NumericExpression (Rule): # 0..9 "10 years\n" + - DecimalNumberExpression (Rule): # 0..9 "10 years\n" - DecimalLiteral (Token): "10" # 0..2 - SKIPPED (Token): " years\n" # 2..9 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.6.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.6.11-failure.yml similarity index 79% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.6.11-failure.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.6.11-failure.yml index e6a538ca59..8b3ea79f5c 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.6.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.6.11-failure.yml @@ -6,7 +6,7 @@ Source: > Errors: # 1 total - > Error: Expected DaysKeyword or EtherKeyword or FinneyKeyword or GweiKeyword or HoursKeyword or MinutesKeyword or SecondsKeyword or SzaboKeyword or WeeksKeyword or WeiKeyword. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/input.sol:1:3] + ╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/input.sol:1:3] │ 1 │ 10 years │ ───┬─── @@ -14,6 +14,6 @@ Errors: # 1 total ───╯ Tree: - - NumericExpression (Rule): # 0..9 "10 years\n" + - DecimalNumberExpression (Rule): # 0..9 "10 years\n" - DecimalLiteral (Token): "10" # 0..2 - SKIPPED (Token): " years\n" # 2..9 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.7.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.7.0-failure.yml similarity index 78% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.7.0-failure.yml rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.7.0-failure.yml index 564ca2e125..f652c02855 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/generated/0.7.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/generated/0.7.0-failure.yml @@ -6,7 +6,7 @@ Source: > Errors: # 1 total - > Error: Expected DaysKeyword or EtherKeyword or GweiKeyword or HoursKeyword or MinutesKeyword or SecondsKeyword or WeeksKeyword or WeiKeyword. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/input.sol:1:3] + ╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/input.sol:1:3] │ 1 │ 10 years │ ───┬─── @@ -14,6 +14,6 @@ Errors: # 1 total ───╯ Tree: - - NumericExpression (Rule): # 0..9 "10 years\n" + - DecimalNumberExpression (Rule): # 0..9 "10 years\n" - DecimalLiteral (Token): "10" # 0..2 - SKIPPED (Token): " years\n" # 2..9 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/input.sol b/crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/years_unit/input.sol rename to crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/years_unit/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/function_call/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/Expression/function_call/generated/0.4.11-success.yml index 162a2096ad..8c86bbaf8e 100644 --- a/crates/solidity/testing/snapshots/cst_output/Expression/function_call/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/Expression/function_call/generated/0.4.11-success.yml @@ -14,10 +14,10 @@ Tree: - OpenParen (Token): "(" # 1..2 - PositionalArgumentsList (Rule): # 2..6 "1, 2" - Expression (Rule): # 2..3 "1" - - NumericExpression (Rule): # 2..3 "1" + - DecimalNumberExpression (Rule): # 2..3 "1" - DecimalLiteral (Token): "1" # 2..3 - Comma (Token): "," # 3..4 - Expression (Rule): # 4..6 " 2" - - NumericExpression (Rule): # 4..6 " 2" + - DecimalNumberExpression (Rule): # 4..6 " 2" - DecimalLiteral (Token): "2" # 5..6 - CloseParen (Token): ")" # 6..7 diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/function_call_options/generated/0.6.2-success.yml b/crates/solidity/testing/snapshots/cst_output/Expression/function_call_options/generated/0.6.2-success.yml index 2cf894b710..c6366331fe 100644 --- a/crates/solidity/testing/snapshots/cst_output/Expression/function_call_options/generated/0.6.2-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/Expression/function_call_options/generated/0.6.2-success.yml @@ -22,14 +22,14 @@ Tree: - Identifier (Token): "value" # 4..9 - Colon (Token): ":" # 9..10 - Expression (Rule): # 10..12 " 0" - - NumericExpression (Rule): # 10..12 " 0" + - DecimalNumberExpression (Rule): # 10..12 " 0" - DecimalLiteral (Token): "0" # 11..12 - Comma (Token): "," # 12..13 - NamedArgument (Rule): # 13..20 " gas: 1" - Identifier (Token): "gas" # 14..17 - Colon (Token): ":" # 17..18 - Expression (Rule): # 18..20 " 1" - - NumericExpression (Rule): # 18..20 " 1" + - DecimalNumberExpression (Rule): # 18..20 " 1" - DecimalLiteral (Token): "1" # 19..20 - CloseBrace (Token): "}" # 20..21 - ArgumentsDeclaration (Rule): # 21..25 '("")' diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/function_call_options_split/generated/0.6.2-success.yml b/crates/solidity/testing/snapshots/cst_output/Expression/function_call_options_split/generated/0.6.2-success.yml index 096d9aa6b8..2d85cac3ff 100644 --- a/crates/solidity/testing/snapshots/cst_output/Expression/function_call_options_split/generated/0.6.2-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/Expression/function_call_options_split/generated/0.6.2-success.yml @@ -22,7 +22,7 @@ Tree: - Identifier (Token): "value" # 4..9 - Colon (Token): ":" # 9..10 - Expression (Rule): # 10..12 " 0" - - NumericExpression (Rule): # 10..12 " 0" + - DecimalNumberExpression (Rule): # 10..12 " 0" - DecimalLiteral (Token): "0" # 11..12 - CloseBrace (Token): "}" # 12..13 - NamedArgumentsDeclaration (Rule): # 13..21 "{gas: 1}" @@ -32,7 +32,7 @@ Tree: - Identifier (Token): "gas" # 14..17 - Colon (Token): ":" # 17..18 - Expression (Rule): # 18..20 " 1" - - NumericExpression (Rule): # 18..20 " 1" + - DecimalNumberExpression (Rule): # 18..20 " 1" - DecimalLiteral (Token): "1" # 19..20 - CloseBrace (Token): "}" # 20..21 - ArgumentsDeclaration (Rule): # 21..25 '("")' diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/incomplete_operand/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/Expression/incomplete_operand/generated/0.4.11-failure.yml index cc2c8cbe24..b8d2b4439f 100644 --- a/crates/solidity/testing/snapshots/cst_output/Expression/incomplete_operand/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Expression/incomplete_operand/generated/0.4.11-failure.yml @@ -15,7 +15,7 @@ Errors: # 1 total Tree: - Expression (Rule): # 0..8 "2 * new\n" - - NumericExpression (Rule): # 0..1 "2" + - DecimalNumberExpression (Rule): # 0..1 "2" - DecimalLiteral (Token): "2" # 0..1 - BinaryExpression (Rule): # 1..3 " *" - Asterisk (Token): "*" # 2..3 diff --git a/crates/solidity/testing/snapshots/cst_output/Expression/incomplete_operand/generated/0.8.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/Expression/incomplete_operand/generated/0.8.0-failure.yml index 867e141d8a..7dfc848e00 100644 --- a/crates/solidity/testing/snapshots/cst_output/Expression/incomplete_operand/generated/0.8.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/Expression/incomplete_operand/generated/0.8.0-failure.yml @@ -15,7 +15,7 @@ Errors: # 1 total Tree: - Expression (Rule): # 0..8 "2 * new\n" - - NumericExpression (Rule): # 0..1 "2" + - DecimalNumberExpression (Rule): # 0..1 "2" - DecimalLiteral (Token): "2" # 0..1 - BinaryExpression (Rule): # 1..3 " *" - Asterisk (Token): "*" # 2..3 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_consecutive_underscores/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_consecutive_underscores/generated/0.4.11-failure.yml similarity index 70% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_consecutive_underscores/generated/0.4.11-failure.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_consecutive_underscores/generated/0.4.11-failure.yml index af4a977196..900b4e95ec 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_consecutive_underscores/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_consecutive_underscores/generated/0.4.11-failure.yml @@ -5,8 +5,8 @@ Source: > Errors: # 1 total - > - Error: Expected DecimalLiteral or HexLiteral. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_consecutive_underscores/input.sol:1:1] + Error: Expected HexLiteral. + ╭─[crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_consecutive_underscores/input.sol:1:1] │ 1 │ 0x1__2 │ ───┬── diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_consecutive_underscores/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_consecutive_underscores/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_consecutive_underscores/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_consecutive_underscores/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_leading_underscore/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_leading_underscore/generated/0.4.11-failure.yml similarity index 70% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_leading_underscore/generated/0.4.11-failure.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_leading_underscore/generated/0.4.11-failure.yml index 99be3d841c..17bbed7418 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_leading_underscore/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_leading_underscore/generated/0.4.11-failure.yml @@ -5,8 +5,8 @@ Source: > Errors: # 1 total - > - Error: Expected DecimalLiteral or HexLiteral. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_leading_underscore/input.sol:1:1] + Error: Expected HexLiteral. + ╭─[crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_leading_underscore/input.sol:1:1] │ 1 │ 0x_1 │ ──┬─ diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_leading_underscore/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_leading_underscore/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_leading_underscore/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_leading_underscore/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_multiple_digits/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_multiple_digits/generated/0.4.11-success.yml similarity index 84% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_multiple_digits/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_multiple_digits/generated/0.4.11-success.yml index 450654f6e5..dd94e25048 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_multiple_digits/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_multiple_digits/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..7 "0x12345" + - HexNumberExpression (Rule): # 0..7 "0x12345" - HexLiteral (Token): "0x12345" # 0..7 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_multiple_digits/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_multiple_digits/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_multiple_digits/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_multiple_digits/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_digits/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_digits/generated/0.4.11-failure.yml similarity index 70% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_digits/generated/0.4.11-failure.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_digits/generated/0.4.11-failure.yml index 84a57682f0..4c31906673 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_digits/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_digits/generated/0.4.11-failure.yml @@ -5,8 +5,8 @@ Source: > Errors: # 1 total - > - Error: Expected DecimalLiteral or HexLiteral. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_digits/input.sol:1:1] + Error: Expected HexLiteral. + ╭─[crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_digits/input.sol:1:1] │ 1 │ 0x │ ─┬ diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_digits/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_digits/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_digits/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_digits/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_unit/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_unit/generated/0.4.11-success.yml similarity index 83% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_unit/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_unit/generated/0.4.11-success.yml index 57328b33dc..ac24436811 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_unit/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_unit/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..11 "0x123456789" + - HexNumberExpression (Rule): # 0..11 "0x123456789" - HexLiteral (Token): "0x123456789" # 0..11 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_unit/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_unit/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_no_unit/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_no_unit/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_ident_start/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_ident_start/generated/0.4.11-failure.yml similarity index 70% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_ident_start/generated/0.4.11-failure.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_ident_start/generated/0.4.11-failure.yml index 1201abdf12..802574127c 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_ident_start/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_ident_start/generated/0.4.11-failure.yml @@ -5,8 +5,8 @@ Source: > Errors: # 1 total - > - Error: Expected DecimalLiteral or HexLiteral. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_ident_start/input.sol:1:1] + Error: Expected HexLiteral. + ╭─[crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_ident_start/input.sol:1:1] │ 1 │ 0x1$ │ ──┬── diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_ident_start/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_ident_start/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_ident_start/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_ident_start/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_underscore/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_underscore/generated/0.4.11-failure.yml similarity index 69% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_underscore/generated/0.4.11-failure.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_underscore/generated/0.4.11-failure.yml index b5aa756597..97fa5388d0 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_underscore/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_underscore/generated/0.4.11-failure.yml @@ -5,8 +5,8 @@ Source: > Errors: # 1 total - > - Error: Expected DecimalLiteral or HexLiteral. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_underscore/input.sol:1:1] + Error: Expected HexLiteral. + ╭─[crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_underscore/input.sol:1:1] │ 1 │ 0x1_ │ ──┬─ diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_underscore/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_underscore/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_trailing_underscore/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_trailing_underscore/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/generated/0.4.11-success.yml similarity index 86% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/generated/0.4.11-success.yml index d5e74df06d..59b13b1649 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/generated/0.4.11-success.yml @@ -6,6 +6,6 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..7 "0x1 wei" + - HexNumberExpression (Rule): # 0..7 "0x1 wei" - HexLiteral (Token): "0x1" # 0..3 - WeiKeyword (Token): "wei" # 4..7 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/generated/0.5.0-failure.yml similarity index 75% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/generated/0.5.0-failure.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/generated/0.5.0-failure.yml index 2ae559a13b..5d14c589ef 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/generated/0.5.0-failure.yml @@ -6,7 +6,7 @@ Source: > Errors: # 1 total - > Error: Expected end of file. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/input.sol:1:4] + ╭─[crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/input.sol:1:4] │ 1 │ 0x1 wei │ ──┬─ @@ -14,6 +14,6 @@ Errors: # 1 total ───╯ Tree: - - NumericExpression (Rule): # 0..7 "0x1 wei" + - HexNumberExpression (Rule): # 0..7 "0x1 wei" - HexLiteral (Token): "0x1" # 0..3 - SKIPPED (Token): " wei" # 3..7 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_unit/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_unit/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/generated/0.4.11-success.yml similarity index 83% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/generated/0.4.11-success.yml index cf22315eca..777af17476 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..11 "0X123456789" + - HexNumberExpression (Rule): # 0..11 "0X123456789" - HexLiteral (Token): "0X123456789" # 0..11 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/generated/0.5.0-failure.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/generated/0.5.0-failure.yml similarity index 72% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/generated/0.5.0-failure.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/generated/0.5.0-failure.yml index 07b2352cfa..090fb2eab7 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/generated/0.5.0-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/generated/0.5.0-failure.yml @@ -5,8 +5,8 @@ Source: > Errors: # 1 total - > - Error: Expected DecimalLiteral or HexLiteral. - ╭─[crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/input.sol:1:1] + Error: Expected HexLiteral. + ╭─[crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/input.sol:1:1] │ 1 │ 0X123456789 │ ─────┬───── diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_uppercase_prefix/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_uppercase_prefix/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_with_underscores/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_with_underscores/generated/0.4.11-success.yml similarity index 83% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_with_underscores/generated/0.4.11-success.yml rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_with_underscores/generated/0.4.11-success.yml index c18145da3e..a30e380569 100644 --- a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_with_underscores/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_with_underscores/generated/0.4.11-success.yml @@ -6,5 +6,5 @@ Source: > Errors: [] Tree: - - NumericExpression (Rule): # 0..11 "0x12_3_45_6" + - HexNumberExpression (Rule): # 0..11 "0x12_3_45_6" - HexLiteral (Token): "0x12_3_45_6" # 0..11 diff --git a/crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_with_underscores/input.sol b/crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_with_underscores/input.sol similarity index 100% rename from crates/solidity/testing/snapshots/cst_output/NumericExpression/hex_with_underscores/input.sol rename to crates/solidity/testing/snapshots/cst_output/HexNumberExpression/hex_with_underscores/input.sol diff --git a/crates/solidity/testing/snapshots/cst_output/NewExpression/array_1d_expression/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/NewExpression/array_1d_expression/generated/0.4.11-success.yml index 1720fd73a5..06f31ec361 100644 --- a/crates/solidity/testing/snapshots/cst_output/NewExpression/array_1d_expression/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/NewExpression/array_1d_expression/generated/0.4.11-success.yml @@ -15,6 +15,6 @@ Tree: - Identifier (Token): "Foo" # 4..7 - OpenBracket (Token): "[" # 7..8 - Expression (Rule): # 8..10 "10" - - NumericExpression (Rule): # 8..10 "10" + - DecimalNumberExpression (Rule): # 8..10 "10" - DecimalLiteral (Token): "10" # 8..10 - CloseBracket (Token): "]" # 10..11 diff --git a/crates/solidity/testing/snapshots/cst_output/ReturnStatement/invalid_terminator/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/ReturnStatement/invalid_terminator/generated/0.4.11-failure.yml index 15f97d59d9..f43ed89169 100644 --- a/crates/solidity/testing/snapshots/cst_output/ReturnStatement/invalid_terminator/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/ReturnStatement/invalid_terminator/generated/0.4.11-failure.yml @@ -27,7 +27,7 @@ Tree: - Expression (Rule): # 10..19 " 2 * some" - BinaryExpression (Rule): # 10..19 " 2 * some" - Expression (Rule): # 10..12 " 2" - - NumericExpression (Rule): # 10..12 " 2" + - DecimalNumberExpression (Rule): # 10..12 " 2" - DecimalLiteral (Token): "2" # 11..12 - Asterisk (Token): "*" # 13..14 - Expression (Rule): # 14..19 " some" diff --git a/crates/solidity/testing/snapshots/cst_output/SourceUnit/SafeMath/generated/0.8.0-success.yml b/crates/solidity/testing/snapshots/cst_output/SourceUnit/SafeMath/generated/0.8.0-success.yml index 160bc34757..cdb990ad86 100644 --- a/crates/solidity/testing/snapshots/cst_output/SourceUnit/SafeMath/generated/0.8.0-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/SourceUnit/SafeMath/generated/0.8.0-success.yml @@ -100,7 +100,7 @@ Tree: - FalseKeyword (Token): "false" # 165..170 - Comma (Token): "," # 170..171 - Expression (Rule): # 171..173 " 0" - - NumericExpression (Rule): # 171..173 " 0" + - DecimalNumberExpression (Rule): # 171..173 " 0" - DecimalLiteral (Token): "0" # 172..173 - CloseParen (Token): ")" # 173..174 - Semicolon (Token): ";" # 174..175 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 38199a8fc8..53d7f3fa1b 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 @@ -100,7 +100,7 @@ Tree: - Identifier (Token): "x" # 149..150 - Equal (Token): "=" # 151..152 - Expression (Rule): # 152..154 " 0" - - NumericExpression (Rule): # 152..154 " 0" + - DecimalNumberExpression (Rule): # 152..154 " 0" - DecimalLiteral (Token): "0" # 153..154 - Semicolon (Token): ";" # 154..155 - FunctionDefinition (Rule): # 156..181 "\nfunction f() public { }\n" 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 681f4e6046..1d7dbd9581 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 @@ -92,7 +92,7 @@ Tree: - Identifier (Token): "x" # 149..150 - Equal (Token): "=" # 151..152 - Expression (Rule): # 152..154 " 0" - - NumericExpression (Rule): # 152..154 " 0" + - DecimalNumberExpression (Rule): # 152..154 " 0" - DecimalLiteral (Token): "0" # 153..154 - Semicolon (Token): ";" # 154..155 - FunctionDefinition (Rule): # 156..181 "\nfunction f() public { }\n" diff --git a/crates/solidity/testing/snapshots/cst_output/StatementsList/invalid_termination/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/StatementsList/invalid_termination/generated/0.4.11-failure.yml index 413fafd184..86839e2f26 100644 --- a/crates/solidity/testing/snapshots/cst_output/StatementsList/invalid_termination/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/StatementsList/invalid_termination/generated/0.4.11-failure.yml @@ -39,11 +39,11 @@ Tree: - Expression (Rule): # 18..24 " 1 * 2" - BinaryExpression (Rule): # 18..24 " 1 * 2" - Expression (Rule): # 18..20 " 1" - - NumericExpression (Rule): # 18..20 " 1" + - DecimalNumberExpression (Rule): # 18..20 " 1" - DecimalLiteral (Token): "1" # 19..20 - Asterisk (Token): "*" # 21..22 - Expression (Rule): # 22..24 " 2" - - NumericExpression (Rule): # 22..24 " 2" + - DecimalNumberExpression (Rule): # 22..24 " 2" - DecimalLiteral (Token): "2" # 23..24 - Semicolon (Token): ";" # 24..25 - Statement (Rule): # 25..40 " 3 * b invalid;" @@ -51,7 +51,7 @@ Tree: - Expression (Rule): # 25..31 " 3 * b" - BinaryExpression (Rule): # 25..31 " 3 * b" - Expression (Rule): # 25..27 " 3" - - NumericExpression (Rule): # 25..27 " 3" + - DecimalNumberExpression (Rule): # 25..27 " 3" - DecimalLiteral (Token): "3" # 26..27 - Asterisk (Token): "*" # 28..29 - Expression (Rule): # 29..31 " b" diff --git a/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.4.11-failure.yml b/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.4.11-failure.yml index f620690ffc..b96faed213 100644 --- a/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.4.11-failure.yml +++ b/crates/solidity/testing/snapshots/cst_output/TupleDeconstructionStatement/invalid_termination/generated/0.4.11-failure.yml @@ -32,11 +32,11 @@ Tree: - OpenParen (Token): "(" # 9..10 - TupleValuesList (Rule): # 10..18 "123, 135" - Expression (Rule): # 10..13 "123" - - NumericExpression (Rule): # 10..13 "123" + - DecimalNumberExpression (Rule): # 10..13 "123" - DecimalLiteral (Token): "123" # 10..13 - Comma (Token): "," # 13..14 - Expression (Rule): # 14..18 " 135" - - NumericExpression (Rule): # 14..18 " 135" + - DecimalNumberExpression (Rule): # 14..18 " 135" - DecimalLiteral (Token): "135" # 15..18 - CloseParen (Token): ")" # 18..19 - SKIPPED (Token): "/**/\n{ throw; \n" # 20..35 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 4752e75952..901bacbd0c 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 @@ -31,11 +31,11 @@ Tree: - OpenParen (Token): "(" # 9..10 - TupleValuesList (Rule): # 10..18 "123, 135" - Expression (Rule): # 10..13 "123" - - NumericExpression (Rule): # 10..13 "123" + - DecimalNumberExpression (Rule): # 10..13 "123" - DecimalLiteral (Token): "123" # 10..13 - Comma (Token): "," # 13..14 - Expression (Rule): # 14..18 " 135" - - NumericExpression (Rule): # 14..18 " 135" + - DecimalNumberExpression (Rule): # 14..18 " 135" - DecimalLiteral (Token): "135" # 15..18 - CloseParen (Token): ")" # 18..19 - FunctionCallOptions (Rule): # 20..26 "/**/\n{" diff --git a/crates/solidity/testing/snapshots/cst_output/VariableDeclarationStatement/var/generated/0.4.11-success.yml b/crates/solidity/testing/snapshots/cst_output/VariableDeclarationStatement/var/generated/0.4.11-success.yml index 8df297a50b..09c154a164 100644 --- a/crates/solidity/testing/snapshots/cst_output/VariableDeclarationStatement/var/generated/0.4.11-success.yml +++ b/crates/solidity/testing/snapshots/cst_output/VariableDeclarationStatement/var/generated/0.4.11-success.yml @@ -12,6 +12,6 @@ Tree: - Identifier (Token): "z" # 4..5 - Equal (Token): "=" # 6..7 - Expression (Rule): # 7..9 " 0" - - NumericExpression (Rule): # 7..9 " 0" + - DecimalNumberExpression (Rule): # 7..9 " 0" - DecimalLiteral (Token): "0" # 8..9 - Semicolon (Token): ";" # 9..10