@arcgis/coding-components 5.1.0-next.1 → 5.1.0-next.11
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/dist/cdn/2ORJ3A7K.js +4 -0
- package/dist/cdn/2TB2LHRA.js +2 -0
- package/dist/cdn/{UNTQC5M2.js → 44MLHT3A.js} +1 -1
- package/dist/cdn/{3B6KNFHK.js → BQLG62QR.js} +4 -4
- package/dist/cdn/{KKQIZTTK.js → F7IHWMK7.js} +1 -1
- package/dist/cdn/{NZY7KXAF.js → H75CMJQP.js} +1 -1
- package/dist/cdn/{Z56TGOZF.js → HVHTW7TF.js} +2 -2
- package/dist/cdn/{3YWUK77P.js → L2AQ5FXC.js} +1 -1
- package/dist/cdn/{EPMYM35I.js → M4URDN2E.js} +1 -1
- package/dist/cdn/{DEWLD2VE.js → NXNOBP7G.js} +1 -1
- package/dist/cdn/{5JKSRJZY.js → P5EURHTL.js} +1 -1
- package/dist/cdn/{3FSDLLYC.js → QWLPT7LO.js} +1 -1
- package/dist/cdn/{N2FN7LBN.js → RYBVZEI5.js} +1 -1
- package/dist/cdn/{BYO7RLJT.js → T7GEIGWF.js} +1 -1
- package/dist/cdn/{QXQAIN3R.js → TDEKR2LM.js} +1 -1
- package/dist/cdn/VD5UOV5M.js +6 -0
- package/dist/cdn/XEUCI6KC.js +2 -0
- package/dist/cdn/{D2RP5367.js → ZGBZ6BXY.js} +1 -1
- package/dist/cdn/assets/code-editor/arcade.worker.js +8 -0
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +2192 -2186
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/arcade-defaults.js +134 -132
- package/dist/chunks/arcade-mode.js +2 -2
- package/dist/chunks/language-defaults-base.js +3 -2
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +101 -96
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +5 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +72 -59
- package/dist/components/arcgis-arcade-results/customElement.js +13 -13
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/6QWZ6LSH.js +0 -2
- package/dist/cdn/ASVCAO4G.js +0 -4
- package/dist/cdn/MY63AUW2.js +0 -2
- package/dist/cdn/RXNRHK3U.js +0 -6
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{I as s,u as e}from"./EMMNZESW.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./
|
|
2
|
+
import{I as s,u as e}from"./EMMNZESW.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./2ORJ3A7K.js"),"appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-editor":[()=>import("./2TB2LHRA.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./ZGBZ6BXY.js"),"calciteModeDark,consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./44MLHT3A.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./RYBVZEI5.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./3C7TCPV5.js")],"arcgis-code-viewer":[()=>import("./M4URDN2E.js"),"language,round"],"arcgis-editor-variables":[()=>import("./DTZPALJA.js"),"closed,loading,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./H75CMJQP.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./TDEKR2LM.js"),"hideSideBar,messages:,profile:,script;setFocus"]});i({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
|
|
@@ -1,145 +1,145 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { i as
|
|
3
|
-
import { supportedLocales as
|
|
4
|
-
import { g as
|
|
5
|
-
import { CompletionItemKind as
|
|
6
|
-
import { getDeclaredPixelMembers as
|
|
2
|
+
import { i as h, a as D, b as v, c as F, d as M, e as S, g as L, f as A, m as k, L as E, E as I } from "./language-defaults-base.js";
|
|
3
|
+
import { supportedLocales as C, fetchT9nStringsBundle as j } from "@arcgis/toolkit/intl";
|
|
4
|
+
import { g as P } from "./runtime.js";
|
|
5
|
+
import { CompletionItemKind as w, InsertTextFormat as p, InsertTextMode as f } from "vscode-languageserver-types";
|
|
6
|
+
import { getDeclaredPixelMembers as $ } from "@arcgis/core/applications/Components/arcadeEditorUtils.js";
|
|
7
7
|
import "@arcgis/toolkit/type";
|
|
8
|
-
async function
|
|
9
|
-
const { apiVersion:
|
|
10
|
-
return { apiVersion:
|
|
8
|
+
async function B(e) {
|
|
9
|
+
const { apiVersion: i, bundles: t, hiddenApiItems: s } = e.toEditorProfileDefinition(), o = await T(e.dictionaryVariables);
|
|
10
|
+
return { apiVersion: i, bundles: t, variables: o, hiddenApiItems: s?.map((a) => a.toLowerCase()) };
|
|
11
11
|
}
|
|
12
|
-
async function
|
|
12
|
+
async function T(e, i = w.Variable) {
|
|
13
13
|
return await Promise.all(
|
|
14
|
-
e.map(async (
|
|
15
|
-
switch (
|
|
14
|
+
e.map(async (t) => {
|
|
15
|
+
switch (t.type) {
|
|
16
16
|
case "dictionary":
|
|
17
|
-
return await
|
|
17
|
+
return await z(t, i);
|
|
18
18
|
case "pixel":
|
|
19
|
-
return await
|
|
19
|
+
return await q(t, i);
|
|
20
20
|
// Voxel is equivalent to features in regards to the languageservice.
|
|
21
21
|
// They both have equivalent fields, but some voxel fields are different types (arrays)
|
|
22
22
|
// than what is reported in .fields, so in the sidebar we treat a bit differently.
|
|
23
23
|
// In autocomplete we don't differentiate types, so we can use the same logic as features.
|
|
24
24
|
case "voxel":
|
|
25
25
|
case "feature":
|
|
26
|
-
return await
|
|
26
|
+
return await _(t, i);
|
|
27
27
|
default:
|
|
28
|
-
return
|
|
28
|
+
return K(t, i);
|
|
29
29
|
}
|
|
30
30
|
})
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const { name:
|
|
33
|
+
function K(e, i) {
|
|
34
|
+
const { name: t, type: s } = e, o = e.getDescription(), a = i === w.Field ? L(t, !1) : t;
|
|
35
35
|
return {
|
|
36
|
-
name:
|
|
37
|
-
description:
|
|
38
|
-
type:
|
|
36
|
+
name: t,
|
|
37
|
+
description: o,
|
|
38
|
+
type: s,
|
|
39
39
|
completion: {
|
|
40
|
-
label:
|
|
41
|
-
detail:
|
|
42
|
-
insertText:
|
|
40
|
+
label: t,
|
|
41
|
+
detail: t,
|
|
42
|
+
insertText: a,
|
|
43
43
|
insertTextMode: f.asIs,
|
|
44
44
|
insertTextFormat: p.PlainText,
|
|
45
|
-
kind:
|
|
46
|
-
documentation: { kind: "markdown", value:
|
|
45
|
+
kind: i,
|
|
46
|
+
documentation: { kind: "markdown", value: o }
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
async function
|
|
51
|
-
const
|
|
52
|
-
label:
|
|
53
|
-
detail:
|
|
54
|
-
insertText:
|
|
50
|
+
async function _(e, i) {
|
|
51
|
+
const t = await e.loadSource(), { name: s } = e, o = e.getDescription(), a = {
|
|
52
|
+
label: s,
|
|
53
|
+
detail: s,
|
|
54
|
+
insertText: s,
|
|
55
55
|
insertTextMode: f.asIs,
|
|
56
56
|
insertTextFormat: p.PlainText,
|
|
57
|
-
kind:
|
|
58
|
-
},
|
|
59
|
-
name:
|
|
60
|
-
description:
|
|
57
|
+
kind: i
|
|
58
|
+
}, n = {
|
|
59
|
+
name: s,
|
|
60
|
+
description: o,
|
|
61
61
|
type: "dictionary",
|
|
62
62
|
properties: [],
|
|
63
|
-
completion:
|
|
63
|
+
completion: a
|
|
64
64
|
};
|
|
65
|
-
if (!
|
|
66
|
-
return
|
|
67
|
-
const [
|
|
68
|
-
return
|
|
65
|
+
if (!t)
|
|
66
|
+
return n;
|
|
67
|
+
const [r, c] = A(t.fields, o, !0);
|
|
68
|
+
return n.properties = r, a.documentation = { kind: "markdown", value: c }, n;
|
|
69
69
|
}
|
|
70
|
-
async function
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
70
|
+
async function q(e, i) {
|
|
71
|
+
const t = await e.loadSource(), s = e.toProfileVariableDefinition();
|
|
72
|
+
if (s.type !== "pixel")
|
|
73
73
|
throw new Error("Incorrect definition passed to pixel variable");
|
|
74
|
-
const { name:
|
|
75
|
-
label:
|
|
76
|
-
detail:
|
|
77
|
-
insertText:
|
|
74
|
+
const { name: o } = e, a = e.getDescription(), n = {
|
|
75
|
+
label: o,
|
|
76
|
+
detail: o,
|
|
77
|
+
insertText: o,
|
|
78
78
|
insertTextMode: f.asIs,
|
|
79
79
|
insertTextFormat: p.PlainText,
|
|
80
|
-
kind:
|
|
81
|
-
},
|
|
82
|
-
name:
|
|
83
|
-
description:
|
|
80
|
+
kind: i
|
|
81
|
+
}, r = {
|
|
82
|
+
name: o,
|
|
83
|
+
description: a,
|
|
84
84
|
type: "dictionary",
|
|
85
85
|
properties: [],
|
|
86
|
-
completion:
|
|
86
|
+
completion: n
|
|
87
87
|
};
|
|
88
|
-
if (!
|
|
89
|
-
return
|
|
90
|
-
const c = await
|
|
91
|
-
return
|
|
88
|
+
if (!t || !s.definition)
|
|
89
|
+
return r;
|
|
90
|
+
const c = await $(t), [d, l] = k(c, a);
|
|
91
|
+
return r.properties = d, n.documentation = { kind: "markdown", value: l }, r;
|
|
92
92
|
}
|
|
93
|
-
async function
|
|
94
|
-
const { name:
|
|
95
|
-
|
|
93
|
+
async function z(e, i) {
|
|
94
|
+
const { name: t, dictionaryVariables: s } = e, o = e.getDescription(), a = s.reduce((n, r) => {
|
|
95
|
+
n !== "" && (n += `
|
|
96
96
|
|
|
97
|
-
`),
|
|
98
|
-
${
|
|
99
|
-
const c =
|
|
100
|
-
return c && (
|
|
101
|
-
${c}`),
|
|
102
|
-
},
|
|
97
|
+
`), n += `**${r.name}**
|
|
98
|
+
${r.type}`;
|
|
99
|
+
const c = r.getDescription();
|
|
100
|
+
return c && (n += `
|
|
101
|
+
${c}`), n;
|
|
102
|
+
}, o);
|
|
103
103
|
return {
|
|
104
|
-
name:
|
|
105
|
-
description:
|
|
104
|
+
name: t,
|
|
105
|
+
description: o,
|
|
106
106
|
type: "dictionary",
|
|
107
|
-
properties: await
|
|
107
|
+
properties: await T(s, w.Field),
|
|
108
108
|
completion: {
|
|
109
|
-
label:
|
|
110
|
-
detail:
|
|
111
|
-
insertText:
|
|
109
|
+
label: t,
|
|
110
|
+
detail: t,
|
|
111
|
+
insertText: t,
|
|
112
112
|
insertTextMode: f.asIs,
|
|
113
113
|
insertTextFormat: p.PlainText,
|
|
114
|
-
kind:
|
|
115
|
-
documentation: { kind: "markdown", value:
|
|
114
|
+
kind: i,
|
|
115
|
+
documentation: { kind: "markdown", value: a }
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
async function y(e = "en") {
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
return
|
|
123
|
-
if (!
|
|
120
|
+
const i = b.get(e);
|
|
121
|
+
if (i)
|
|
122
|
+
return i;
|
|
123
|
+
if (!C.has(e))
|
|
124
124
|
return await y("en");
|
|
125
125
|
try {
|
|
126
|
-
const
|
|
127
|
-
return
|
|
126
|
+
const t = await fetch(P(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));
|
|
127
|
+
return t.ok ? O(e, await t.json()) : e === "en" ? null : await y("en");
|
|
128
128
|
} catch {
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
const
|
|
133
|
-
function
|
|
134
|
-
const
|
|
135
|
-
return
|
|
136
|
-
|
|
137
|
-
}),
|
|
132
|
+
const b = /* @__PURE__ */ new Map();
|
|
133
|
+
function O(e, i) {
|
|
134
|
+
const t = /* @__PURE__ */ new Map();
|
|
135
|
+
return i.forEach((s) => {
|
|
136
|
+
t.set(s.id, s);
|
|
137
|
+
}), b.set(e, t), t;
|
|
138
138
|
}
|
|
139
|
-
async function
|
|
140
|
-
return (await y(
|
|
139
|
+
async function Q(e, i = "en") {
|
|
140
|
+
return (await y(i))?.get(e) ?? null;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function U(e) {
|
|
143
143
|
return !!e && typeof e == "object" && "additionalVariables" in e && Array.isArray(e.additionalVariables);
|
|
144
144
|
}
|
|
145
145
|
function G(e) {
|
|
@@ -163,44 +163,46 @@ function m(e) {
|
|
|
163
163
|
return { ...e, type: e.type };
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
async function H(e,
|
|
167
|
-
if (!
|
|
166
|
+
async function H(e, i = "en") {
|
|
167
|
+
if (!h(e))
|
|
168
168
|
return;
|
|
169
|
-
const
|
|
170
|
-
if (!
|
|
169
|
+
const t = await Q(e.id, i);
|
|
170
|
+
if (!t)
|
|
171
171
|
return;
|
|
172
|
-
const
|
|
173
|
-
|
|
172
|
+
const s = e.definitions, o = new Map(
|
|
173
|
+
Object.entries(s).map(([n, r]) => [n.toLowerCase(), r])
|
|
174
|
+
), a = {
|
|
175
|
+
bundles: [...t.bundles],
|
|
174
176
|
variables: [],
|
|
175
|
-
hiddenApiItems: e.hiddenApiItems?.map((
|
|
177
|
+
hiddenApiItems: e.hiddenApiItems?.map((n) => n.toLowerCase())
|
|
176
178
|
};
|
|
177
|
-
return
|
|
178
|
-
if (e.disabledVariables?.includes(
|
|
179
|
+
return t.variables.forEach((n) => {
|
|
180
|
+
if (e.disabledVariables?.includes(n.name))
|
|
179
181
|
return;
|
|
180
|
-
const
|
|
181
|
-
switch (
|
|
182
|
+
const r = o.get(n.name.toLowerCase());
|
|
183
|
+
switch (n.type) {
|
|
182
184
|
case "dictionary":
|
|
183
|
-
return
|
|
185
|
+
return a.variables.push(
|
|
184
186
|
m({
|
|
185
|
-
...
|
|
186
|
-
type:
|
|
187
|
-
properties: Array.isArray(
|
|
187
|
+
...n,
|
|
188
|
+
type: n.type,
|
|
189
|
+
properties: Array.isArray(r) ? [...r] : n.properties
|
|
188
190
|
})
|
|
189
191
|
);
|
|
190
192
|
case "feature":
|
|
191
|
-
return
|
|
193
|
+
return S(r) ? a.variables.push({ ...n, type: "feature", definition: r }) : void 0;
|
|
192
194
|
case "pixel":
|
|
193
|
-
return
|
|
195
|
+
return M(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
|
|
194
196
|
case "voxel":
|
|
195
|
-
return F(
|
|
197
|
+
return F(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
|
|
196
198
|
case "featureSet":
|
|
197
|
-
return v(
|
|
199
|
+
return v(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
|
|
198
200
|
case "featureSetCollection":
|
|
199
|
-
return D(
|
|
201
|
+
return D(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
|
|
200
202
|
default:
|
|
201
|
-
return
|
|
203
|
+
return a.variables.push(m(n));
|
|
202
204
|
}
|
|
203
|
-
}),
|
|
205
|
+
}), U(e) && a.variables.push(...e.additionalVariables ?? []), a;
|
|
204
206
|
}
|
|
205
207
|
const J = [
|
|
206
208
|
"catalog-footprint",
|
|
@@ -217,13 +219,13 @@ const J = [
|
|
|
217
219
|
function N(e) {
|
|
218
220
|
return !!e && typeof e == "object" && "type" in e && typeof e.type == "string" && J.includes(e.type);
|
|
219
221
|
}
|
|
220
|
-
const
|
|
222
|
+
const R = {
|
|
221
223
|
filterFsCollectionLayersFromMap: (e) => (
|
|
222
224
|
// only some layers are supported in arcade feature sets, one example: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/10715
|
|
223
225
|
N(e)
|
|
224
226
|
)
|
|
225
227
|
};
|
|
226
|
-
class
|
|
228
|
+
class W extends E {
|
|
227
229
|
/**
|
|
228
230
|
* Per-model update chaining to serialize profile updates.
|
|
229
231
|
*
|
|
@@ -254,40 +256,40 @@ class R extends k {
|
|
|
254
256
|
* @param locale The locale to use for the model context.
|
|
255
257
|
* @returns The EditorProfile for the model.
|
|
256
258
|
*/
|
|
257
|
-
async setProfileForModel(
|
|
258
|
-
const
|
|
259
|
-
const c =
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
async setProfileForModel(i, t, s = { locale: "en" }) {
|
|
260
|
+
const o = this._getApiKey(i), n = (this.#e.get(o) || Promise.resolve()).then(async () => {
|
|
261
|
+
const c = t, d = h(c) ? await H(c, s.locale) : c, l = await j(
|
|
262
|
+
s.locale,
|
|
263
|
+
P("./assets/editor-profile/t9n"),
|
|
262
264
|
"messages."
|
|
263
265
|
);
|
|
264
266
|
if (!l)
|
|
265
|
-
throw new Error(`Failed to load the language bundle for ${
|
|
266
|
-
this.disposeForModel(
|
|
267
|
-
const
|
|
267
|
+
throw new Error(`Failed to load the language bundle for ${s.locale}`);
|
|
268
|
+
this.disposeForModel(i);
|
|
269
|
+
const g = new I(
|
|
268
270
|
d,
|
|
269
271
|
l,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
+
s.locale,
|
|
273
|
+
R
|
|
272
274
|
);
|
|
273
|
-
this._modelToProfileMap.set(
|
|
274
|
-
const
|
|
275
|
-
this.updateApiContextForModel(
|
|
276
|
-
locale:
|
|
277
|
-
profile:
|
|
278
|
-
snippets:
|
|
275
|
+
this._modelToProfileMap.set(o, g);
|
|
276
|
+
const x = await B(g);
|
|
277
|
+
this.updateApiContextForModel(i, {
|
|
278
|
+
locale: s.locale,
|
|
279
|
+
profile: x,
|
|
280
|
+
snippets: s.snippets
|
|
279
281
|
});
|
|
280
|
-
}),
|
|
281
|
-
this.#e.get(
|
|
282
|
+
}), r = n.finally(() => {
|
|
283
|
+
this.#e.get(o) === r && this.#e.delete(o);
|
|
282
284
|
});
|
|
283
|
-
return this.#e.set(
|
|
285
|
+
return this.#e.set(o, r), await n;
|
|
284
286
|
}
|
|
285
287
|
}
|
|
286
|
-
const u = new
|
|
288
|
+
const u = new W(), ne = {
|
|
287
289
|
setProfileForModel: u.setProfileForModel.bind(u),
|
|
288
290
|
getApiLibraryForModel: u.getApiLibraryForModel.bind(u)
|
|
289
291
|
};
|
|
290
292
|
export {
|
|
291
|
-
|
|
293
|
+
ne as a,
|
|
292
294
|
u as b
|
|
293
295
|
};
|
|
@@ -118,7 +118,7 @@ const F = [
|
|
|
118
118
|
{ include: "@whitespace" },
|
|
119
119
|
// regular expression: ensure it is terminated before beginning (otherwise it is an operator)
|
|
120
120
|
[
|
|
121
|
-
/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(
|
|
121
|
+
/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/u,
|
|
122
122
|
{ token: "regexp", bracket: "@open", next: "@regexp" }
|
|
123
123
|
],
|
|
124
124
|
// delimiters and operators
|
|
@@ -161,7 +161,7 @@ const F = [
|
|
|
161
161
|
// whitespace
|
|
162
162
|
{ include: "@whitespace" },
|
|
163
163
|
// from keyword
|
|
164
|
-
[/from/u, { token: "keyword", next: "@popall" }]
|
|
164
|
+
[/from(?=\s)/u, { token: "keyword", next: "@popall" }]
|
|
165
165
|
],
|
|
166
166
|
// State after `for` keyword: expects '('
|
|
167
167
|
forLoopInit: [
|