@surrealdb/lezer 1.0.4 → 1.0.5
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/.turbo/turbo-build.log +3 -3
- package/dist/index.cjs +16 -16
- package/dist/index.js +16 -16
- package/package.json +1 -1
- package/src/parser.js +16 -16
- package/src/parser.terms.js +170 -169
- package/src/surrealql.grammar +47 -43
- package/test/misc/comments.txt +5 -5
- package/test/misc/functions.txt +3 -3
- package/test/misc/identifiers.txt +4 -4
- package/test/misc/javascript.txt +1 -1
- package/test/misc/operators.txt +10 -10
- package/test/misc/subqueries.txt +1 -1
- package/test/statements/create.txt +2 -2
- package/test/statements/define.txt +4 -4
- package/test/statements/delete.txt +1 -1
- package/test/statements/for.txt +1 -1
- package/test/statements/if-else.txt +6 -6
- package/test/statements/insert.txt +2 -2
- package/test/statements/let.txt +3 -3
- package/test/statements/live.txt +1 -1
- package/test/statements/return.txt +2 -2
- package/test/statements/select.txt +8 -8
- package/test/statements/show.txt +2 -2
- package/test/statements/update.txt +7 -7
- package/test/statements/upsert.txt +3 -3
- package/test/values/arrays.txt +5 -5
- package/test/values/closures.txt +3 -3
- package/test/values/format-strings.txt +3 -3
- package/test/values/geometries.txt +3 -3
- package/test/values/idioms.txt +8 -8
- package/test/values/numbers.txt +8 -8
- package/test/values/objects.txt +6 -6
- package/test/values/ranges.txt +3 -3
- package/test/values/record-ids.txt +2 -2
- package/test/values/sets.txt +3 -3
package/src/parser.terms.js
CHANGED
|
@@ -217,172 +217,173 @@ export const
|
|
|
217
217
|
LiveSelectStatement = 210,
|
|
218
218
|
Predicate = 211,
|
|
219
219
|
prefixedString = 212,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
220
|
+
Number = 213,
|
|
221
|
+
Int = 214,
|
|
222
|
+
Float = 215,
|
|
223
|
+
Decimal = 216,
|
|
224
|
+
Array = 219,
|
|
225
|
+
Set = 222,
|
|
226
|
+
RecordId = 223,
|
|
227
|
+
RecordTbIdent = 224,
|
|
228
|
+
RecordIdIdent = 226,
|
|
229
|
+
Object = 227,
|
|
230
|
+
ObjectContent = 228,
|
|
231
|
+
ObjectProperty = 229,
|
|
232
|
+
ObjectKey = 230,
|
|
233
|
+
RecordIdRange = 233,
|
|
234
|
+
Duration = 234,
|
|
235
|
+
DurationPart = 235,
|
|
236
|
+
FormatString = 237,
|
|
237
|
+
Interpolation = 238,
|
|
238
|
+
Regex = 239,
|
|
239
|
+
VariableName = 240,
|
|
240
|
+
FunctionJs = 242,
|
|
241
|
+
ArgumentList = 244,
|
|
242
|
+
IfElseStatement = 245,
|
|
243
|
+
Block = 247,
|
|
244
|
+
SubQuery = 248,
|
|
245
|
+
LetStatement = 250,
|
|
246
|
+
paramDefinition = 251,
|
|
247
|
+
LiteralType = 257,
|
|
248
|
+
ObjectTypeContent = 260,
|
|
249
|
+
ObjectTypeProperty = 261,
|
|
250
|
+
DeleteStatement = 264,
|
|
251
|
+
WhereClause = 265,
|
|
252
|
+
ReturnClause = 266,
|
|
253
|
+
Fields = 267,
|
|
254
|
+
AnyStar = 268,
|
|
255
|
+
TimeoutClause = 269,
|
|
256
|
+
ParallelClause = 270,
|
|
257
|
+
CreateStatement = 271,
|
|
258
|
+
FunctionCall = 272,
|
|
259
|
+
FunctionName = 273,
|
|
260
|
+
customFunctionName = 274,
|
|
261
|
+
VersionNumber = 276,
|
|
262
|
+
ContentClause = 277,
|
|
263
|
+
SetClause = 278,
|
|
264
|
+
FieldAssignment = 279,
|
|
265
|
+
assignmentOperator = 280,
|
|
266
|
+
UnsetClause = 281,
|
|
267
|
+
SelectStatement = 282,
|
|
268
|
+
OmitClause = 283,
|
|
269
|
+
WithClause = 284,
|
|
270
|
+
SplitClause = 285,
|
|
271
|
+
Idiom = 286,
|
|
272
|
+
GroupClause = 287,
|
|
273
|
+
OrderClause = 288,
|
|
274
|
+
Order = 289,
|
|
275
|
+
LimitStartComboClause = 290,
|
|
276
|
+
StartClause = 291,
|
|
277
|
+
LimitClause = 292,
|
|
278
|
+
FetchClause = 293,
|
|
279
|
+
TempfilesClause = 294,
|
|
280
|
+
ExplainClause = 295,
|
|
281
|
+
VersionClause = 296,
|
|
282
|
+
RelateStatement = 297,
|
|
283
|
+
UpdateStatement = 300,
|
|
284
|
+
MergeClause = 301,
|
|
285
|
+
PatchClause = 302,
|
|
286
|
+
ReplaceClause = 303,
|
|
287
|
+
RemoveStatement = 304,
|
|
288
|
+
IfExistsClause = 305,
|
|
289
|
+
OnTableClause = 306,
|
|
290
|
+
functionKw = 307,
|
|
291
|
+
UpsertStatement = 308,
|
|
292
|
+
ReturnStatement = 309,
|
|
293
|
+
AlterStatement = 310,
|
|
294
|
+
IfNotExistsClause = 311,
|
|
295
|
+
PermissionsForClause = 312,
|
|
296
|
+
PermissionGroup = 313,
|
|
297
|
+
CommentClause = 314,
|
|
298
|
+
DefineStatement = 315,
|
|
299
|
+
OverwriteClause = 317,
|
|
300
|
+
OnRootNsDbClause = 318,
|
|
301
|
+
AccessTypeClause = 319,
|
|
302
|
+
JwtClause = 320,
|
|
303
|
+
SignupClause = 321,
|
|
304
|
+
SigninClause = 322,
|
|
305
|
+
AuthenticateClause = 323,
|
|
306
|
+
DurationClause = 324,
|
|
307
|
+
DurationValue = 325,
|
|
308
|
+
TokenTypeClause = 326,
|
|
309
|
+
TypeClause = 329,
|
|
310
|
+
DefaultClause = 330,
|
|
311
|
+
ReadonlyClause = 332,
|
|
312
|
+
ValueClause = 333,
|
|
313
|
+
AssertClause = 334,
|
|
314
|
+
ReferenceClause = 335,
|
|
315
|
+
ComputedClause = 336,
|
|
316
|
+
FieldsColumnsClause = 337,
|
|
317
|
+
IndexClause = 338,
|
|
318
|
+
UniqueClause = 339,
|
|
319
|
+
SearchAnalyzerClause = 340,
|
|
320
|
+
Bm25Clause = 341,
|
|
321
|
+
DocIdsOrderClause = 342,
|
|
322
|
+
DocLenghtsOrderClause = 343,
|
|
323
|
+
PostingsOrderClause = 344,
|
|
324
|
+
TermsOrderClause = 345,
|
|
325
|
+
DocIdsCacheClause = 346,
|
|
326
|
+
DocLenghtsCacheClause = 347,
|
|
327
|
+
PostingsCacheClause = 348,
|
|
328
|
+
TermsCacheClause = 349,
|
|
329
|
+
MtreeClause = 350,
|
|
330
|
+
IndexDimensionClause = 351,
|
|
331
|
+
MtreeDistClause = 352,
|
|
332
|
+
IndexCapacityClause = 353,
|
|
333
|
+
MtreeCacheClause = 354,
|
|
334
|
+
HnswClause = 355,
|
|
335
|
+
HnswDistClause = 356,
|
|
336
|
+
IndexLmClause = 357,
|
|
337
|
+
IndexM0Clause = 358,
|
|
338
|
+
IndexMClause = 359,
|
|
339
|
+
IndexEfcClause = 360,
|
|
340
|
+
IndexExtendCandidatesClause = 361,
|
|
341
|
+
IndexKeepPrunedConnectionsClause = 362,
|
|
342
|
+
TokenizersClause = 365,
|
|
343
|
+
FiltersClause = 366,
|
|
344
|
+
AnalyzerFilters = 367,
|
|
345
|
+
FunctionClause = 368,
|
|
346
|
+
PermissionsBasicClause = 369,
|
|
347
|
+
SessionClause = 371,
|
|
348
|
+
TableTypeClause = 372,
|
|
349
|
+
TableViewClause = 374,
|
|
350
|
+
ChangefeedClause = 375,
|
|
351
|
+
ApiOptions = 376,
|
|
352
|
+
MiddlewareClause = 377,
|
|
353
|
+
HttpMethod = 378,
|
|
354
|
+
BackendClause = 379,
|
|
355
|
+
RebuildStatement = 380,
|
|
356
|
+
InsertStatement = 381,
|
|
357
|
+
JavaScriptBlock = 383,
|
|
358
|
+
Closure = 385,
|
|
359
|
+
escapedParamDefinition = 386,
|
|
360
|
+
TypeCast = 388,
|
|
361
|
+
BinaryExpression = 389,
|
|
362
|
+
Operator = 390,
|
|
363
|
+
Range = 391,
|
|
364
|
+
Path = 392,
|
|
365
|
+
Lookup = 393,
|
|
366
|
+
Any = 396,
|
|
367
|
+
LookupSelection = 397,
|
|
368
|
+
GraphPredicate = 399,
|
|
369
|
+
Optional = 405,
|
|
370
|
+
At = 406,
|
|
371
|
+
IdiomFunction = 407,
|
|
372
|
+
Destructure = 409,
|
|
373
|
+
Recurse = 410,
|
|
374
|
+
RecurseRange = 411,
|
|
375
|
+
RecurseOptions = 412,
|
|
376
|
+
recurseOptionName = 413,
|
|
377
|
+
ShowStatement = 416,
|
|
378
|
+
SleepStatement = 417,
|
|
379
|
+
UseStatement = 418,
|
|
380
|
+
OptionStatement = 419,
|
|
381
|
+
BreakStatement = 420,
|
|
382
|
+
ContinueStatement = 421,
|
|
383
|
+
ForStatement = 422,
|
|
384
|
+
ThrowStatement = 423,
|
|
385
|
+
PermissionInput = 424,
|
|
386
|
+
IndexInput = 425,
|
|
387
|
+
CombinedResults = 426,
|
|
388
|
+
CommentResult = 428,
|
|
389
|
+
Syntax = 430
|
package/src/surrealql.grammar
CHANGED
|
@@ -778,7 +778,7 @@ ShowStatement {
|
|
|
778
778
|
show changes for table
|
|
779
779
|
Ident
|
|
780
780
|
( since String )?
|
|
781
|
-
( limit
|
|
781
|
+
( limit Number )?
|
|
782
782
|
}
|
|
783
783
|
|
|
784
784
|
// Sleep statement
|
|
@@ -816,30 +816,34 @@ RebuildStatement[since=1_5_0] {
|
|
|
816
816
|
|
|
817
817
|
// Values
|
|
818
818
|
|
|
819
|
-
|
|
819
|
+
computedValue[@isGroup=Value] {
|
|
820
820
|
String |
|
|
821
821
|
prefixedString |
|
|
822
|
-
|
|
823
|
-
number |
|
|
822
|
+
Number |
|
|
824
823
|
true |
|
|
825
824
|
false |
|
|
826
825
|
null |
|
|
827
826
|
none |
|
|
828
|
-
Regex |
|
|
829
|
-
VariableName |
|
|
830
|
-
Ident[@dynamicPrecedence=-1] { rawident } |
|
|
831
827
|
Array |
|
|
832
828
|
Set |
|
|
833
829
|
RecordId |
|
|
830
|
+
Object |
|
|
831
|
+
Duration |
|
|
832
|
+
Point { "(" Number "," Number ")" }
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
baseValue[@isGroup=Value] {
|
|
836
|
+
computedValue |
|
|
837
|
+
FormatString |
|
|
838
|
+
Regex |
|
|
839
|
+
VariableName |
|
|
840
|
+
Ident[@dynamicPrecedence=-1] { rawident } |
|
|
834
841
|
FunctionJs |
|
|
835
842
|
FunctionCall |
|
|
836
843
|
SubQuery |
|
|
837
844
|
Block |
|
|
838
845
|
Closure |
|
|
839
|
-
|
|
840
|
-
TypeCast |
|
|
841
|
-
Duration |
|
|
842
|
-
Point { "(" number "," number ")" }
|
|
846
|
+
TypeCast
|
|
843
847
|
}
|
|
844
848
|
|
|
845
849
|
value[@isGroup=Value] {
|
|
@@ -940,11 +944,11 @@ Recurse[since=2_1_0] {
|
|
|
940
944
|
}
|
|
941
945
|
|
|
942
946
|
RecurseRange {
|
|
943
|
-
|
|
947
|
+
Number |
|
|
944
948
|
rangeOpOpenBoth |
|
|
945
|
-
|
|
946
|
-
rangeOpOpenLeft
|
|
947
|
-
|
|
949
|
+
Number rangeOpOpenRight |
|
|
950
|
+
rangeOpOpenLeft Number |
|
|
951
|
+
Number rangeOp Number
|
|
948
952
|
}
|
|
949
953
|
|
|
950
954
|
RecurseOptions[since=2_2_0] {
|
|
@@ -1005,7 +1009,7 @@ RecordTbIdent {
|
|
|
1005
1009
|
bracketIdent
|
|
1006
1010
|
}
|
|
1007
1011
|
|
|
1008
|
-
// Ideally we match "
|
|
1012
|
+
// Ideally we match "Number" here, but I cannot for the life of me get it to
|
|
1009
1013
|
// fall back to numberident after. This will suffice for now.
|
|
1010
1014
|
RecordIdIdent {
|
|
1011
1015
|
numberident |
|
|
@@ -1199,15 +1203,15 @@ SearchAnalyzerClause {
|
|
|
1199
1203
|
)*
|
|
1200
1204
|
}
|
|
1201
1205
|
|
|
1202
|
-
Bm25Clause { bm25 ( "("
|
|
1203
|
-
DocIdsCacheClause { doc_ids_cache
|
|
1204
|
-
DocIdsOrderClause { doc_ids_order
|
|
1205
|
-
DocLenghtsCacheClause { doc_lengths_cache
|
|
1206
|
-
DocLenghtsOrderClause { doc_lengths_order
|
|
1207
|
-
PostingsCacheClause { postings_cache
|
|
1208
|
-
PostingsOrderClause { postings_order
|
|
1209
|
-
TermsCacheClause { terms_cache
|
|
1210
|
-
TermsOrderClause { terms_order
|
|
1206
|
+
Bm25Clause { bm25 ( "(" Number "," Number ")")? }
|
|
1207
|
+
DocIdsCacheClause { doc_ids_cache Number }
|
|
1208
|
+
DocIdsOrderClause { doc_ids_order Number }
|
|
1209
|
+
DocLenghtsCacheClause { doc_lengths_cache Number }
|
|
1210
|
+
DocLenghtsOrderClause { doc_lengths_order Number }
|
|
1211
|
+
PostingsCacheClause { postings_cache Number }
|
|
1212
|
+
PostingsOrderClause { postings_order Number }
|
|
1213
|
+
TermsCacheClause { terms_cache Number }
|
|
1214
|
+
TermsOrderClause { terms_order Number }
|
|
1211
1215
|
|
|
1212
1216
|
MtreeClause[since=1_3_0] {
|
|
1213
1217
|
mtree
|
|
@@ -1222,7 +1226,7 @@ MtreeClause[since=1_3_0] {
|
|
|
1222
1226
|
)*
|
|
1223
1227
|
}
|
|
1224
1228
|
|
|
1225
|
-
MtreeCacheClause { mtree_cache
|
|
1229
|
+
MtreeCacheClause { mtree_cache Number }
|
|
1226
1230
|
MtreeDistClause { dist ( Distance ) }
|
|
1227
1231
|
|
|
1228
1232
|
HnswClause[since=1_5_0] {
|
|
@@ -1241,14 +1245,14 @@ IndexDimensionClause
|
|
|
1241
1245
|
)*
|
|
1242
1246
|
}
|
|
1243
1247
|
|
|
1244
|
-
HnswDistClause { dist ( Distance | ( minkowski
|
|
1248
|
+
HnswDistClause { dist ( Distance | ( minkowski Number )) }
|
|
1245
1249
|
|
|
1246
|
-
IndexDimensionClause { dimension
|
|
1247
|
-
IndexCapacityClause { capacity
|
|
1248
|
-
IndexLmClause { lm
|
|
1249
|
-
IndexM0Clause { m0
|
|
1250
|
-
IndexMClause { m
|
|
1251
|
-
IndexEfcClause { efc
|
|
1250
|
+
IndexDimensionClause { dimension Number }
|
|
1251
|
+
IndexCapacityClause { capacity Number }
|
|
1252
|
+
IndexLmClause { lm Number }
|
|
1253
|
+
IndexM0Clause { m0 Number }
|
|
1254
|
+
IndexMClause { m Number }
|
|
1255
|
+
IndexEfcClause { efc Number }
|
|
1252
1256
|
IndexExtendCandidatesClause { extend_candidates }
|
|
1253
1257
|
IndexKeepPrunedConnectionsClause { keep_pruned_connections }
|
|
1254
1258
|
|
|
@@ -1304,19 +1308,19 @@ TempfilesClause[since=2_0_0] {
|
|
|
1304
1308
|
|
|
1305
1309
|
FetchClause {
|
|
1306
1310
|
fetch
|
|
1307
|
-
commaSep<
|
|
1311
|
+
commaSep<Idiom>
|
|
1308
1312
|
}
|
|
1309
1313
|
|
|
1310
1314
|
StartClause {
|
|
1311
1315
|
start
|
|
1312
1316
|
at?
|
|
1313
|
-
(
|
|
1317
|
+
(Number | VariableName)
|
|
1314
1318
|
}
|
|
1315
1319
|
|
|
1316
1320
|
LimitClause {
|
|
1317
1321
|
limit
|
|
1318
1322
|
by?
|
|
1319
|
-
(
|
|
1323
|
+
(Number | VariableName)
|
|
1320
1324
|
}
|
|
1321
1325
|
|
|
1322
1326
|
LimitStartComboClause {
|
|
@@ -1465,7 +1469,7 @@ BackendClause {
|
|
|
1465
1469
|
// Support
|
|
1466
1470
|
|
|
1467
1471
|
AnalyzerFilters {
|
|
1468
|
-
Filter ("(" (
|
|
1472
|
+
Filter ("(" (Number "," Number | Ident) ")")?
|
|
1469
1473
|
}
|
|
1470
1474
|
|
|
1471
1475
|
Order {
|
|
@@ -1488,11 +1492,11 @@ inclusivePredicate {
|
|
|
1488
1492
|
|
|
1489
1493
|
LiteralType[since=2_0_0] {
|
|
1490
1494
|
String |
|
|
1491
|
-
|
|
1495
|
+
Number |
|
|
1492
1496
|
Duration |
|
|
1493
1497
|
ArrayType { "[" commaSep<type> "]" } |
|
|
1494
1498
|
ObjectType { objectOpen ObjectTypeContent? "}" }
|
|
1495
|
-
// TODO support
|
|
1499
|
+
// TODO support Number and duration types
|
|
1496
1500
|
}
|
|
1497
1501
|
|
|
1498
1502
|
singleType {
|
|
@@ -1527,7 +1531,7 @@ Ident {
|
|
|
1527
1531
|
tickIdent
|
|
1528
1532
|
}
|
|
1529
1533
|
|
|
1530
|
-
|
|
1534
|
+
Number { ("-" | "+")? (Int | Float | Decimal) }
|
|
1531
1535
|
|
|
1532
1536
|
Operator {
|
|
1533
1537
|
binaryOperator |
|
|
@@ -1536,11 +1540,11 @@ Operator {
|
|
|
1536
1540
|
is | ( is opNot ) |
|
|
1537
1541
|
in | ( opNot opIn ) |
|
|
1538
1542
|
|
|
1539
|
-
( "@"
|
|
1543
|
+
( "@" Number "@" ) |
|
|
1540
1544
|
(
|
|
1541
1545
|
"<|"
|
|
1542
|
-
|
|
1543
|
-
( "," (
|
|
1546
|
+
Number
|
|
1547
|
+
( "," ( Number | Distance | ( minkowski Number ) ) )
|
|
1544
1548
|
"|>"
|
|
1545
1549
|
)
|
|
1546
1550
|
}
|
package/test/misc/comments.txt
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
==>
|
|
7
7
|
|
|
8
|
-
SurrealQL(Comment,Int)
|
|
8
|
+
SurrealQL(Comment,Number(Int))
|
|
9
9
|
|
|
10
10
|
# Dash comment
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@ SurrealQL(Comment,Int)
|
|
|
14
14
|
|
|
15
15
|
==>
|
|
16
16
|
|
|
17
|
-
SurrealQL(Comment,Int)
|
|
17
|
+
SurrealQL(Comment,Number(Int))
|
|
18
18
|
|
|
19
19
|
# Slash comment
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ SurrealQL(Comment,Int)
|
|
|
23
23
|
|
|
24
24
|
==>
|
|
25
25
|
|
|
26
|
-
SurrealQL(Comment,Int)
|
|
26
|
+
SurrealQL(Comment,Number(Int))
|
|
27
27
|
|
|
28
28
|
# Block comment
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ SurrealQL(Comment,Int)
|
|
|
33
33
|
|
|
34
34
|
==>
|
|
35
35
|
|
|
36
|
-
SurrealQL(BinaryExpression(Int,BlockComment,Operator,Int))
|
|
36
|
+
SurrealQL(BinaryExpression(Number(Int),BlockComment,Operator,Number(Int)))
|
|
37
37
|
|
|
38
38
|
# Block comment standalone
|
|
39
39
|
|
|
@@ -41,4 +41,4 @@ SurrealQL(BinaryExpression(Int,BlockComment,Operator,Int))
|
|
|
41
41
|
|
|
42
42
|
==>
|
|
43
43
|
|
|
44
|
-
SurrealQL(BlockComment,Int)
|
|
44
|
+
SurrealQL(BlockComment,Number(Int))
|
package/test/misc/functions.txt
CHANGED
|
@@ -12,7 +12,7 @@ fn::one::two(1, a)
|
|
|
12
12
|
|
|
13
13
|
==>
|
|
14
14
|
|
|
15
|
-
SurrealQL(FunctionCall(FunctionName,ArgumentList(Int,Ident)))
|
|
15
|
+
SurrealQL(FunctionCall(FunctionName,ArgumentList(Number(Int),Ident)))
|
|
16
16
|
|
|
17
17
|
# Rand function
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ rand(3)
|
|
|
20
20
|
|
|
21
21
|
==>
|
|
22
22
|
|
|
23
|
-
SurrealQL(FunctionCall(FunctionName,ArgumentList(Int)))
|
|
23
|
+
SurrealQL(FunctionCall(FunctionName,ArgumentList(Number(Int))))
|
|
24
24
|
|
|
25
25
|
# Count function
|
|
26
26
|
|
|
@@ -60,4 +60,4 @@ $func(1)
|
|
|
60
60
|
|
|
61
61
|
==>
|
|
62
62
|
|
|
63
|
-
SurrealQL(FunctionCall(VariableName,ArgumentList(Int)))
|
|
63
|
+
SurrealQL(FunctionCall(VariableName,ArgumentList(Number(Int))))
|
|
@@ -16,7 +16,7 @@ create bla set true = 1, false = 2, null = 3, none = 4
|
|
|
16
16
|
SurrealQL(CreateStatement(
|
|
17
17
|
Keyword,Ident,
|
|
18
18
|
SetClause( Keyword,
|
|
19
|
-
FieldAssignment(Ident,Operator,Int),
|
|
20
|
-
FieldAssignment(Ident,Operator,Int),
|
|
21
|
-
FieldAssignment(Ident,Operator,Int),
|
|
22
|
-
FieldAssignment(Ident,Operator,Int))))
|
|
19
|
+
FieldAssignment(Ident,Operator,Number(Int)),
|
|
20
|
+
FieldAssignment(Ident,Operator,Number(Int)),
|
|
21
|
+
FieldAssignment(Ident,Operator,Number(Int)),
|
|
22
|
+
FieldAssignment(Ident,Operator,Number(Int)))))
|
package/test/misc/javascript.txt
CHANGED
|
@@ -12,7 +12,7 @@ function(123, 1d2h) {
|
|
|
12
12
|
SurrealQL(
|
|
13
13
|
FunctionJs(
|
|
14
14
|
FunctionName,
|
|
15
|
-
ArgumentList(Int,Duration(DurationPart,DurationPart)),
|
|
15
|
+
ArgumentList(Number(Int),Duration(DurationPart,DurationPart)),
|
|
16
16
|
JavaScriptBlock(BraceOpen,JavaScriptContent,BraceClose)
|
|
17
17
|
)
|
|
18
18
|
)
|