@jetstreamapp/soql-parser-js 6.1.0 → 6.2.1
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/CHANGELOG.md +12 -0
- package/README.md +2 -3
- package/dist/cjs/index.js +143 -2
- package/dist/cli/index.js +148 -113
- package/dist/esm/index.mjs +143 -0
- package/dist/{cjs/src → types}/index.d.ts +1 -1
- package/package.json +23 -25
- package/dist/cjs/index.js.LICENSE.txt +0 -1
- package/dist/cjs/main.licenses.txt +0 -898
- package/dist/cjs/src/api/api-models.js +0 -2
- package/dist/cjs/src/api/public-utils.js +0 -175
- package/dist/cjs/src/composer/composer.js +0 -295
- package/dist/cjs/src/formatter/formatter.js +0 -236
- package/dist/cjs/src/index.js +0 -23
- package/dist/cjs/src/models.js +0 -2
- package/dist/cjs/src/parser/lexer.js +0 -954
- package/dist/cjs/src/parser/parser.js +0 -697
- package/dist/cjs/src/parser/visitor.js +0 -856
- package/dist/cjs/src/utils.js +0 -245
- package/dist/esm/api/api-models.js +0 -1
- package/dist/esm/api/public-utils.js +0 -153
- package/dist/esm/composer/composer.js +0 -273
- package/dist/esm/formatter/formatter.js +0 -223
- package/dist/esm/index.js +0 -4
- package/dist/esm/models.js +0 -1
- package/dist/esm/parser/lexer.js +0 -947
- package/dist/esm/parser/parser.js +0 -667
- package/dist/esm/parser/visitor.js +0 -823
- package/dist/esm/utils.js +0 -200
- package/dist/src/api/api-models.js +0 -2
- package/dist/src/api/public-utils.js +0 -203
- package/dist/src/composer/composer.js +0 -358
- package/dist/src/formatter/formatter.js +0 -263
- package/dist/src/index.js +0 -28
- package/dist/src/models.js +0 -2
- package/dist/src/parser/lexer.js +0 -997
- package/dist/src/parser/parser.js +0 -711
- package/dist/src/parser/visitor.js +0 -862
- package/dist/src/utils.js +0 -251
- /package/dist/{cjs/src → types}/api/api-models.d.ts +0 -0
- /package/dist/{cjs/src → types}/api/public-utils.d.ts +0 -0
- /package/dist/{cjs/src → types}/composer/composer.d.ts +0 -0
- /package/dist/{cjs/src → types}/formatter/formatter.d.ts +0 -0
- /package/dist/{cjs/src → types}/models.d.ts +0 -0
- /package/dist/{cjs/src → types}/parser/lexer.d.ts +0 -0
- /package/dist/{cjs/src → types}/parser/parser.d.ts +0 -0
- /package/dist/{cjs/src → types}/parser/visitor.d.ts +0 -0
- /package/dist/{cjs/src → types}/utils.d.ts +0 -0
package/dist/esm/parser/lexer.js
DELETED
|
@@ -1,947 +0,0 @@
|
|
|
1
|
-
import { createToken, Lexer } from 'chevrotain';
|
|
2
|
-
export const ReservedKeyword = createToken({
|
|
3
|
-
name: 'KeywordReserved',
|
|
4
|
-
pattern: Lexer.NA,
|
|
5
|
-
});
|
|
6
|
-
export const Keyword = createToken({
|
|
7
|
-
name: 'Keyword',
|
|
8
|
-
pattern: Lexer.NA,
|
|
9
|
-
});
|
|
10
|
-
export const DateFunction = createToken({
|
|
11
|
-
name: 'DateFunction',
|
|
12
|
-
pattern: Lexer.NA,
|
|
13
|
-
});
|
|
14
|
-
export const AggregateFunction = createToken({
|
|
15
|
-
name: 'AggregateFunction',
|
|
16
|
-
pattern: Lexer.NA,
|
|
17
|
-
});
|
|
18
|
-
export const LocationFunction = createToken({
|
|
19
|
-
name: 'LocationFunction',
|
|
20
|
-
pattern: Lexer.NA,
|
|
21
|
-
});
|
|
22
|
-
export const FieldsFunction = createToken({
|
|
23
|
-
name: 'FieldsFunction',
|
|
24
|
-
pattern: Lexer.NA,
|
|
25
|
-
});
|
|
26
|
-
export const FieldsFunctionParamIdentifier = createToken({
|
|
27
|
-
name: 'FieldsFunctionParamIdentifier',
|
|
28
|
-
pattern: Lexer.NA,
|
|
29
|
-
});
|
|
30
|
-
export const OtherFunction = createToken({
|
|
31
|
-
name: 'OtherFunction',
|
|
32
|
-
pattern: Lexer.NA,
|
|
33
|
-
});
|
|
34
|
-
export const DateLiteral = createToken({
|
|
35
|
-
name: 'DateLiteral',
|
|
36
|
-
pattern: Lexer.NA,
|
|
37
|
-
});
|
|
38
|
-
export const DateLiteralNotIdentifier = createToken({
|
|
39
|
-
name: 'DateLiteralNotIdentifier',
|
|
40
|
-
pattern: Lexer.NA,
|
|
41
|
-
});
|
|
42
|
-
export const DateNLiteral = createToken({
|
|
43
|
-
name: 'DateNLiteral',
|
|
44
|
-
pattern: Lexer.NA,
|
|
45
|
-
});
|
|
46
|
-
export const RelationalOperator = createToken({
|
|
47
|
-
name: 'RelationalOperator',
|
|
48
|
-
pattern: Lexer.NA,
|
|
49
|
-
});
|
|
50
|
-
export const SymbolIdentifier = createToken({
|
|
51
|
-
name: 'SymbolIdentifier',
|
|
52
|
-
pattern: Lexer.NA,
|
|
53
|
-
});
|
|
54
|
-
export const DateIdentifier = createToken({
|
|
55
|
-
name: 'DateIdentifier',
|
|
56
|
-
pattern: Lexer.NA,
|
|
57
|
-
});
|
|
58
|
-
export const NumberIdentifier = createToken({
|
|
59
|
-
name: 'NumberIdentifier',
|
|
60
|
-
pattern: Lexer.NA,
|
|
61
|
-
});
|
|
62
|
-
export const DecimalNumberIdentifier = createToken({
|
|
63
|
-
name: 'DecimalNumberIdentifier',
|
|
64
|
-
pattern: Lexer.NA,
|
|
65
|
-
});
|
|
66
|
-
export const IntegerNumberIdentifier = createToken({
|
|
67
|
-
name: 'IntegerNumberIdentifier',
|
|
68
|
-
pattern: Lexer.NA,
|
|
69
|
-
});
|
|
70
|
-
export const IdentifierNotKeyword = createToken({
|
|
71
|
-
name: 'IdentifierNotKeyword',
|
|
72
|
-
pattern: Lexer.NA,
|
|
73
|
-
});
|
|
74
|
-
export const UsingScopeEnumeration = createToken({
|
|
75
|
-
name: 'UsingScopeEnumeration',
|
|
76
|
-
pattern: Lexer.NA,
|
|
77
|
-
});
|
|
78
|
-
export const RParenMismatch = createToken({
|
|
79
|
-
name: 'RParenMismatch',
|
|
80
|
-
pattern: Lexer.NA,
|
|
81
|
-
});
|
|
82
|
-
const identifierRegex = /[a-zA-Z][a-zA-Z0-9_.]*/y;
|
|
83
|
-
function matchIdentifier(text, startOffset) {
|
|
84
|
-
identifierRegex.lastIndex = startOffset;
|
|
85
|
-
const execResult = identifierRegex.exec(text);
|
|
86
|
-
if (execResult && execResult[0].includes('..')) {
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
return execResult;
|
|
90
|
-
}
|
|
91
|
-
export const Identifier = createToken({
|
|
92
|
-
name: 'Identifier',
|
|
93
|
-
pattern: matchIdentifier,
|
|
94
|
-
line_breaks: false,
|
|
95
|
-
categories: [IdentifierNotKeyword],
|
|
96
|
-
start_chars_hint: [
|
|
97
|
-
'a',
|
|
98
|
-
'b',
|
|
99
|
-
'c',
|
|
100
|
-
'd',
|
|
101
|
-
'e',
|
|
102
|
-
'f',
|
|
103
|
-
'g',
|
|
104
|
-
'h',
|
|
105
|
-
'i',
|
|
106
|
-
'j',
|
|
107
|
-
'k',
|
|
108
|
-
'l',
|
|
109
|
-
'm',
|
|
110
|
-
'n',
|
|
111
|
-
'o',
|
|
112
|
-
'p',
|
|
113
|
-
'q',
|
|
114
|
-
'r',
|
|
115
|
-
's',
|
|
116
|
-
't',
|
|
117
|
-
'u',
|
|
118
|
-
'v',
|
|
119
|
-
'w',
|
|
120
|
-
'x',
|
|
121
|
-
'y',
|
|
122
|
-
'z',
|
|
123
|
-
'A',
|
|
124
|
-
'B',
|
|
125
|
-
'C',
|
|
126
|
-
'D',
|
|
127
|
-
'E',
|
|
128
|
-
'F',
|
|
129
|
-
'G',
|
|
130
|
-
'H',
|
|
131
|
-
'I',
|
|
132
|
-
'J',
|
|
133
|
-
'K',
|
|
134
|
-
'L',
|
|
135
|
-
'M',
|
|
136
|
-
'N',
|
|
137
|
-
'O',
|
|
138
|
-
'P',
|
|
139
|
-
'Q',
|
|
140
|
-
'R',
|
|
141
|
-
'S',
|
|
142
|
-
'T',
|
|
143
|
-
'U',
|
|
144
|
-
'V',
|
|
145
|
-
'W',
|
|
146
|
-
'X',
|
|
147
|
-
'Y',
|
|
148
|
-
'Z',
|
|
149
|
-
],
|
|
150
|
-
});
|
|
151
|
-
export const StringIdentifier = createToken({ name: 'StringIdentifier', line_breaks: true, pattern: /(')(?:(?=(\\?))\2.)*?\1/ });
|
|
152
|
-
export const WhiteSpace = createToken({
|
|
153
|
-
name: 'WhiteSpace',
|
|
154
|
-
pattern: /\s+/,
|
|
155
|
-
group: Lexer.SKIPPED,
|
|
156
|
-
});
|
|
157
|
-
export const And = createToken({ name: 'AND', pattern: /AND/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
158
|
-
export const As = createToken({ name: 'AS', pattern: /AS/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
159
|
-
export const Desc = createToken({ name: 'DESC', pattern: /DESC/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
160
|
-
export const Asc = createToken({ name: 'ASC', pattern: /ASC/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
161
|
-
export const OrderBy = createToken({ name: 'ORDER_BY', pattern: /ORDER BY/i, longer_alt: Identifier });
|
|
162
|
-
export const Cube = createToken({ name: 'CUBE', pattern: /CUBE/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
163
|
-
export const Else = createToken({ name: 'ELSE', pattern: /ELSE/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
164
|
-
export const Excludes = createToken({
|
|
165
|
-
name: 'EXCLUDES',
|
|
166
|
-
pattern: /EXCLUDES/i,
|
|
167
|
-
longer_alt: Identifier,
|
|
168
|
-
categories: [Keyword, ReservedKeyword],
|
|
169
|
-
});
|
|
170
|
-
export const False = createToken({ name: 'FALSE', pattern: /FALSE/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
171
|
-
export const First = createToken({ name: 'FIRST', pattern: /FIRST/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
172
|
-
export const From = createToken({ name: 'FROM', pattern: /FROM/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
173
|
-
export const GroupBy = createToken({ name: 'GROUP_BY', pattern: /GROUP BY/i, longer_alt: Identifier });
|
|
174
|
-
export const Having = createToken({ name: 'HAVING', pattern: /HAVING/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
175
|
-
export const In = createToken({ name: 'IN', pattern: /IN/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
176
|
-
export const Includes = createToken({
|
|
177
|
-
name: 'INCLUDES',
|
|
178
|
-
pattern: /INCLUDES/i,
|
|
179
|
-
longer_alt: Identifier,
|
|
180
|
-
categories: [Keyword, ReservedKeyword],
|
|
181
|
-
});
|
|
182
|
-
export const Last = createToken({ name: 'LAST', pattern: /LAST/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
183
|
-
export const Like = createToken({ name: 'LIKE', pattern: /LIKE/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
184
|
-
export const Limit = createToken({ name: 'LIMIT', pattern: /LIMIT/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
185
|
-
export const Not = createToken({ name: 'NOT', pattern: /NOT/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
186
|
-
export const Null = createToken({ name: 'NULL', pattern: /NULL/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
187
|
-
export const Nulls = createToken({ name: 'NULLS', pattern: /NULLS/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
188
|
-
export const Or = createToken({ name: 'OR', pattern: /OR/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
189
|
-
export const Rollup = createToken({ name: 'ROLLUP', pattern: /ROLLUP/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
190
|
-
export const Select = createToken({ name: 'SELECT', pattern: /SELECT/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
191
|
-
export const True = createToken({ name: 'TRUE', pattern: /TRUE/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
192
|
-
export const Using = createToken({ name: 'USING', pattern: /USING/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
193
|
-
export const Where = createToken({ name: 'WHERE', pattern: /WHERE/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
194
|
-
export const With = createToken({ name: 'WITH', pattern: /WITH/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
195
|
-
export const For = createToken({ name: 'FOR', pattern: /FOR/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
196
|
-
export const Update = createToken({ name: 'UPDATE', pattern: /UPDATE/i, longer_alt: Identifier, categories: [Keyword, ReservedKeyword] });
|
|
197
|
-
export const Above = createToken({ name: 'ABOVE', pattern: /ABOVE/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
198
|
-
export const AboveOrBelow = createToken({
|
|
199
|
-
name: 'ABOVE_OR_BELOW',
|
|
200
|
-
pattern: /ABOVE_OR_BELOW/i,
|
|
201
|
-
longer_alt: Identifier,
|
|
202
|
-
categories: [Keyword, Identifier],
|
|
203
|
-
});
|
|
204
|
-
export const ApexNew = createToken({ name: 'new', pattern: /new/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
205
|
-
export const At = createToken({ name: 'AT', pattern: /AT/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
206
|
-
export const Below = createToken({ name: 'BELOW', pattern: /BELOW/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
207
|
-
export const DataCategory = createToken({
|
|
208
|
-
name: 'DATA_CATEGORY',
|
|
209
|
-
pattern: /DATA CATEGORY/i,
|
|
210
|
-
longer_alt: Identifier,
|
|
211
|
-
categories: [Keyword],
|
|
212
|
-
});
|
|
213
|
-
export const End = createToken({ name: 'END', pattern: /END/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
214
|
-
export const Offset = createToken({ name: 'OFFSET', pattern: /OFFSET/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
215
|
-
export const Reference = createToken({
|
|
216
|
-
name: 'REFERENCE',
|
|
217
|
-
pattern: /REFERENCE/i,
|
|
218
|
-
longer_alt: Identifier,
|
|
219
|
-
categories: [Keyword, Identifier],
|
|
220
|
-
});
|
|
221
|
-
export const Scope = createToken({ name: 'SCOPE', pattern: /SCOPE/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
222
|
-
export const Tracking = createToken({ name: 'TRACKING', pattern: /TRACKING/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
223
|
-
export const Then = createToken({ name: 'THEN', pattern: /THEN/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
224
|
-
export const Typeof = createToken({ name: 'TYPEOF', pattern: /TYPEOF/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
225
|
-
export const View = createToken({ name: 'VIEW', pattern: /VIEW/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
226
|
-
export const Viewstat = createToken({ name: 'VIEWSTAT', pattern: /VIEWSTAT/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
227
|
-
export const When = createToken({ name: 'WHEN', pattern: /WHEN/i, longer_alt: Identifier, categories: [Keyword, Identifier] });
|
|
228
|
-
export const SecurityEnforced = createToken({
|
|
229
|
-
name: 'SECURITY_ENFORCED',
|
|
230
|
-
pattern: /SECURITY_ENFORCED/i,
|
|
231
|
-
longer_alt: Identifier,
|
|
232
|
-
categories: [Keyword, Identifier],
|
|
233
|
-
});
|
|
234
|
-
export const SystemMode = createToken({
|
|
235
|
-
name: 'SYSTEM_MODE',
|
|
236
|
-
pattern: /SYSTEM_MODE/i,
|
|
237
|
-
longer_alt: Identifier,
|
|
238
|
-
categories: [Keyword, Identifier],
|
|
239
|
-
});
|
|
240
|
-
export const UserMode = createToken({
|
|
241
|
-
name: 'USER_MODE',
|
|
242
|
-
pattern: /USER_MODE/i,
|
|
243
|
-
longer_alt: Identifier,
|
|
244
|
-
categories: [Keyword, Identifier],
|
|
245
|
-
});
|
|
246
|
-
export const CalendarMonth = createToken({
|
|
247
|
-
name: 'CALENDAR_MONTH',
|
|
248
|
-
pattern: /CALENDAR_MONTH/i,
|
|
249
|
-
longer_alt: Identifier,
|
|
250
|
-
categories: [DateFunction, Identifier],
|
|
251
|
-
});
|
|
252
|
-
export const CalendarQuarter = createToken({
|
|
253
|
-
name: 'CALENDAR_QUARTER',
|
|
254
|
-
pattern: /CALENDAR_QUARTER/i,
|
|
255
|
-
longer_alt: Identifier,
|
|
256
|
-
categories: [DateFunction, Identifier],
|
|
257
|
-
});
|
|
258
|
-
export const CalendarYear = createToken({
|
|
259
|
-
name: 'CALENDAR_YEAR',
|
|
260
|
-
pattern: /CALENDAR_YEAR/i,
|
|
261
|
-
longer_alt: Identifier,
|
|
262
|
-
categories: [DateFunction, Identifier],
|
|
263
|
-
});
|
|
264
|
-
export const DayInMonth = createToken({
|
|
265
|
-
name: 'DAY_IN_MONTH',
|
|
266
|
-
pattern: /DAY_IN_MONTH/i,
|
|
267
|
-
longer_alt: Identifier,
|
|
268
|
-
categories: [DateFunction, Identifier],
|
|
269
|
-
});
|
|
270
|
-
export const DayInWeek = createToken({
|
|
271
|
-
name: 'DAY_IN_WEEK',
|
|
272
|
-
pattern: /DAY_IN_WEEK/i,
|
|
273
|
-
longer_alt: Identifier,
|
|
274
|
-
categories: [DateFunction, Identifier],
|
|
275
|
-
});
|
|
276
|
-
export const DayInYear = createToken({
|
|
277
|
-
name: 'DAY_IN_YEAR',
|
|
278
|
-
pattern: /DAY_IN_YEAR/i,
|
|
279
|
-
longer_alt: Identifier,
|
|
280
|
-
categories: [DateFunction, Identifier],
|
|
281
|
-
});
|
|
282
|
-
export const DayOnly = createToken({
|
|
283
|
-
name: 'DAY_ONLY',
|
|
284
|
-
pattern: /DAY_ONLY/i,
|
|
285
|
-
longer_alt: Identifier,
|
|
286
|
-
categories: [DateFunction, Identifier],
|
|
287
|
-
});
|
|
288
|
-
export const FiscalMonth = createToken({
|
|
289
|
-
name: 'FISCAL_MONTH',
|
|
290
|
-
pattern: /FISCAL_MONTH/i,
|
|
291
|
-
longer_alt: Identifier,
|
|
292
|
-
categories: [DateFunction, Identifier],
|
|
293
|
-
});
|
|
294
|
-
export const FiscalQuarter = createToken({
|
|
295
|
-
name: 'FISCAL_QUARTER',
|
|
296
|
-
pattern: /FISCAL_QUARTER/i,
|
|
297
|
-
longer_alt: Identifier,
|
|
298
|
-
categories: [DateFunction, Identifier],
|
|
299
|
-
});
|
|
300
|
-
export const FiscalYear = createToken({
|
|
301
|
-
name: 'FISCAL_YEAR',
|
|
302
|
-
pattern: /FISCAL_YEAR/i,
|
|
303
|
-
longer_alt: Identifier,
|
|
304
|
-
categories: [DateFunction, Identifier],
|
|
305
|
-
});
|
|
306
|
-
export const HourInDay = createToken({
|
|
307
|
-
name: 'HOUR_IN_DAY',
|
|
308
|
-
pattern: /HOUR_IN_DAY/i,
|
|
309
|
-
longer_alt: Identifier,
|
|
310
|
-
categories: [DateFunction, Identifier],
|
|
311
|
-
});
|
|
312
|
-
export const WeekInMonth = createToken({
|
|
313
|
-
name: 'WEEK_IN_MONTH',
|
|
314
|
-
pattern: /WEEK_IN_MONTH/i,
|
|
315
|
-
longer_alt: Identifier,
|
|
316
|
-
categories: [DateFunction, Identifier],
|
|
317
|
-
});
|
|
318
|
-
export const WeekInYear = createToken({
|
|
319
|
-
name: 'WEEK_IN_YEAR',
|
|
320
|
-
pattern: /WEEK_IN_YEAR/i,
|
|
321
|
-
longer_alt: Identifier,
|
|
322
|
-
categories: [DateFunction, Identifier],
|
|
323
|
-
});
|
|
324
|
-
export const Avg = createToken({ name: 'AVG', pattern: /AVG/i, longer_alt: Identifier, categories: [AggregateFunction, Identifier] });
|
|
325
|
-
export const Count = createToken({ name: 'COUNT', pattern: /COUNT/i, longer_alt: Identifier, categories: [AggregateFunction, Identifier] });
|
|
326
|
-
export const CountDistinct = createToken({
|
|
327
|
-
name: 'COUNT_DISTINCT',
|
|
328
|
-
pattern: /COUNT_DISTINCT/i,
|
|
329
|
-
longer_alt: Identifier,
|
|
330
|
-
categories: [AggregateFunction, Identifier],
|
|
331
|
-
});
|
|
332
|
-
export const Min = createToken({ name: 'MIN', pattern: /MIN/i, longer_alt: Identifier, categories: [AggregateFunction, Identifier] });
|
|
333
|
-
export const Max = createToken({ name: 'MAX', pattern: /MAX/i, longer_alt: Identifier, categories: [AggregateFunction, Identifier] });
|
|
334
|
-
export const Sum = createToken({ name: 'SUM', pattern: /SUM/i, longer_alt: Identifier, categories: [AggregateFunction, Identifier] });
|
|
335
|
-
export const Distance = createToken({
|
|
336
|
-
name: 'DISTANCE',
|
|
337
|
-
pattern: /DISTANCE/i,
|
|
338
|
-
longer_alt: Identifier,
|
|
339
|
-
categories: [LocationFunction, Identifier],
|
|
340
|
-
});
|
|
341
|
-
export const Geolocation = createToken({
|
|
342
|
-
name: 'GEOLOCATION',
|
|
343
|
-
pattern: /GEOLOCATION/i,
|
|
344
|
-
longer_alt: Identifier,
|
|
345
|
-
categories: [LocationFunction, Identifier],
|
|
346
|
-
});
|
|
347
|
-
export const Fields = createToken({
|
|
348
|
-
name: 'FIELDS',
|
|
349
|
-
pattern: /FIELDS/i,
|
|
350
|
-
longer_alt: Identifier,
|
|
351
|
-
categories: [FieldsFunction, Identifier],
|
|
352
|
-
});
|
|
353
|
-
export const Format = createToken({
|
|
354
|
-
name: 'FORMAT',
|
|
355
|
-
pattern: /FORMAT/i,
|
|
356
|
-
longer_alt: Identifier,
|
|
357
|
-
categories: [OtherFunction, Identifier],
|
|
358
|
-
});
|
|
359
|
-
export const Tolabel = createToken({
|
|
360
|
-
name: 'toLabel',
|
|
361
|
-
pattern: /TOLABEL/i,
|
|
362
|
-
longer_alt: Identifier,
|
|
363
|
-
categories: [OtherFunction, Identifier],
|
|
364
|
-
});
|
|
365
|
-
export const ConvertTimeZone = createToken({
|
|
366
|
-
name: 'convertTimezone',
|
|
367
|
-
pattern: /CONVERTTIMEZONE/i,
|
|
368
|
-
longer_alt: Identifier,
|
|
369
|
-
categories: [OtherFunction, Identifier],
|
|
370
|
-
});
|
|
371
|
-
export const ConvertCurrency = createToken({
|
|
372
|
-
name: 'convertCurrency',
|
|
373
|
-
pattern: /CONVERTCURRENCY/i,
|
|
374
|
-
longer_alt: Identifier,
|
|
375
|
-
categories: [OtherFunction, Identifier],
|
|
376
|
-
});
|
|
377
|
-
export const Grouping = createToken({
|
|
378
|
-
name: 'GROUPING',
|
|
379
|
-
pattern: /GROUPING/i,
|
|
380
|
-
longer_alt: Identifier,
|
|
381
|
-
categories: [OtherFunction, Identifier],
|
|
382
|
-
});
|
|
383
|
-
export const All = createToken({
|
|
384
|
-
name: 'ALL',
|
|
385
|
-
pattern: /ALL/i,
|
|
386
|
-
longer_alt: Identifier,
|
|
387
|
-
categories: [FieldsFunctionParamIdentifier, Identifier],
|
|
388
|
-
});
|
|
389
|
-
export const Custom = createToken({
|
|
390
|
-
name: 'CUSTOM',
|
|
391
|
-
pattern: /CUSTOM/i,
|
|
392
|
-
longer_alt: Identifier,
|
|
393
|
-
categories: [FieldsFunctionParamIdentifier, Identifier],
|
|
394
|
-
});
|
|
395
|
-
export const Standard = createToken({
|
|
396
|
-
name: 'STANDARD',
|
|
397
|
-
pattern: /STANDARD/i,
|
|
398
|
-
longer_alt: Identifier,
|
|
399
|
-
categories: [FieldsFunctionParamIdentifier, Identifier],
|
|
400
|
-
});
|
|
401
|
-
export const Yesterday = createToken({
|
|
402
|
-
name: 'YESTERDAY',
|
|
403
|
-
pattern: /YESTERDAY/i,
|
|
404
|
-
longer_alt: Identifier,
|
|
405
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
406
|
-
});
|
|
407
|
-
export const Today = createToken({
|
|
408
|
-
name: 'TODAY',
|
|
409
|
-
pattern: /TODAY/i,
|
|
410
|
-
longer_alt: Identifier,
|
|
411
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
412
|
-
});
|
|
413
|
-
export const Tomorrow = createToken({
|
|
414
|
-
name: 'TOMORROW',
|
|
415
|
-
pattern: /TOMORROW/i,
|
|
416
|
-
longer_alt: Identifier,
|
|
417
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
418
|
-
});
|
|
419
|
-
export const LastWeek = createToken({
|
|
420
|
-
name: 'LAST_WEEK',
|
|
421
|
-
pattern: /LAST_WEEK/i,
|
|
422
|
-
longer_alt: Identifier,
|
|
423
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
424
|
-
});
|
|
425
|
-
export const ThisWeek = createToken({
|
|
426
|
-
name: 'THIS_WEEK',
|
|
427
|
-
pattern: /THIS_WEEK/i,
|
|
428
|
-
longer_alt: Identifier,
|
|
429
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
430
|
-
});
|
|
431
|
-
export const NextWeek = createToken({
|
|
432
|
-
name: 'NEXT_WEEK',
|
|
433
|
-
pattern: /NEXT_WEEK/i,
|
|
434
|
-
longer_alt: Identifier,
|
|
435
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
436
|
-
});
|
|
437
|
-
export const LastMonth = createToken({
|
|
438
|
-
name: 'LAST_MONTH',
|
|
439
|
-
pattern: /LAST_MONTH/i,
|
|
440
|
-
longer_alt: Identifier,
|
|
441
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
442
|
-
});
|
|
443
|
-
export const ThisMonth = createToken({
|
|
444
|
-
name: 'THIS_MONTH',
|
|
445
|
-
pattern: /THIS_MONTH/i,
|
|
446
|
-
longer_alt: Identifier,
|
|
447
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
448
|
-
});
|
|
449
|
-
export const NextMonth = createToken({
|
|
450
|
-
name: 'NEXT_MONTH',
|
|
451
|
-
pattern: /NEXT_MONTH/i,
|
|
452
|
-
longer_alt: Identifier,
|
|
453
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
454
|
-
});
|
|
455
|
-
export const Last90_days = createToken({
|
|
456
|
-
name: 'LAST_90_DAYS',
|
|
457
|
-
pattern: /LAST_90_DAYS/i,
|
|
458
|
-
longer_alt: Identifier,
|
|
459
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
460
|
-
});
|
|
461
|
-
export const Next90_days = createToken({
|
|
462
|
-
name: 'NEXT_90_DAYS',
|
|
463
|
-
pattern: /NEXT_90_DAYS/i,
|
|
464
|
-
longer_alt: Identifier,
|
|
465
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
466
|
-
});
|
|
467
|
-
export const ThisQuarter = createToken({
|
|
468
|
-
name: 'THIS_QUARTER',
|
|
469
|
-
pattern: /THIS_QUARTER/i,
|
|
470
|
-
longer_alt: Identifier,
|
|
471
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
472
|
-
});
|
|
473
|
-
export const LastQuarter = createToken({
|
|
474
|
-
name: 'LAST_QUARTER',
|
|
475
|
-
pattern: /LAST_QUARTER/i,
|
|
476
|
-
longer_alt: Identifier,
|
|
477
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
478
|
-
});
|
|
479
|
-
export const NextQuarter = createToken({
|
|
480
|
-
name: 'NEXT_QUARTER',
|
|
481
|
-
pattern: /NEXT_QUARTER/i,
|
|
482
|
-
longer_alt: Identifier,
|
|
483
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
484
|
-
});
|
|
485
|
-
export const ThisYear = createToken({
|
|
486
|
-
name: 'THIS_YEAR',
|
|
487
|
-
pattern: /THIS_YEAR/i,
|
|
488
|
-
longer_alt: Identifier,
|
|
489
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
490
|
-
});
|
|
491
|
-
export const LastYear = createToken({
|
|
492
|
-
name: 'LAST_YEAR',
|
|
493
|
-
pattern: /LAST_YEAR/i,
|
|
494
|
-
longer_alt: Identifier,
|
|
495
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
496
|
-
});
|
|
497
|
-
export const NextYear = createToken({
|
|
498
|
-
name: 'NEXT_YEAR',
|
|
499
|
-
pattern: /NEXT_YEAR/i,
|
|
500
|
-
longer_alt: Identifier,
|
|
501
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
502
|
-
});
|
|
503
|
-
export const ThisFiscalQuarter = createToken({
|
|
504
|
-
name: 'THIS_FISCAL_QUARTER',
|
|
505
|
-
pattern: /THIS_FISCAL_QUARTER/i,
|
|
506
|
-
longer_alt: Identifier,
|
|
507
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
508
|
-
});
|
|
509
|
-
export const LastFiscalQuarter = createToken({
|
|
510
|
-
name: 'LAST_FISCAL_QUARTER',
|
|
511
|
-
pattern: /LAST_FISCAL_QUARTER/i,
|
|
512
|
-
longer_alt: Identifier,
|
|
513
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
514
|
-
});
|
|
515
|
-
export const NextFiscalQuarter = createToken({
|
|
516
|
-
name: 'NEXT_FISCAL_QUARTER',
|
|
517
|
-
pattern: /NEXT_FISCAL_QUARTER/i,
|
|
518
|
-
longer_alt: Identifier,
|
|
519
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
520
|
-
});
|
|
521
|
-
export const ThisFiscalYear = createToken({
|
|
522
|
-
name: 'THIS_FISCAL_YEAR',
|
|
523
|
-
pattern: /THIS_FISCAL_YEAR/i,
|
|
524
|
-
longer_alt: Identifier,
|
|
525
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
526
|
-
});
|
|
527
|
-
export const LastFiscalYear = createToken({
|
|
528
|
-
name: 'LAST_FISCAL_YEAR',
|
|
529
|
-
pattern: /LAST_FISCAL_YEAR/i,
|
|
530
|
-
longer_alt: Identifier,
|
|
531
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
532
|
-
});
|
|
533
|
-
export const NextFiscalYear = createToken({
|
|
534
|
-
name: 'NEXT_FISCAL_YEAR',
|
|
535
|
-
pattern: /NEXT_FISCAL_YEAR/i,
|
|
536
|
-
longer_alt: Identifier,
|
|
537
|
-
categories: [DateLiteral, Identifier, DateLiteralNotIdentifier],
|
|
538
|
-
});
|
|
539
|
-
export const NextNDays = createToken({
|
|
540
|
-
name: 'NEXT_N_DAYS',
|
|
541
|
-
pattern: /NEXT_N_DAYS/i,
|
|
542
|
-
longer_alt: Identifier,
|
|
543
|
-
categories: [DateNLiteral, Identifier],
|
|
544
|
-
});
|
|
545
|
-
export const LastNDays = createToken({
|
|
546
|
-
name: 'LAST_N_DAYS',
|
|
547
|
-
pattern: /LAST_N_DAYS/i,
|
|
548
|
-
longer_alt: Identifier,
|
|
549
|
-
categories: [DateNLiteral, Identifier],
|
|
550
|
-
});
|
|
551
|
-
export const NDaysAgo = createToken({
|
|
552
|
-
name: 'N_DAYS_AGO',
|
|
553
|
-
pattern: /N_DAYS_AGO/i,
|
|
554
|
-
longer_alt: Identifier,
|
|
555
|
-
categories: [DateNLiteral, Identifier],
|
|
556
|
-
});
|
|
557
|
-
export const NextNWeeks = createToken({
|
|
558
|
-
name: 'NEXT_N_WEEKS',
|
|
559
|
-
pattern: /NEXT_N_WEEKS/i,
|
|
560
|
-
longer_alt: Identifier,
|
|
561
|
-
categories: [DateNLiteral, Identifier],
|
|
562
|
-
});
|
|
563
|
-
export const LastNWeeks = createToken({
|
|
564
|
-
name: 'LAST_N_WEEKS',
|
|
565
|
-
pattern: /LAST_N_WEEKS/i,
|
|
566
|
-
longer_alt: Identifier,
|
|
567
|
-
categories: [DateNLiteral, Identifier],
|
|
568
|
-
});
|
|
569
|
-
export const NWeeksAgo = createToken({
|
|
570
|
-
name: 'N_WEEKS_AGO',
|
|
571
|
-
pattern: /N_WEEKS_AGO/i,
|
|
572
|
-
longer_alt: Identifier,
|
|
573
|
-
categories: [DateNLiteral, Identifier],
|
|
574
|
-
});
|
|
575
|
-
export const NextNMonths = createToken({
|
|
576
|
-
name: 'NEXT_N_MONTHS',
|
|
577
|
-
pattern: /NEXT_N_MONTHS/i,
|
|
578
|
-
longer_alt: Identifier,
|
|
579
|
-
categories: [DateNLiteral, Identifier],
|
|
580
|
-
});
|
|
581
|
-
export const LastNMonths = createToken({
|
|
582
|
-
name: 'LAST_N_MONTHS',
|
|
583
|
-
pattern: /LAST_N_MONTHS/i,
|
|
584
|
-
longer_alt: Identifier,
|
|
585
|
-
categories: [DateNLiteral, Identifier],
|
|
586
|
-
});
|
|
587
|
-
export const NMonthsAgo = createToken({
|
|
588
|
-
name: 'N_MONTHS_AGO',
|
|
589
|
-
pattern: /N_MONTHS_AGO/i,
|
|
590
|
-
longer_alt: Identifier,
|
|
591
|
-
categories: [DateNLiteral, Identifier],
|
|
592
|
-
});
|
|
593
|
-
export const NextNQuarters = createToken({
|
|
594
|
-
name: 'NEXT_N_QUARTERS',
|
|
595
|
-
pattern: /NEXT_N_QUARTERS/i,
|
|
596
|
-
longer_alt: Identifier,
|
|
597
|
-
categories: [DateNLiteral, Identifier],
|
|
598
|
-
});
|
|
599
|
-
export const LastNQuarters = createToken({
|
|
600
|
-
name: 'LAST_N_QUARTERS',
|
|
601
|
-
pattern: /LAST_N_QUARTERS/i,
|
|
602
|
-
longer_alt: Identifier,
|
|
603
|
-
categories: [DateNLiteral, Identifier],
|
|
604
|
-
});
|
|
605
|
-
export const NQuartersAgo = createToken({
|
|
606
|
-
name: 'N_QUARTERS_AGO',
|
|
607
|
-
pattern: /N_QUARTERS_AGO/i,
|
|
608
|
-
longer_alt: Identifier,
|
|
609
|
-
categories: [DateNLiteral, Identifier],
|
|
610
|
-
});
|
|
611
|
-
export const NextNYears = createToken({
|
|
612
|
-
name: 'NEXT_N_YEARS',
|
|
613
|
-
pattern: /NEXT_N_YEARS/i,
|
|
614
|
-
longer_alt: Identifier,
|
|
615
|
-
categories: [DateNLiteral, Identifier],
|
|
616
|
-
});
|
|
617
|
-
export const LastNYears = createToken({
|
|
618
|
-
name: 'LAST_N_YEARS',
|
|
619
|
-
pattern: /LAST_N_YEARS/i,
|
|
620
|
-
longer_alt: Identifier,
|
|
621
|
-
categories: [DateNLiteral, Identifier],
|
|
622
|
-
});
|
|
623
|
-
export const NYearsAgo = createToken({
|
|
624
|
-
name: 'N_YEARS_AGO',
|
|
625
|
-
pattern: /N_YEARS_AGO/i,
|
|
626
|
-
longer_alt: Identifier,
|
|
627
|
-
categories: [DateNLiteral, Identifier],
|
|
628
|
-
});
|
|
629
|
-
export const NextNFiscalQuarters = createToken({
|
|
630
|
-
name: 'NEXT_N_FISCAL_QUARTERS',
|
|
631
|
-
pattern: /NEXT_N_FISCAL_QUARTERS/i,
|
|
632
|
-
longer_alt: Identifier,
|
|
633
|
-
categories: [DateNLiteral, Identifier],
|
|
634
|
-
});
|
|
635
|
-
export const LastNFiscalQuarters = createToken({
|
|
636
|
-
name: 'LAST_N_FISCAL_QUARTERS',
|
|
637
|
-
pattern: /LAST_N_FISCAL_QUARTERS/i,
|
|
638
|
-
longer_alt: Identifier,
|
|
639
|
-
categories: [DateNLiteral, Identifier],
|
|
640
|
-
});
|
|
641
|
-
export const NFiscalQuartersAgo = createToken({
|
|
642
|
-
name: 'N_FISCAL_QUARTERS_AGO',
|
|
643
|
-
pattern: /N_FISCAL_QUARTERS_AGO/i,
|
|
644
|
-
longer_alt: Identifier,
|
|
645
|
-
categories: [DateNLiteral, Identifier],
|
|
646
|
-
});
|
|
647
|
-
export const NextNFiscalYears = createToken({
|
|
648
|
-
name: 'NEXT_N_FISCAL_YEARS',
|
|
649
|
-
pattern: /NEXT_N_FISCAL_YEARS/i,
|
|
650
|
-
longer_alt: Identifier,
|
|
651
|
-
categories: [DateNLiteral, Identifier],
|
|
652
|
-
});
|
|
653
|
-
export const LastNFiscalYears = createToken({
|
|
654
|
-
name: 'LAST_N_FISCAL_YEARS',
|
|
655
|
-
pattern: /LAST_N_FISCAL_YEARS/i,
|
|
656
|
-
longer_alt: Identifier,
|
|
657
|
-
categories: [DateNLiteral, Identifier],
|
|
658
|
-
});
|
|
659
|
-
export const NFiscalYearsAgo = createToken({
|
|
660
|
-
name: 'N_FISCAL_YEARS_AGO',
|
|
661
|
-
pattern: /N_FISCAL_YEARS_AGO/i,
|
|
662
|
-
longer_alt: Identifier,
|
|
663
|
-
categories: [DateNLiteral, Identifier],
|
|
664
|
-
});
|
|
665
|
-
export const Equal = createToken({ name: 'EQUAL', pattern: '=', categories: [RelationalOperator] });
|
|
666
|
-
export const NotEqual = createToken({ name: 'NOT_EQUAL', pattern: /!=|<>/, categories: [RelationalOperator] });
|
|
667
|
-
export const LessThan = createToken({ name: 'LESS_THAN', pattern: '<', categories: [RelationalOperator] });
|
|
668
|
-
export const LessThanOrEqual = createToken({ name: 'LESS_THAN_OR_EQUAL', pattern: '<=', categories: [RelationalOperator] });
|
|
669
|
-
export const GreaterThan = createToken({ name: 'GREATER_THAN', pattern: '>', categories: [RelationalOperator] });
|
|
670
|
-
export const GreaterThanOrEqual = createToken({ name: 'GREATER_THAN_OR_EQUAL', pattern: '>=', categories: [RelationalOperator] });
|
|
671
|
-
export const Decimal = createToken({ name: 'DECIMAL', pattern: '.', categories: [SymbolIdentifier] });
|
|
672
|
-
export const Colon = createToken({ name: 'COLON', pattern: ':', categories: [SymbolIdentifier] });
|
|
673
|
-
export const Semicolon = createToken({ name: 'SEMICOLON', pattern: ';', categories: [SymbolIdentifier] });
|
|
674
|
-
export const Comma = createToken({ name: 'COMMA', pattern: ',', categories: [SymbolIdentifier] });
|
|
675
|
-
export const Asterisk = createToken({ name: 'ASTERISK', pattern: '*', categories: [SymbolIdentifier] });
|
|
676
|
-
export const LParen = createToken({ name: 'L_PAREN', pattern: '(', categories: [SymbolIdentifier] });
|
|
677
|
-
export const RParen = createToken({ name: 'R_PAREN', pattern: ')', categories: [SymbolIdentifier] });
|
|
678
|
-
export const LSquareBracket = createToken({ name: 'L_SQUARE_BRACKET', pattern: '[', categories: [SymbolIdentifier] });
|
|
679
|
-
export const RSquareBracket = createToken({ name: 'R_SQUARE_BRACKET', pattern: ']', categories: [SymbolIdentifier] });
|
|
680
|
-
export const Plus = createToken({ name: 'PLUS', pattern: '+', categories: [SymbolIdentifier] });
|
|
681
|
-
export const Minus = createToken({ name: 'MINUS', pattern: '-', categories: [SymbolIdentifier] });
|
|
682
|
-
export const DateTime = createToken({
|
|
683
|
-
name: 'DATETIME',
|
|
684
|
-
pattern: /[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?(\Z|\.[0-9]+Z|\+[0-9]{2}:[0-9]{2}|\-[0-9]{2}:[0-9]{2}|\+[0-9]{4}|\-[0-9]{4})/i,
|
|
685
|
-
categories: [DateIdentifier],
|
|
686
|
-
});
|
|
687
|
-
export const DateToken = createToken({ name: 'DATE', pattern: /[0-9]{4}-[0-9]{2}-[0-9]{2}/, categories: [DateIdentifier] });
|
|
688
|
-
export const CurrencyPrefixedDecimal = createToken({
|
|
689
|
-
name: 'CURRENCY_PREFIXED_DECIMAL',
|
|
690
|
-
pattern: /[a-zA-Z]{3}[0-9]+\.\d+/,
|
|
691
|
-
longer_alt: Identifier,
|
|
692
|
-
categories: [DecimalNumberIdentifier],
|
|
693
|
-
});
|
|
694
|
-
export const SignedDecimal = createToken({
|
|
695
|
-
name: 'SIGNED_DECIMAL',
|
|
696
|
-
pattern: /(\-|\+)[0-9]*\.\d+/,
|
|
697
|
-
categories: [NumberIdentifier, DecimalNumberIdentifier],
|
|
698
|
-
});
|
|
699
|
-
export const UnsignedDecimal = createToken({
|
|
700
|
-
name: 'UNSIGNED_DECIMAL',
|
|
701
|
-
pattern: /[0-9]*\.\d+/,
|
|
702
|
-
categories: [NumberIdentifier, DecimalNumberIdentifier],
|
|
703
|
-
});
|
|
704
|
-
export const CurrencyPrefixedInteger = createToken({
|
|
705
|
-
name: 'CURRENCY_PREFIXED_INTEGER',
|
|
706
|
-
pattern: /[a-zA-Z]{3}-?[0-9]+/,
|
|
707
|
-
longer_alt: Identifier,
|
|
708
|
-
categories: [DecimalNumberIdentifier, Identifier],
|
|
709
|
-
});
|
|
710
|
-
export const SignedInteger = createToken({
|
|
711
|
-
name: 'SIGNED_INTEGER',
|
|
712
|
-
pattern: /(\-|\+)[0-9]+/,
|
|
713
|
-
categories: [NumberIdentifier, IntegerNumberIdentifier],
|
|
714
|
-
});
|
|
715
|
-
export const GeolocationUnit = createToken({
|
|
716
|
-
name: 'GEOLOCATION_UNIT',
|
|
717
|
-
pattern: /'(mi|km)'/i,
|
|
718
|
-
longer_alt: Identifier,
|
|
719
|
-
categories: [Identifier],
|
|
720
|
-
});
|
|
721
|
-
export const UnsignedInteger = createToken({
|
|
722
|
-
name: 'UNSIGNED_INTEGER',
|
|
723
|
-
pattern: /0|[1-9]\d*/,
|
|
724
|
-
categories: [NumberIdentifier, IntegerNumberIdentifier],
|
|
725
|
-
});
|
|
726
|
-
export const Delegated = createToken({
|
|
727
|
-
name: 'Delegated',
|
|
728
|
-
pattern: /DELEGATED/i,
|
|
729
|
-
longer_alt: Identifier,
|
|
730
|
-
categories: [UsingScopeEnumeration, Identifier],
|
|
731
|
-
start_chars_hint: ['D', 'd'],
|
|
732
|
-
});
|
|
733
|
-
export const Everything = createToken({
|
|
734
|
-
name: 'Everything',
|
|
735
|
-
pattern: /EVERYTHING/i,
|
|
736
|
-
longer_alt: Identifier,
|
|
737
|
-
categories: [UsingScopeEnumeration, Identifier],
|
|
738
|
-
start_chars_hint: ['E', 'e'],
|
|
739
|
-
});
|
|
740
|
-
export const MineAndMyGroups = createToken({
|
|
741
|
-
name: 'MineAndMyGroups',
|
|
742
|
-
pattern: /MINEANDMYGROUPS/i,
|
|
743
|
-
longer_alt: Identifier,
|
|
744
|
-
categories: [UsingScopeEnumeration, Identifier],
|
|
745
|
-
start_chars_hint: ['M', 'm'],
|
|
746
|
-
});
|
|
747
|
-
export const Mine = createToken({
|
|
748
|
-
name: 'Mine',
|
|
749
|
-
pattern: /MINE/i,
|
|
750
|
-
longer_alt: Identifier,
|
|
751
|
-
categories: [UsingScopeEnumeration, Identifier],
|
|
752
|
-
start_chars_hint: ['M', 'm'],
|
|
753
|
-
});
|
|
754
|
-
export const MyTerritory = createToken({
|
|
755
|
-
name: 'MyTerritory',
|
|
756
|
-
pattern: /MY_TERRITORY/i,
|
|
757
|
-
longer_alt: Identifier,
|
|
758
|
-
categories: [UsingScopeEnumeration, Identifier],
|
|
759
|
-
start_chars_hint: ['M', 'm'],
|
|
760
|
-
});
|
|
761
|
-
export const MyTeamTerritory = createToken({
|
|
762
|
-
name: 'MyTeamTerritory',
|
|
763
|
-
pattern: /MY_TEAM_TERRITORY/i,
|
|
764
|
-
longer_alt: Identifier,
|
|
765
|
-
categories: [UsingScopeEnumeration, Identifier],
|
|
766
|
-
start_chars_hint: ['M', 'm'],
|
|
767
|
-
});
|
|
768
|
-
export const Team = createToken({
|
|
769
|
-
name: 'Team',
|
|
770
|
-
pattern: /TEAM/i,
|
|
771
|
-
longer_alt: Identifier,
|
|
772
|
-
categories: [UsingScopeEnumeration, Identifier],
|
|
773
|
-
start_chars_hint: ['T', 't'],
|
|
774
|
-
});
|
|
775
|
-
export const AllPrivate = createToken({
|
|
776
|
-
name: 'AllPrivate',
|
|
777
|
-
pattern: /ALLPRIVATE/i,
|
|
778
|
-
longer_alt: Identifier,
|
|
779
|
-
categories: [UsingScopeEnumeration, Identifier],
|
|
780
|
-
start_chars_hint: ['A', 'a'],
|
|
781
|
-
});
|
|
782
|
-
export const allTokens = [
|
|
783
|
-
WhiteSpace,
|
|
784
|
-
And,
|
|
785
|
-
Asc,
|
|
786
|
-
As,
|
|
787
|
-
OrderBy,
|
|
788
|
-
Cube,
|
|
789
|
-
Desc,
|
|
790
|
-
Else,
|
|
791
|
-
Excludes,
|
|
792
|
-
False,
|
|
793
|
-
First,
|
|
794
|
-
From,
|
|
795
|
-
Grouping,
|
|
796
|
-
GroupBy,
|
|
797
|
-
Having,
|
|
798
|
-
Includes,
|
|
799
|
-
Like,
|
|
800
|
-
Limit,
|
|
801
|
-
Nulls,
|
|
802
|
-
Null,
|
|
803
|
-
Rollup,
|
|
804
|
-
Select,
|
|
805
|
-
True,
|
|
806
|
-
Using,
|
|
807
|
-
Where,
|
|
808
|
-
With,
|
|
809
|
-
Update,
|
|
810
|
-
Delegated,
|
|
811
|
-
Everything,
|
|
812
|
-
MineAndMyGroups,
|
|
813
|
-
Mine,
|
|
814
|
-
MyTerritory,
|
|
815
|
-
MyTeamTerritory,
|
|
816
|
-
Team,
|
|
817
|
-
AllPrivate,
|
|
818
|
-
AboveOrBelow,
|
|
819
|
-
Above,
|
|
820
|
-
ApexNew,
|
|
821
|
-
At,
|
|
822
|
-
Below,
|
|
823
|
-
DataCategory,
|
|
824
|
-
End,
|
|
825
|
-
Offset,
|
|
826
|
-
Reference,
|
|
827
|
-
Scope,
|
|
828
|
-
Tracking,
|
|
829
|
-
Then,
|
|
830
|
-
Typeof,
|
|
831
|
-
Viewstat,
|
|
832
|
-
View,
|
|
833
|
-
When,
|
|
834
|
-
SecurityEnforced,
|
|
835
|
-
SystemMode,
|
|
836
|
-
UserMode,
|
|
837
|
-
CalendarMonth,
|
|
838
|
-
CalendarQuarter,
|
|
839
|
-
CalendarYear,
|
|
840
|
-
DayInMonth,
|
|
841
|
-
DayInWeek,
|
|
842
|
-
DayInYear,
|
|
843
|
-
DayOnly,
|
|
844
|
-
FiscalMonth,
|
|
845
|
-
FiscalQuarter,
|
|
846
|
-
FiscalYear,
|
|
847
|
-
HourInDay,
|
|
848
|
-
WeekInMonth,
|
|
849
|
-
WeekInYear,
|
|
850
|
-
Avg,
|
|
851
|
-
CountDistinct,
|
|
852
|
-
Count,
|
|
853
|
-
Min,
|
|
854
|
-
Max,
|
|
855
|
-
Sum,
|
|
856
|
-
Distance,
|
|
857
|
-
Geolocation,
|
|
858
|
-
Fields,
|
|
859
|
-
Format,
|
|
860
|
-
Tolabel,
|
|
861
|
-
ConvertTimeZone,
|
|
862
|
-
ConvertCurrency,
|
|
863
|
-
Yesterday,
|
|
864
|
-
Today,
|
|
865
|
-
Tomorrow,
|
|
866
|
-
LastWeek,
|
|
867
|
-
ThisWeek,
|
|
868
|
-
NextWeek,
|
|
869
|
-
LastMonth,
|
|
870
|
-
ThisMonth,
|
|
871
|
-
NextMonth,
|
|
872
|
-
Last90_days,
|
|
873
|
-
Next90_days,
|
|
874
|
-
ThisQuarter,
|
|
875
|
-
LastQuarter,
|
|
876
|
-
NextQuarter,
|
|
877
|
-
ThisYear,
|
|
878
|
-
LastYear,
|
|
879
|
-
NextYear,
|
|
880
|
-
ThisFiscalQuarter,
|
|
881
|
-
LastFiscalQuarter,
|
|
882
|
-
NextFiscalQuarter,
|
|
883
|
-
ThisFiscalYear,
|
|
884
|
-
LastFiscalYear,
|
|
885
|
-
NextFiscalYear,
|
|
886
|
-
NextNDays,
|
|
887
|
-
LastNDays,
|
|
888
|
-
NDaysAgo,
|
|
889
|
-
NextNWeeks,
|
|
890
|
-
LastNWeeks,
|
|
891
|
-
NWeeksAgo,
|
|
892
|
-
NextNMonths,
|
|
893
|
-
LastNMonths,
|
|
894
|
-
NMonthsAgo,
|
|
895
|
-
NextNQuarters,
|
|
896
|
-
LastNQuarters,
|
|
897
|
-
NQuartersAgo,
|
|
898
|
-
NextNYears,
|
|
899
|
-
LastNYears,
|
|
900
|
-
NYearsAgo,
|
|
901
|
-
NextNFiscalQuarters,
|
|
902
|
-
LastNFiscalQuarters,
|
|
903
|
-
NFiscalQuartersAgo,
|
|
904
|
-
NextNFiscalYears,
|
|
905
|
-
LastNFiscalYears,
|
|
906
|
-
NFiscalYearsAgo,
|
|
907
|
-
GeolocationUnit,
|
|
908
|
-
All,
|
|
909
|
-
Custom,
|
|
910
|
-
Standard,
|
|
911
|
-
In,
|
|
912
|
-
For,
|
|
913
|
-
Or,
|
|
914
|
-
Last,
|
|
915
|
-
Not,
|
|
916
|
-
CurrencyPrefixedDecimal,
|
|
917
|
-
CurrencyPrefixedInteger,
|
|
918
|
-
StringIdentifier,
|
|
919
|
-
Identifier,
|
|
920
|
-
DateTime,
|
|
921
|
-
DateToken,
|
|
922
|
-
SignedDecimal,
|
|
923
|
-
UnsignedDecimal,
|
|
924
|
-
UnsignedInteger,
|
|
925
|
-
SignedInteger,
|
|
926
|
-
Equal,
|
|
927
|
-
NotEqual,
|
|
928
|
-
LessThanOrEqual,
|
|
929
|
-
LessThan,
|
|
930
|
-
GreaterThanOrEqual,
|
|
931
|
-
GreaterThan,
|
|
932
|
-
Decimal,
|
|
933
|
-
Colon,
|
|
934
|
-
Semicolon,
|
|
935
|
-
Comma,
|
|
936
|
-
Asterisk,
|
|
937
|
-
LParen,
|
|
938
|
-
RParen,
|
|
939
|
-
LSquareBracket,
|
|
940
|
-
RSquareBracket,
|
|
941
|
-
Plus,
|
|
942
|
-
Minus,
|
|
943
|
-
];
|
|
944
|
-
const SoqlLexer = new Lexer(allTokens, { ensureOptimizations: true, skipValidations: false });
|
|
945
|
-
export function lex(soql) {
|
|
946
|
-
return SoqlLexer.tokenize(soql);
|
|
947
|
-
}
|