@runeditrun/rer 0.2.82 → 0.2.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/authoring.mjs +1 -0
- package/cli/contract.mjs +1 -1
- package/cli/demo-host.mjs +5 -1
- package/cli/demo.mjs +6 -1
- package/cli/export.mjs +1 -1
- package/cli/parse.mjs +1 -1
- package/edition-authoring/base-copies.mjs +72 -25
- package/edition-authoring/copy-checkout.mjs +7 -120
- package/edition-authoring/edition-migrations.mjs +41 -0
- package/edition-authoring/files.mjs +67 -0
- package/edition-authoring/lock.mjs +2 -2
- package/edition-authoring/module-closure.mjs +232 -0
- package/edition-authoring/module-edges.mjs +100 -0
- package/edition-authoring/module-resolution.mjs +66 -0
- package/edition-authoring/module-syntax.mjs +57 -0
- package/edition-authoring/package-target.mjs +92 -0
- package/edition-authoring/runtime-dependencies.mjs +74 -97
- package/edition-authoring/vendor/babel-parser/LICENSE +22 -0
- package/edition-authoring/vendor/babel-parser/README.md +21 -0
- package/edition-authoring/vendor/babel-parser/babel-helper-string-parser/index.mjs +292 -0
- package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/identifier.mjs +66 -0
- package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/index.mjs +13 -0
- package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/keyword.mjs +31 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/index.mjs +99 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/options.mjs +81 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/bind-operator-errors.mjs +8 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/module-errors.mjs +15 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/parse-expression-errors.mjs +10 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/pipeline-operator-errors.mjs +29 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/standard-errors.mjs +224 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/strict-mode-errors.mjs +17 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/to-node-description.mjs +31 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parse-error.mjs +114 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/base.mjs +34 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/comments.mjs +199 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/expression.mjs +1794 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/index.mjs +76 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/lval.mjs +439 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/node.mjs +111 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/statement.mjs +1962 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/parser/util.mjs +244 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugin-utils.mjs +116 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/estree.mjs +417 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/flow/index.mjs +2412 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/flow/scope.mjs +37 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/jsx/index.mjs +420 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/jsx/xhtml.mjs +261 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/placeholders.mjs +205 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/typescript/index.mjs +2889 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/typescript/scope.mjs +115 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/plugins/v8intrinsic.mjs +26 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/context.mjs +22 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/index.mjs +1037 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/state.mjs +178 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/types.mjs +583 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/types.mjs +1 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/class-scope.mjs +82 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/expression-scope.mjs +121 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/identifier.mjs +23 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/location.mjs +34 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/production-parameter.mjs +40 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/scope.mjs +173 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/scopeflags.mjs +66 -0
- package/edition-authoring/vendor/babel-parser/babel-parser/util/whitespace.mjs +61 -0
- package/edition-authoring/vendor/yaml/LICENSE +13 -0
- package/edition-authoring/vendor/yaml/README.md +11 -0
- package/edition-authoring/vendor/yaml/compose/compose-collection.mjs +88 -0
- package/edition-authoring/vendor/yaml/compose/compose-doc.mjs +43 -0
- package/edition-authoring/vendor/yaml/compose/compose-node.mjs +110 -0
- package/edition-authoring/vendor/yaml/compose/compose-scalar.mjs +86 -0
- package/edition-authoring/vendor/yaml/compose/composer.mjs +218 -0
- package/edition-authoring/vendor/yaml/compose/resolve-block-map.mjs +115 -0
- package/edition-authoring/vendor/yaml/compose/resolve-block-scalar.mjs +198 -0
- package/edition-authoring/vendor/yaml/compose/resolve-block-seq.mjs +49 -0
- package/edition-authoring/vendor/yaml/compose/resolve-end.mjs +37 -0
- package/edition-authoring/vendor/yaml/compose/resolve-flow-collection.mjs +207 -0
- package/edition-authoring/vendor/yaml/compose/resolve-flow-scalar.mjs +228 -0
- package/edition-authoring/vendor/yaml/compose/resolve-props.mjs +148 -0
- package/edition-authoring/vendor/yaml/compose/util-contains-newline.mjs +34 -0
- package/edition-authoring/vendor/yaml/compose/util-empty-scalar-position.mjs +27 -0
- package/edition-authoring/vendor/yaml/compose/util-flow-indent-check.mjs +15 -0
- package/edition-authoring/vendor/yaml/compose/util-map-includes.mjs +13 -0
- package/edition-authoring/vendor/yaml/doc/Document.mjs +333 -0
- package/edition-authoring/vendor/yaml/doc/anchors.mjs +74 -0
- package/edition-authoring/vendor/yaml/doc/applyReviver.mjs +54 -0
- package/edition-authoring/vendor/yaml/doc/createNode.mjs +88 -0
- package/edition-authoring/vendor/yaml/doc/directives.mjs +176 -0
- package/edition-authoring/vendor/yaml/errors.mjs +57 -0
- package/edition-authoring/vendor/yaml/index.mjs +17 -0
- package/edition-authoring/vendor/yaml/log.mjs +11 -0
- package/edition-authoring/vendor/yaml/nodes/Alias.mjs +119 -0
- package/edition-authoring/vendor/yaml/nodes/Collection.mjs +147 -0
- package/edition-authoring/vendor/yaml/nodes/Node.mjs +38 -0
- package/edition-authoring/vendor/yaml/nodes/Pair.mjs +36 -0
- package/edition-authoring/vendor/yaml/nodes/Scalar.mjs +24 -0
- package/edition-authoring/vendor/yaml/nodes/YAMLMap.mjs +144 -0
- package/edition-authoring/vendor/yaml/nodes/YAMLSeq.mjs +113 -0
- package/edition-authoring/vendor/yaml/nodes/addPairToJSMap.mjs +62 -0
- package/edition-authoring/vendor/yaml/nodes/identity.mjs +36 -0
- package/edition-authoring/vendor/yaml/nodes/toJS.mjs +35 -0
- package/edition-authoring/vendor/yaml/parse/cst-scalar.mjs +214 -0
- package/edition-authoring/vendor/yaml/parse/cst-stringify.mjs +61 -0
- package/edition-authoring/vendor/yaml/parse/cst-visit.mjs +97 -0
- package/edition-authoring/vendor/yaml/parse/cst.mjs +98 -0
- package/edition-authoring/vendor/yaml/parse/lexer.mjs +722 -0
- package/edition-authoring/vendor/yaml/parse/line-counter.mjs +39 -0
- package/edition-authoring/vendor/yaml/parse/parser.mjs +975 -0
- package/edition-authoring/vendor/yaml/public-api.mjs +102 -0
- package/edition-authoring/vendor/yaml/schema/Schema.mjs +37 -0
- package/edition-authoring/vendor/yaml/schema/common/map.mjs +17 -0
- package/edition-authoring/vendor/yaml/schema/common/null.mjs +15 -0
- package/edition-authoring/vendor/yaml/schema/common/seq.mjs +17 -0
- package/edition-authoring/vendor/yaml/schema/common/string.mjs +14 -0
- package/edition-authoring/vendor/yaml/schema/core/bool.mjs +19 -0
- package/edition-authoring/vendor/yaml/schema/core/float.mjs +43 -0
- package/edition-authoring/vendor/yaml/schema/core/int.mjs +38 -0
- package/edition-authoring/vendor/yaml/schema/core/schema.mjs +23 -0
- package/edition-authoring/vendor/yaml/schema/json/schema.mjs +62 -0
- package/edition-authoring/vendor/yaml/schema/tags.mjs +96 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/binary.mjs +59 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/bool.mjs +26 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/float.mjs +46 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/int.mjs +71 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/merge.mjs +67 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/omap.mjs +74 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/pairs.mjs +78 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/schema.mjs +39 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/set.mjs +93 -0
- package/edition-authoring/vendor/yaml/schema/yaml-1.1/timestamp.mjs +101 -0
- package/edition-authoring/vendor/yaml/stringify/foldFlowLines.mjs +146 -0
- package/edition-authoring/vendor/yaml/stringify/stringify.mjs +130 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyCollection.mjs +155 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyComment.mjs +20 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyDocument.mjs +85 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyNumber.mjs +25 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyPair.mjs +150 -0
- package/edition-authoring/vendor/yaml/stringify/stringifyString.mjs +338 -0
- package/edition-authoring/vendor/yaml/util.mjs +11 -0
- package/edition-authoring/vendor/yaml/visit.mjs +233 -0
- package/edition-authoring/workflow-copies.mjs +125 -0
- package/edition-authoring/workflow-scripts.mjs +112 -0
- package/foundation/runtime/contract-docs.mjs +753 -0
- package/global/CHANGELOG.md +33 -2
- package/modules/demo/declaration.mjs +1 -4
- package/modules/demo/vite.mjs +1 -1
- package/modules/deploy-kit/README.md +1 -1
- package/modules/deploy-kit/templates.mjs +3 -3
- package/onboarding/operator-installer.mjs +2 -2
- package/package.json +1 -1
- package/scripts/publish-check/README.md +6 -0
- package/scripts/publish-check/history_scan.py +5 -3
- package/scripts/publish-check/hygiene_config.py +2 -1
- package/scripts/publish-check/report.py +9 -3
- package/scripts/publish-check/third-party-notices.json +13 -0
- package/scripts/publish-check/third_party_notices.py +38 -0
- package/scripts/publish-check/tree_scan.py +6 -0
- package/scripts/publish-check.mjs +1 -1
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
// Generated from Babel v7.29.8 (MIT); see README.md.
|
|
2
|
+
import { types as tc } from "./context.mjs";
|
|
3
|
+
const beforeExpr = true;
|
|
4
|
+
const startsExpr = true;
|
|
5
|
+
const isLoop = true;
|
|
6
|
+
const isAssign = true;
|
|
7
|
+
const prefix = true;
|
|
8
|
+
const postfix = true;
|
|
9
|
+
class ExportedTokenType {
|
|
10
|
+
label;
|
|
11
|
+
keyword;
|
|
12
|
+
beforeExpr;
|
|
13
|
+
startsExpr;
|
|
14
|
+
rightAssociative;
|
|
15
|
+
isLoop;
|
|
16
|
+
isAssign;
|
|
17
|
+
prefix;
|
|
18
|
+
postfix;
|
|
19
|
+
binop;
|
|
20
|
+
constructor(label, conf = {}) {
|
|
21
|
+
this.label = label;
|
|
22
|
+
this.keyword = conf.keyword;
|
|
23
|
+
this.beforeExpr = !!conf.beforeExpr;
|
|
24
|
+
this.startsExpr = !!conf.startsExpr;
|
|
25
|
+
this.rightAssociative = !!conf.rightAssociative;
|
|
26
|
+
this.isLoop = !!conf.isLoop;
|
|
27
|
+
this.isAssign = !!conf.isAssign;
|
|
28
|
+
this.prefix = !!conf.prefix;
|
|
29
|
+
this.postfix = !!conf.postfix;
|
|
30
|
+
this.binop = conf.binop != null ? conf.binop : null;
|
|
31
|
+
{
|
|
32
|
+
this.updateContext = null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const keywords = /* @__PURE__ */ new Map();
|
|
37
|
+
function createKeyword(name, options = {}) {
|
|
38
|
+
options.keyword = name;
|
|
39
|
+
const token = createToken(name, options);
|
|
40
|
+
keywords.set(name, token);
|
|
41
|
+
return token;
|
|
42
|
+
}
|
|
43
|
+
function createBinop(name, binop) {
|
|
44
|
+
return createToken(name, {
|
|
45
|
+
beforeExpr,
|
|
46
|
+
binop
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
let tokenTypeCounter = -1;
|
|
50
|
+
const tokenTypes = [];
|
|
51
|
+
const tokenLabels = [];
|
|
52
|
+
const tokenBinops = [];
|
|
53
|
+
const tokenBeforeExprs = [];
|
|
54
|
+
const tokenStartsExprs = [];
|
|
55
|
+
const tokenPrefixes = [];
|
|
56
|
+
function createToken(name, options = {}) {
|
|
57
|
+
++tokenTypeCounter;
|
|
58
|
+
tokenLabels.push(name);
|
|
59
|
+
tokenBinops.push(options.binop ?? -1);
|
|
60
|
+
tokenBeforeExprs.push(options.beforeExpr ?? false);
|
|
61
|
+
tokenStartsExprs.push(options.startsExpr ?? false);
|
|
62
|
+
tokenPrefixes.push(options.prefix ?? false);
|
|
63
|
+
tokenTypes.push(new ExportedTokenType(name, options));
|
|
64
|
+
return tokenTypeCounter;
|
|
65
|
+
}
|
|
66
|
+
function createKeywordLike(name, options = {}) {
|
|
67
|
+
++tokenTypeCounter;
|
|
68
|
+
keywords.set(name, tokenTypeCounter);
|
|
69
|
+
tokenLabels.push(name);
|
|
70
|
+
tokenBinops.push(options.binop ?? -1);
|
|
71
|
+
tokenBeforeExprs.push(options.beforeExpr ?? false);
|
|
72
|
+
tokenStartsExprs.push(options.startsExpr ?? false);
|
|
73
|
+
tokenPrefixes.push(options.prefix ?? false);
|
|
74
|
+
tokenTypes.push(new ExportedTokenType("name", options));
|
|
75
|
+
return tokenTypeCounter;
|
|
76
|
+
}
|
|
77
|
+
const tt = {
|
|
78
|
+
bracketL: createToken("[", {
|
|
79
|
+
beforeExpr,
|
|
80
|
+
startsExpr
|
|
81
|
+
}),
|
|
82
|
+
bracketHashL: createToken("#[", {
|
|
83
|
+
beforeExpr,
|
|
84
|
+
startsExpr
|
|
85
|
+
}),
|
|
86
|
+
bracketBarL: createToken("[|", {
|
|
87
|
+
beforeExpr,
|
|
88
|
+
startsExpr
|
|
89
|
+
}),
|
|
90
|
+
bracketR: createToken("]"),
|
|
91
|
+
bracketBarR: createToken("|]"),
|
|
92
|
+
braceL: createToken("{", {
|
|
93
|
+
beforeExpr,
|
|
94
|
+
startsExpr
|
|
95
|
+
}),
|
|
96
|
+
braceBarL: createToken("{|", {
|
|
97
|
+
beforeExpr,
|
|
98
|
+
startsExpr
|
|
99
|
+
}),
|
|
100
|
+
braceHashL: createToken("#{", {
|
|
101
|
+
beforeExpr,
|
|
102
|
+
startsExpr
|
|
103
|
+
}),
|
|
104
|
+
braceR: createToken("}"),
|
|
105
|
+
braceBarR: createToken("|}"),
|
|
106
|
+
parenL: createToken("(", {
|
|
107
|
+
beforeExpr,
|
|
108
|
+
startsExpr
|
|
109
|
+
}),
|
|
110
|
+
parenR: createToken(")"),
|
|
111
|
+
comma: createToken(",", {
|
|
112
|
+
beforeExpr
|
|
113
|
+
}),
|
|
114
|
+
semi: createToken(";", {
|
|
115
|
+
beforeExpr
|
|
116
|
+
}),
|
|
117
|
+
colon: createToken(":", {
|
|
118
|
+
beforeExpr
|
|
119
|
+
}),
|
|
120
|
+
doubleColon: createToken("::", {
|
|
121
|
+
beforeExpr
|
|
122
|
+
}),
|
|
123
|
+
dot: createToken("."),
|
|
124
|
+
question: createToken("?", {
|
|
125
|
+
beforeExpr
|
|
126
|
+
}),
|
|
127
|
+
questionDot: createToken("?."),
|
|
128
|
+
arrow: createToken("=>", {
|
|
129
|
+
beforeExpr
|
|
130
|
+
}),
|
|
131
|
+
template: createToken("template"),
|
|
132
|
+
ellipsis: createToken("...", {
|
|
133
|
+
beforeExpr
|
|
134
|
+
}),
|
|
135
|
+
backQuote: createToken("`", {
|
|
136
|
+
startsExpr
|
|
137
|
+
}),
|
|
138
|
+
dollarBraceL: createToken("${", {
|
|
139
|
+
beforeExpr,
|
|
140
|
+
startsExpr
|
|
141
|
+
}),
|
|
142
|
+
templateTail: createToken("...`", {
|
|
143
|
+
startsExpr
|
|
144
|
+
}),
|
|
145
|
+
templateNonTail: createToken("...${", {
|
|
146
|
+
beforeExpr,
|
|
147
|
+
startsExpr
|
|
148
|
+
}),
|
|
149
|
+
at: createToken("@"),
|
|
150
|
+
hash: createToken("#", {
|
|
151
|
+
startsExpr
|
|
152
|
+
}),
|
|
153
|
+
interpreterDirective: createToken("#!..."),
|
|
154
|
+
eq: createToken("=", {
|
|
155
|
+
beforeExpr,
|
|
156
|
+
isAssign
|
|
157
|
+
}),
|
|
158
|
+
assign: createToken("_=", {
|
|
159
|
+
beforeExpr,
|
|
160
|
+
isAssign
|
|
161
|
+
}),
|
|
162
|
+
slashAssign: createToken("_=", {
|
|
163
|
+
beforeExpr,
|
|
164
|
+
isAssign
|
|
165
|
+
}),
|
|
166
|
+
xorAssign: createToken("_=", {
|
|
167
|
+
beforeExpr,
|
|
168
|
+
isAssign
|
|
169
|
+
}),
|
|
170
|
+
moduloAssign: createToken("_=", {
|
|
171
|
+
beforeExpr,
|
|
172
|
+
isAssign
|
|
173
|
+
}),
|
|
174
|
+
incDec: createToken("++/--", {
|
|
175
|
+
prefix,
|
|
176
|
+
postfix,
|
|
177
|
+
startsExpr
|
|
178
|
+
}),
|
|
179
|
+
bang: createToken("!", {
|
|
180
|
+
beforeExpr,
|
|
181
|
+
prefix,
|
|
182
|
+
startsExpr
|
|
183
|
+
}),
|
|
184
|
+
tilde: createToken("~", {
|
|
185
|
+
beforeExpr,
|
|
186
|
+
prefix,
|
|
187
|
+
startsExpr
|
|
188
|
+
}),
|
|
189
|
+
doubleCaret: createToken("^^", {
|
|
190
|
+
startsExpr
|
|
191
|
+
}),
|
|
192
|
+
doubleAt: createToken("@@", {
|
|
193
|
+
startsExpr
|
|
194
|
+
}),
|
|
195
|
+
pipeline: createBinop("|>", 0),
|
|
196
|
+
nullishCoalescing: createBinop("??", 1),
|
|
197
|
+
logicalOR: createBinop("||", 1),
|
|
198
|
+
logicalAND: createBinop("&&", 2),
|
|
199
|
+
bitwiseOR: createBinop("|", 3),
|
|
200
|
+
bitwiseXOR: createBinop("^", 4),
|
|
201
|
+
bitwiseAND: createBinop("&", 5),
|
|
202
|
+
equality: createBinop("==/!=/===/!==", 6),
|
|
203
|
+
lt: createBinop("</>/<=/>=", 7),
|
|
204
|
+
gt: createBinop("</>/<=/>=", 7),
|
|
205
|
+
relational: createBinop("</>/<=/>=", 7),
|
|
206
|
+
bitShift: createBinop("<</>>/>>>", 8),
|
|
207
|
+
bitShiftL: createBinop("<</>>/>>>", 8),
|
|
208
|
+
bitShiftR: createBinop("<</>>/>>>", 8),
|
|
209
|
+
plusMin: createToken("+/-", {
|
|
210
|
+
beforeExpr,
|
|
211
|
+
binop: 9,
|
|
212
|
+
prefix,
|
|
213
|
+
startsExpr
|
|
214
|
+
}),
|
|
215
|
+
modulo: createToken("%", {
|
|
216
|
+
binop: 10,
|
|
217
|
+
startsExpr
|
|
218
|
+
}),
|
|
219
|
+
star: createToken("*", {
|
|
220
|
+
binop: 10
|
|
221
|
+
}),
|
|
222
|
+
slash: createBinop("/", 10),
|
|
223
|
+
exponent: createToken("**", {
|
|
224
|
+
beforeExpr,
|
|
225
|
+
binop: 11,
|
|
226
|
+
rightAssociative: true
|
|
227
|
+
}),
|
|
228
|
+
_in: createKeyword("in", {
|
|
229
|
+
beforeExpr,
|
|
230
|
+
binop: 7
|
|
231
|
+
}),
|
|
232
|
+
_instanceof: createKeyword("instanceof", {
|
|
233
|
+
beforeExpr,
|
|
234
|
+
binop: 7
|
|
235
|
+
}),
|
|
236
|
+
_break: createKeyword("break"),
|
|
237
|
+
_case: createKeyword("case", {
|
|
238
|
+
beforeExpr
|
|
239
|
+
}),
|
|
240
|
+
_catch: createKeyword("catch"),
|
|
241
|
+
_continue: createKeyword("continue"),
|
|
242
|
+
_debugger: createKeyword("debugger"),
|
|
243
|
+
_default: createKeyword("default", {
|
|
244
|
+
beforeExpr
|
|
245
|
+
}),
|
|
246
|
+
_else: createKeyword("else", {
|
|
247
|
+
beforeExpr
|
|
248
|
+
}),
|
|
249
|
+
_finally: createKeyword("finally"),
|
|
250
|
+
_function: createKeyword("function", {
|
|
251
|
+
startsExpr
|
|
252
|
+
}),
|
|
253
|
+
_if: createKeyword("if"),
|
|
254
|
+
_return: createKeyword("return", {
|
|
255
|
+
beforeExpr
|
|
256
|
+
}),
|
|
257
|
+
_switch: createKeyword("switch"),
|
|
258
|
+
_throw: createKeyword("throw", {
|
|
259
|
+
beforeExpr,
|
|
260
|
+
prefix,
|
|
261
|
+
startsExpr
|
|
262
|
+
}),
|
|
263
|
+
_try: createKeyword("try"),
|
|
264
|
+
_var: createKeyword("var"),
|
|
265
|
+
_const: createKeyword("const"),
|
|
266
|
+
_with: createKeyword("with"),
|
|
267
|
+
_new: createKeyword("new", {
|
|
268
|
+
beforeExpr,
|
|
269
|
+
startsExpr
|
|
270
|
+
}),
|
|
271
|
+
_this: createKeyword("this", {
|
|
272
|
+
startsExpr
|
|
273
|
+
}),
|
|
274
|
+
_super: createKeyword("super", {
|
|
275
|
+
startsExpr
|
|
276
|
+
}),
|
|
277
|
+
_class: createKeyword("class", {
|
|
278
|
+
startsExpr
|
|
279
|
+
}),
|
|
280
|
+
_extends: createKeyword("extends", {
|
|
281
|
+
beforeExpr
|
|
282
|
+
}),
|
|
283
|
+
_export: createKeyword("export"),
|
|
284
|
+
_import: createKeyword("import", {
|
|
285
|
+
startsExpr
|
|
286
|
+
}),
|
|
287
|
+
_null: createKeyword("null", {
|
|
288
|
+
startsExpr
|
|
289
|
+
}),
|
|
290
|
+
_true: createKeyword("true", {
|
|
291
|
+
startsExpr
|
|
292
|
+
}),
|
|
293
|
+
_false: createKeyword("false", {
|
|
294
|
+
startsExpr
|
|
295
|
+
}),
|
|
296
|
+
_typeof: createKeyword("typeof", {
|
|
297
|
+
beforeExpr,
|
|
298
|
+
prefix,
|
|
299
|
+
startsExpr
|
|
300
|
+
}),
|
|
301
|
+
_void: createKeyword("void", {
|
|
302
|
+
beforeExpr,
|
|
303
|
+
prefix,
|
|
304
|
+
startsExpr
|
|
305
|
+
}),
|
|
306
|
+
_delete: createKeyword("delete", {
|
|
307
|
+
beforeExpr,
|
|
308
|
+
prefix,
|
|
309
|
+
startsExpr
|
|
310
|
+
}),
|
|
311
|
+
_do: createKeyword("do", {
|
|
312
|
+
isLoop,
|
|
313
|
+
beforeExpr
|
|
314
|
+
}),
|
|
315
|
+
_for: createKeyword("for", {
|
|
316
|
+
isLoop
|
|
317
|
+
}),
|
|
318
|
+
_while: createKeyword("while", {
|
|
319
|
+
isLoop
|
|
320
|
+
}),
|
|
321
|
+
_as: createKeywordLike("as", {
|
|
322
|
+
startsExpr
|
|
323
|
+
}),
|
|
324
|
+
_assert: createKeywordLike("assert", {
|
|
325
|
+
startsExpr
|
|
326
|
+
}),
|
|
327
|
+
_async: createKeywordLike("async", {
|
|
328
|
+
startsExpr
|
|
329
|
+
}),
|
|
330
|
+
_await: createKeywordLike("await", {
|
|
331
|
+
startsExpr
|
|
332
|
+
}),
|
|
333
|
+
_defer: createKeywordLike("defer", {
|
|
334
|
+
startsExpr
|
|
335
|
+
}),
|
|
336
|
+
_from: createKeywordLike("from", {
|
|
337
|
+
startsExpr
|
|
338
|
+
}),
|
|
339
|
+
_get: createKeywordLike("get", {
|
|
340
|
+
startsExpr
|
|
341
|
+
}),
|
|
342
|
+
_let: createKeywordLike("let", {
|
|
343
|
+
startsExpr
|
|
344
|
+
}),
|
|
345
|
+
_meta: createKeywordLike("meta", {
|
|
346
|
+
startsExpr
|
|
347
|
+
}),
|
|
348
|
+
_of: createKeywordLike("of", {
|
|
349
|
+
startsExpr
|
|
350
|
+
}),
|
|
351
|
+
_sent: createKeywordLike("sent", {
|
|
352
|
+
startsExpr
|
|
353
|
+
}),
|
|
354
|
+
_set: createKeywordLike("set", {
|
|
355
|
+
startsExpr
|
|
356
|
+
}),
|
|
357
|
+
_source: createKeywordLike("source", {
|
|
358
|
+
startsExpr
|
|
359
|
+
}),
|
|
360
|
+
_static: createKeywordLike("static", {
|
|
361
|
+
startsExpr
|
|
362
|
+
}),
|
|
363
|
+
_using: createKeywordLike("using", {
|
|
364
|
+
startsExpr
|
|
365
|
+
}),
|
|
366
|
+
_yield: createKeywordLike("yield", {
|
|
367
|
+
startsExpr
|
|
368
|
+
}),
|
|
369
|
+
_asserts: createKeywordLike("asserts", {
|
|
370
|
+
startsExpr
|
|
371
|
+
}),
|
|
372
|
+
_checks: createKeywordLike("checks", {
|
|
373
|
+
startsExpr
|
|
374
|
+
}),
|
|
375
|
+
_exports: createKeywordLike("exports", {
|
|
376
|
+
startsExpr
|
|
377
|
+
}),
|
|
378
|
+
_global: createKeywordLike("global", {
|
|
379
|
+
startsExpr
|
|
380
|
+
}),
|
|
381
|
+
_implements: createKeywordLike("implements", {
|
|
382
|
+
startsExpr
|
|
383
|
+
}),
|
|
384
|
+
_intrinsic: createKeywordLike("intrinsic", {
|
|
385
|
+
startsExpr
|
|
386
|
+
}),
|
|
387
|
+
_infer: createKeywordLike("infer", {
|
|
388
|
+
startsExpr
|
|
389
|
+
}),
|
|
390
|
+
_is: createKeywordLike("is", {
|
|
391
|
+
startsExpr
|
|
392
|
+
}),
|
|
393
|
+
_mixins: createKeywordLike("mixins", {
|
|
394
|
+
startsExpr
|
|
395
|
+
}),
|
|
396
|
+
_proto: createKeywordLike("proto", {
|
|
397
|
+
startsExpr
|
|
398
|
+
}),
|
|
399
|
+
_require: createKeywordLike("require", {
|
|
400
|
+
startsExpr
|
|
401
|
+
}),
|
|
402
|
+
_satisfies: createKeywordLike("satisfies", {
|
|
403
|
+
startsExpr
|
|
404
|
+
}),
|
|
405
|
+
_keyof: createKeywordLike("keyof", {
|
|
406
|
+
startsExpr
|
|
407
|
+
}),
|
|
408
|
+
_readonly: createKeywordLike("readonly", {
|
|
409
|
+
startsExpr
|
|
410
|
+
}),
|
|
411
|
+
_unique: createKeywordLike("unique", {
|
|
412
|
+
startsExpr
|
|
413
|
+
}),
|
|
414
|
+
_abstract: createKeywordLike("abstract", {
|
|
415
|
+
startsExpr
|
|
416
|
+
}),
|
|
417
|
+
_declare: createKeywordLike("declare", {
|
|
418
|
+
startsExpr
|
|
419
|
+
}),
|
|
420
|
+
_enum: createKeywordLike("enum", {
|
|
421
|
+
startsExpr
|
|
422
|
+
}),
|
|
423
|
+
_module: createKeywordLike("module", {
|
|
424
|
+
startsExpr
|
|
425
|
+
}),
|
|
426
|
+
_namespace: createKeywordLike("namespace", {
|
|
427
|
+
startsExpr
|
|
428
|
+
}),
|
|
429
|
+
_interface: createKeywordLike("interface", {
|
|
430
|
+
startsExpr
|
|
431
|
+
}),
|
|
432
|
+
_type: createKeywordLike("type", {
|
|
433
|
+
startsExpr
|
|
434
|
+
}),
|
|
435
|
+
_opaque: createKeywordLike("opaque", {
|
|
436
|
+
startsExpr
|
|
437
|
+
}),
|
|
438
|
+
name: createToken("name", {
|
|
439
|
+
startsExpr
|
|
440
|
+
}),
|
|
441
|
+
placeholder: createToken("%%", {
|
|
442
|
+
startsExpr
|
|
443
|
+
}),
|
|
444
|
+
string: createToken("string", {
|
|
445
|
+
startsExpr
|
|
446
|
+
}),
|
|
447
|
+
num: createToken("num", {
|
|
448
|
+
startsExpr
|
|
449
|
+
}),
|
|
450
|
+
bigint: createToken("bigint", {
|
|
451
|
+
startsExpr
|
|
452
|
+
}),
|
|
453
|
+
decimal: createToken("decimal", {
|
|
454
|
+
startsExpr
|
|
455
|
+
}),
|
|
456
|
+
regexp: createToken("regexp", {
|
|
457
|
+
startsExpr
|
|
458
|
+
}),
|
|
459
|
+
privateName: createToken("#name", {
|
|
460
|
+
startsExpr
|
|
461
|
+
}),
|
|
462
|
+
eof: createToken("eof"),
|
|
463
|
+
jsxName: createToken("jsxName"),
|
|
464
|
+
jsxText: createToken("jsxText", {
|
|
465
|
+
beforeExpr
|
|
466
|
+
}),
|
|
467
|
+
jsxTagStart: createToken("jsxTagStart", {
|
|
468
|
+
startsExpr
|
|
469
|
+
}),
|
|
470
|
+
jsxTagEnd: createToken("jsxTagEnd")
|
|
471
|
+
};
|
|
472
|
+
function tokenIsIdentifier(token) {
|
|
473
|
+
return token >= tt._as && token <= tt.placeholder;
|
|
474
|
+
}
|
|
475
|
+
function tokenKeywordOrIdentifierIsKeyword(token) {
|
|
476
|
+
return token <= tt._while;
|
|
477
|
+
}
|
|
478
|
+
function tokenIsKeywordOrIdentifier(token) {
|
|
479
|
+
return token >= tt._in && token <= tt.placeholder;
|
|
480
|
+
}
|
|
481
|
+
function tokenIsLiteralPropertyName(token) {
|
|
482
|
+
return token >= tt._in && token <= tt.decimal;
|
|
483
|
+
}
|
|
484
|
+
function tokenComesBeforeExpression(token) {
|
|
485
|
+
return tokenBeforeExprs[token];
|
|
486
|
+
}
|
|
487
|
+
function tokenCanStartExpression(token) {
|
|
488
|
+
return tokenStartsExprs[token];
|
|
489
|
+
}
|
|
490
|
+
function tokenIsAssignment(token) {
|
|
491
|
+
return token >= tt.eq && token <= tt.moduloAssign;
|
|
492
|
+
}
|
|
493
|
+
function tokenIsFlowInterfaceOrTypeOrOpaque(token) {
|
|
494
|
+
return token >= tt._interface && token <= tt._opaque;
|
|
495
|
+
}
|
|
496
|
+
function tokenIsLoop(token) {
|
|
497
|
+
return token >= tt._do && token <= tt._while;
|
|
498
|
+
}
|
|
499
|
+
function tokenIsKeyword(token) {
|
|
500
|
+
return token >= tt._in && token <= tt._while;
|
|
501
|
+
}
|
|
502
|
+
function tokenIsOperator(token) {
|
|
503
|
+
return token >= tt.pipeline && token <= tt._instanceof;
|
|
504
|
+
}
|
|
505
|
+
function tokenIsPostfix(token) {
|
|
506
|
+
return token === tt.incDec;
|
|
507
|
+
}
|
|
508
|
+
function tokenIsPrefix(token) {
|
|
509
|
+
return tokenPrefixes[token];
|
|
510
|
+
}
|
|
511
|
+
function tokenIsTSTypeOperator(token) {
|
|
512
|
+
return token >= tt._keyof && token <= tt._unique;
|
|
513
|
+
}
|
|
514
|
+
function tokenIsTSDeclarationStart(token) {
|
|
515
|
+
return token >= tt._abstract && token <= tt._type;
|
|
516
|
+
}
|
|
517
|
+
function tokenLabelName(token) {
|
|
518
|
+
return tokenLabels[token];
|
|
519
|
+
}
|
|
520
|
+
function tokenOperatorPrecedence(token) {
|
|
521
|
+
return tokenBinops[token];
|
|
522
|
+
}
|
|
523
|
+
function tokenIsBinaryOperator(token) {
|
|
524
|
+
return tokenBinops[token] !== -1;
|
|
525
|
+
}
|
|
526
|
+
function tokenIsRightAssociative(token) {
|
|
527
|
+
return token === tt.exponent;
|
|
528
|
+
}
|
|
529
|
+
function tokenIsTemplate(token) {
|
|
530
|
+
return token >= tt.templateTail && token <= tt.templateNonTail;
|
|
531
|
+
}
|
|
532
|
+
function getExportedToken(token) {
|
|
533
|
+
return tokenTypes[token];
|
|
534
|
+
}
|
|
535
|
+
function isTokenType(obj) {
|
|
536
|
+
return typeof obj === "number";
|
|
537
|
+
}
|
|
538
|
+
{
|
|
539
|
+
tokenTypes[tt.braceR].updateContext = (context) => {
|
|
540
|
+
context.pop();
|
|
541
|
+
};
|
|
542
|
+
tokenTypes[tt.braceL].updateContext = tokenTypes[tt.braceHashL].updateContext = tokenTypes[tt.dollarBraceL].updateContext = (context) => {
|
|
543
|
+
context.push(tc.brace);
|
|
544
|
+
};
|
|
545
|
+
tokenTypes[tt.backQuote].updateContext = (context) => {
|
|
546
|
+
if (context[context.length - 1] === tc.template) {
|
|
547
|
+
context.pop();
|
|
548
|
+
} else {
|
|
549
|
+
context.push(tc.template);
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
tokenTypes[tt.jsxTagStart].updateContext = (context) => {
|
|
553
|
+
context.push(tc.j_expr, tc.j_oTag);
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
export {
|
|
557
|
+
ExportedTokenType,
|
|
558
|
+
getExportedToken,
|
|
559
|
+
isTokenType,
|
|
560
|
+
keywords,
|
|
561
|
+
tokenCanStartExpression,
|
|
562
|
+
tokenComesBeforeExpression,
|
|
563
|
+
tokenIsAssignment,
|
|
564
|
+
tokenIsBinaryOperator,
|
|
565
|
+
tokenIsFlowInterfaceOrTypeOrOpaque,
|
|
566
|
+
tokenIsIdentifier,
|
|
567
|
+
tokenIsKeyword,
|
|
568
|
+
tokenIsKeywordOrIdentifier,
|
|
569
|
+
tokenIsLiteralPropertyName,
|
|
570
|
+
tokenIsLoop,
|
|
571
|
+
tokenIsOperator,
|
|
572
|
+
tokenIsPostfix,
|
|
573
|
+
tokenIsPrefix,
|
|
574
|
+
tokenIsRightAssociative,
|
|
575
|
+
tokenIsTSDeclarationStart,
|
|
576
|
+
tokenIsTSTypeOperator,
|
|
577
|
+
tokenIsTemplate,
|
|
578
|
+
tokenKeywordOrIdentifierIsKeyword,
|
|
579
|
+
tokenLabelName,
|
|
580
|
+
tokenOperatorPrecedence,
|
|
581
|
+
tokenTypes,
|
|
582
|
+
tt
|
|
583
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Generated from Babel v7.29.8 (MIT); see README.md.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Generated from Babel v7.29.8 (MIT); see README.md.
|
|
2
|
+
import { ClassElementType } from "./scopeflags.mjs";
|
|
3
|
+
import { Errors } from "../parse-error.mjs";
|
|
4
|
+
class ClassScope {
|
|
5
|
+
privateNames = /* @__PURE__ */ new Set();
|
|
6
|
+
loneAccessors = /* @__PURE__ */ new Map();
|
|
7
|
+
undefinedPrivateNames = /* @__PURE__ */ new Map();
|
|
8
|
+
}
|
|
9
|
+
class ClassScopeHandler {
|
|
10
|
+
parser;
|
|
11
|
+
stack = [];
|
|
12
|
+
undefinedPrivateNames = /* @__PURE__ */ new Map();
|
|
13
|
+
constructor(parser) {
|
|
14
|
+
this.parser = parser;
|
|
15
|
+
}
|
|
16
|
+
current() {
|
|
17
|
+
return this.stack[this.stack.length - 1];
|
|
18
|
+
}
|
|
19
|
+
enter() {
|
|
20
|
+
this.stack.push(new ClassScope());
|
|
21
|
+
}
|
|
22
|
+
exit() {
|
|
23
|
+
const oldClassScope = this.stack.pop();
|
|
24
|
+
const current = this.current();
|
|
25
|
+
for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) {
|
|
26
|
+
if (current) {
|
|
27
|
+
if (!current.undefinedPrivateNames.has(name)) {
|
|
28
|
+
current.undefinedPrivateNames.set(name, loc);
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, {
|
|
32
|
+
identifierName: name
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
declarePrivateName(name, elementType, loc) {
|
|
38
|
+
const {
|
|
39
|
+
privateNames,
|
|
40
|
+
loneAccessors,
|
|
41
|
+
undefinedPrivateNames
|
|
42
|
+
} = this.current();
|
|
43
|
+
let redefined = privateNames.has(name);
|
|
44
|
+
if (elementType & ClassElementType.KIND_ACCESSOR) {
|
|
45
|
+
const accessor = redefined && loneAccessors.get(name);
|
|
46
|
+
if (accessor) {
|
|
47
|
+
const oldStatic = accessor & ClassElementType.FLAG_STATIC;
|
|
48
|
+
const newStatic = elementType & ClassElementType.FLAG_STATIC;
|
|
49
|
+
const oldKind = accessor & ClassElementType.KIND_ACCESSOR;
|
|
50
|
+
const newKind = elementType & ClassElementType.KIND_ACCESSOR;
|
|
51
|
+
redefined = oldKind === newKind || oldStatic !== newStatic;
|
|
52
|
+
if (!redefined) loneAccessors.delete(name);
|
|
53
|
+
} else if (!redefined) {
|
|
54
|
+
loneAccessors.set(name, elementType);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (redefined) {
|
|
58
|
+
this.parser.raise(Errors.PrivateNameRedeclaration, loc, {
|
|
59
|
+
identifierName: name
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
privateNames.add(name);
|
|
63
|
+
undefinedPrivateNames.delete(name);
|
|
64
|
+
}
|
|
65
|
+
usePrivateName(name, loc) {
|
|
66
|
+
let classScope;
|
|
67
|
+
for (classScope of this.stack) {
|
|
68
|
+
if (classScope.privateNames.has(name)) return;
|
|
69
|
+
}
|
|
70
|
+
if (classScope) {
|
|
71
|
+
classScope.undefinedPrivateNames.set(name, loc);
|
|
72
|
+
} else {
|
|
73
|
+
this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, {
|
|
74
|
+
identifierName: name
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
ClassScope,
|
|
81
|
+
ClassScopeHandler as default
|
|
82
|
+
};
|