Skip to content

Commit f89ae1d

Browse files
committed
Addressed comment, renamed
1 parent b0a5d8b commit f89ae1d

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

crates/solidity-v2/inputs/language/src/BREAKING_CHANGES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ Major restructuring to consolidate `TupleDeconstructionStatement` and `VariableD
6464
- `TupleDeconstructionStatement`: `var_keyword?`, `open_paren`, `elements`, `close_paren`, `equal`, `expression`, `semicolon`
6565

6666
- **After (V2)**: Single unified statement with three variants:
67-
- `VariableDeclarationStatement`: Contains `target: VariableDeclarationOption`, `semicolon`
68-
- `VariableDeclarationOption`: Enum with three variants:
67+
- `VariableDeclarationStatement`: Contains `target: VariableDeclarationTarget`, `semicolon`
68+
- `VariableDeclarationTarget`: Enum with three variants:
6969
1. `SingleTypedDeclaration`: For `int x = ...` syntax (with optional value)
7070
2. `MultiTypedDeclaration`: For `(bool a, , int b) = ...` syntax (value required)
7171
3. `UntypedDeclaration`: For `var a = ...` or `var (a, , b) = ...` syntax (till 0.5.0, value required)
@@ -84,7 +84,7 @@ Removed types from V1:
8484
Added types in V2:
8585

8686
- `VariableDeclaration`
87-
- `VariableDeclarationOption`
87+
- `VariableDeclarationTarget`
8888
- `SingleTypedDeclaration`, `MultiTypedDeclaration`, `UntypedDeclaration`
8989
- `MultiTypedDeclarationElements`, `MultiTypedDeclarationElement`
9090
- `UntypedDeclarationNames`, `UntypedTupleDeclaration`

crates/solidity-v2/inputs/language/src/definition.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,12 +2920,12 @@ language_v2_macros::compile!(Language(
29202920
name = VariableDeclarationStatement,
29212921
error_recovery = FieldsErrorRecovery(terminator = semicolon),
29222922
fields = (
2923-
target = Required(VariableDeclarationOption),
2923+
target = Required(VariableDeclarationTarget),
29242924
semicolon = Required(Semicolon)
29252925
)
29262926
),
29272927
Enum(
2928-
name = VariableDeclarationOption,
2928+
name = VariableDeclarationTarget,
29292929
variants = [
29302930
EnumVariant(reference = SingleTypedDeclaration),
29312931
EnumVariant(reference = MultiTypedDeclaration),

crates/solidity-v2/outputs/cargo/cst/src/structured_cst/nodes.generated.rs

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/solidity-v2/outputs/cargo/parser/src/parser/temp_cst_output/node_checker.generated.rs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/solidity-v2/outputs/cargo/parser/src/parser/temp_cst_output/node_checker.rs.jinja2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -740,11 +740,11 @@ impl NodeChecker for IdentifierPathElement {
740740
}
741741
}
742742

743-
{% elif parent_type == "VariableDeclarationOption" %}
744-
/// `NodeChecker` for `VariableDeclarationOption` - no direct V1 equivalent, delegate to variants
745-
impl NodeChecker for VariableDeclarationOption {
743+
{% elif parent_type == "VariableDeclarationTarget" %}
744+
/// `NodeChecker` for `VariableDeclarationTarget` - no direct V1 equivalent, delegate to variants
745+
impl NodeChecker for VariableDeclarationTarget {
746746
fn check_node_with_offset(&self, node: &Node, text_offset: TextIndex) -> Vec<NodeCheckerError> {
747-
// VariableDeclarationOption doesn't exist in V1, so we skip the kind check
747+
// VariableDeclarationTarget doesn't exist in V1, so we skip the kind check
748748
// and directly delegate to the variant's checker
749749
match self {
750750
Self::SingleTypedDeclaration(element) => element.check_node_with_offset(node, text_offset),

0 commit comments

Comments
 (0)