From 9246eb03732355576c5b67b6c7eb091f68932299 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Tue, 14 Nov 2023 14:11:01 +0100 Subject: [PATCH] Split the NumericExpression CST tests Now that we can't reliably expose this parser starting from DSL v2, let's test individual choices --- .../generated/DecimalNumberExpression.rs | 59 ++++++++++ .../generated/HexNumberExpression.rs | 54 +++++++++ .../cst_output/generated/NumericExpression.rs | 109 ------------------ .../tests/src/cst_output/generated/mod.rs | 6 +- .../outputs/npm/tests/src/tests/cst-cursor.ts | 4 +- .../outputs/npm/tests/src/tests/cst-output.ts | 4 +- .../days_unit/generated/0.4.11-success.yml | 2 +- .../days_unit/input.sol | 0 .../generated/0.4.11-success.yml | 2 +- .../decimal_no_unit/input.sol | 0 .../generated/0.4.11-failure.yml | 4 +- .../decimal_trailing_ident_start/input.sol | 0 .../ether_unit/generated/0.4.11-success.yml | 2 +- .../ether_unit/input.sol | 0 .../float/generated/0.4.11-success.yml | 2 +- .../float/input.sol | 0 .../generated/0.4.11-success.yml | 2 +- .../generated/0.5.0-failure.yml | 4 +- .../float_no_fraction/input.sol | 0 .../generated/0.4.11-success.yml | 2 +- .../float_no_mantissa/input.sol | 0 .../integer/generated/0.4.11-success.yml | 2 +- .../integer/input.sol | 0 .../generated/0.4.11-success.yml | 2 +- .../integer_with_exponent/input.sol | 0 .../generated/0.4.11-success.yml | 2 +- .../integer_with_separators/input.sol | 0 .../years_unit/generated/0.4.11-success.yml | 2 +- .../years_unit/generated/0.5.0-failure.yml | 4 +- .../years_unit/generated/0.6.11-failure.yml | 4 +- .../years_unit/generated/0.7.0-failure.yml | 4 +- .../years_unit/input.sol | 0 .../generated/0.4.11-failure.yml | 4 +- .../hex_consecutive_underscores/input.sol | 0 .../generated/0.4.11-failure.yml | 4 +- .../hex_leading_underscore/input.sol | 0 .../generated/0.4.11-success.yml | 2 +- .../hex_multiple_digits/input.sol | 0 .../generated/0.4.11-failure.yml | 4 +- .../hex_no_digits/input.sol | 0 .../hex_no_unit/generated/0.4.11-success.yml | 2 +- .../hex_no_unit/input.sol | 0 .../generated/0.4.11-failure.yml | 4 +- .../hex_trailing_ident_start/input.sol | 0 .../generated/0.4.11-failure.yml | 4 +- .../hex_trailing_underscore/input.sol | 0 .../hex_unit/generated/0.4.11-success.yml | 2 +- .../hex_unit/generated/0.5.0-failure.yml | 4 +- .../hex_unit/input.sol | 0 .../generated/0.4.11-success.yml | 2 +- .../generated/0.5.0-failure.yml | 4 +- .../hex_uppercase_prefix/input.sol | 0 .../generated/0.4.11-success.yml | 2 +- .../hex_with_underscores/input.sol | 0 54 files changed, 160 insertions(+), 154 deletions(-) create mode 100644 crates/solidity/outputs/cargo/tests/src/cst_output/generated/DecimalNumberExpression.rs create mode 100644 crates/solidity/outputs/cargo/tests/src/cst_output/generated/HexNumberExpression.rs delete mode 100644 crates/solidity/outputs/cargo/tests/src/cst_output/generated/NumericExpression.rs rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/days_unit/generated/0.4.11-success.yml (85%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/days_unit/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/decimal_no_unit/generated/0.4.11-success.yml (83%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/decimal_no_unit/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/decimal_trailing_ident_start/generated/0.4.11-failure.yml (69%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/decimal_trailing_ident_start/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/ether_unit/generated/0.4.11-success.yml (85%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/ether_unit/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/float/generated/0.4.11-success.yml (84%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/float/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/float_no_fraction/generated/0.4.11-success.yml (84%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/float_no_fraction/generated/0.5.0-failure.yml (69%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/float_no_fraction/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/float_no_mantissa/generated/0.4.11-success.yml (84%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/float_no_mantissa/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/integer/generated/0.4.11-success.yml (84%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/integer/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/integer_with_exponent/generated/0.4.11-success.yml (84%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/integer_with_exponent/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/integer_with_separators/generated/0.4.11-success.yml (84%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/integer_with_separators/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/years_unit/generated/0.4.11-success.yml (84%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/years_unit/generated/0.5.0-failure.yml (79%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/years_unit/generated/0.6.11-failure.yml (79%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/years_unit/generated/0.7.0-failure.yml (78%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => DecimalNumberExpression}/years_unit/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_consecutive_underscores/generated/0.4.11-failure.yml (70%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_consecutive_underscores/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_leading_underscore/generated/0.4.11-failure.yml (70%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_leading_underscore/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_multiple_digits/generated/0.4.11-success.yml (84%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_multiple_digits/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_no_digits/generated/0.4.11-failure.yml (70%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_no_digits/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_no_unit/generated/0.4.11-success.yml (83%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_no_unit/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_trailing_ident_start/generated/0.4.11-failure.yml (70%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_trailing_ident_start/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_trailing_underscore/generated/0.4.11-failure.yml (69%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_trailing_underscore/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_unit/generated/0.4.11-success.yml (86%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_unit/generated/0.5.0-failure.yml (75%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_unit/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_uppercase_prefix/generated/0.4.11-success.yml (83%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_uppercase_prefix/generated/0.5.0-failure.yml (72%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_uppercase_prefix/input.sol (100%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_with_underscores/generated/0.4.11-success.yml (83%) rename crates/solidity/testing/snapshots/cst_output/{NumericExpression => HexNumberExpression}/hex_with_underscores/input.sol (100%) 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/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/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/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