Skip to content

Commit 975d836

Browse files
committed
test(ecma/parser): update snapshot
1 parent 8d84b88 commit 975d836

File tree

4,842 files changed

+142626
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,842 files changed

+142626
-3
lines changed

crates/swc_common/src/node_id.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#[derive(
2-
Eq, Hash, Default, Debug, PartialEq, Clone, Copy, serde::Serialize, serde::Deserialize,
3-
)]
1+
use crate::util::take::Take;
2+
3+
#[derive(Eq, Hash, Debug, PartialEq, Clone, Copy, serde::Serialize, serde::Deserialize)]
44
#[cfg_attr(
55
any(feature = "rkyv-impl"),
66
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
@@ -13,3 +13,15 @@ pub struct NodeId(#[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))] u32);
1313
impl NodeId {
1414
pub const DUMMY: NodeId = NodeId(u32::MAX);
1515
}
16+
17+
impl Default for NodeId {
18+
fn default() -> Self {
19+
NodeId::DUMMY
20+
}
21+
}
22+
23+
impl Take for NodeId {
24+
fn dummy() -> Self {
25+
NodeId::DUMMY
26+
}
27+
}

crates/swc_ecma_ast/src/ident.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ impl<'a> arbitrary::Arbitrary<'a> for Ident {
570570
sym,
571571
optional,
572572
ctxt: Default::default(),
573+
node_id: NodeId::DUMMY,
573574
})
574575
}
575576
}

crates/swc_ecma_parser/tests/js/deferred-import-evaluation/attributes-declaration/input.js.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"end": 21
2626
},
2727
"ctxt": 0,
28+
"nodeId": 4294967295,
2829
"value": "ns",
2930
"optional": false
3031
}

crates/swc_ecma_parser/tests/js/deferred-import-evaluation/defer-as-default/input.js.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"end": 13
2626
},
2727
"ctxt": 0,
28+
"nodeId": 4294967295,
2829
"value": "defer",
2930
"optional": false
3031
}

crates/swc_ecma_parser/tests/js/deferred-import-evaluation/import-defer/input.js.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"end": 21
2626
},
2727
"ctxt": 0,
28+
"nodeId": 4294967295,
2829
"value": "ns",
2930
"optional": false
3031
}

crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-callee/input.js.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"end": 6
2626
},
2727
"ctxt": 0,
28+
"nodeId": 4294967295,
2829
"value": "using",
2930
"optional": false
3031
},
@@ -38,6 +39,7 @@
3839
"end": 9
3940
},
4041
"ctxt": 0,
42+
"nodeId": 4294967295,
4143
"value": "x",
4244
"optional": false
4345
}

crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-computed-member-no-plugin/input.js.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"end": 6
3232
},
3333
"ctxt": 0,
34+
"nodeId": 4294967295,
3435
"value": "using",
3536
"optional": false
3637
},
@@ -47,6 +48,7 @@
4748
"end": 9
4849
},
4950
"ctxt": 0,
51+
"nodeId": 4294967295,
5052
"value": "x",
5153
"optional": false
5254
}
@@ -83,6 +85,7 @@
8385
"end": 26
8486
},
8587
"ctxt": 0,
88+
"nodeId": 4294967295,
8689
"value": "using",
8790
"optional": false
8891
},
@@ -99,6 +102,7 @@
99102
"end": 29
100103
},
101104
"ctxt": 0,
105+
"nodeId": 4294967295,
102106
"value": "x",
103107
"optional": false
104108
}

crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-computed-member/input.js.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"end": 6
3232
},
3333
"ctxt": 0,
34+
"nodeId": 4294967295,
3435
"value": "using",
3536
"optional": false
3637
},
@@ -47,6 +48,7 @@
4748
"end": 9
4849
},
4950
"ctxt": 0,
51+
"nodeId": 4294967295,
5052
"value": "x",
5153
"optional": false
5254
}
@@ -83,6 +85,7 @@
8385
"end": 26
8486
},
8587
"ctxt": 0,
88+
"nodeId": 4294967295,
8689
"value": "using",
8790
"optional": false
8891
},
@@ -99,6 +102,7 @@
99102
"end": 29
100103
},
101104
"ctxt": 0,
105+
"nodeId": 4294967295,
102106
"value": "x",
103107
"optional": false
104108
}

crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-expression-statement/input.js.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"end": 6
1919
},
2020
"ctxt": 0,
21+
"nodeId": 4294967295,
2122
"value": "using",
2223
"optional": false
2324
}
@@ -42,6 +43,7 @@
4243
"end": 13
4344
},
4445
"ctxt": 0,
46+
"nodeId": 4294967295,
4547
"value": "reader",
4648
"optional": false,
4749
"typeAnnotation": null
@@ -60,6 +62,7 @@
6062
"end": 25
6163
},
6264
"ctxt": 0,
65+
"nodeId": 4294967295,
6366
"value": "getReader",
6467
"optional": false
6568
},

crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-for-await-of/input.js.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"end": 17
2020
},
2121
"ctxt": 0,
22+
"nodeId": 4294967295,
2223
"value": "using",
2324
"optional": false,
2425
"typeAnnotation": null
@@ -30,6 +31,7 @@
3031
"end": 23
3132
},
3233
"ctxt": 0,
34+
"nodeId": 4294967295,
3335
"value": "of",
3436
"optional": false
3537
},

0 commit comments

Comments
 (0)