@malloydata/malloy 0.0.392 → 0.0.394
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/api/foundation/core.d.ts +0 -4
- package/dist/api/foundation/core.js +13 -10
- package/dist/lang/ast/expressions/expr-compare.d.ts +15 -0
- package/dist/lang/ast/expressions/expr-compare.js +82 -2
- package/dist/lang/ast/statements/define-given.d.ts +2 -7
- package/dist/lang/ast/statements/define-given.js +69 -18
- package/dist/lang/ast/types/malloy-element.js +2 -0
- package/dist/lang/lib/Malloy/MalloyParser.d.ts +188 -167
- package/dist/lang/lib/Malloy/MalloyParser.js +2582 -2442
- package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +24 -0
- package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +15 -0
- package/dist/lang/malloy-to-ast.d.ts +9 -2
- package/dist/lang/malloy-to-ast.js +37 -2
- package/dist/lang/parse-log.d.ts +22 -0
- package/dist/lang/parse-log.js +6 -0
- package/dist/lang/test/expr-to-str.js +3 -0
- package/dist/model/expression_compiler.js +38 -11
- package/dist/model/given_binding.d.ts +15 -0
- package/dist/model/given_binding.js +35 -0
- package/dist/model/inline_expr.d.ts +30 -0
- package/dist/model/inline_expr.js +184 -0
- package/dist/model/malloy_types.d.ts +19 -1
- package/dist/model/query_query.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
|
@@ -205,173 +205,174 @@ export declare class MalloyParser extends Parser {
|
|
|
205
205
|
static readonly RULE_defineGivenStatement = 12;
|
|
206
206
|
static readonly RULE_givenDefList = 13;
|
|
207
207
|
static readonly RULE_givenDef = 14;
|
|
208
|
-
static readonly
|
|
209
|
-
static readonly
|
|
210
|
-
static readonly
|
|
211
|
-
static readonly
|
|
212
|
-
static readonly
|
|
213
|
-
static readonly
|
|
214
|
-
static readonly
|
|
215
|
-
static readonly
|
|
216
|
-
static readonly
|
|
217
|
-
static readonly
|
|
218
|
-
static readonly
|
|
219
|
-
static readonly
|
|
220
|
-
static readonly
|
|
221
|
-
static readonly
|
|
222
|
-
static readonly
|
|
223
|
-
static readonly
|
|
224
|
-
static readonly
|
|
225
|
-
static readonly
|
|
226
|
-
static readonly
|
|
227
|
-
static readonly
|
|
228
|
-
static readonly
|
|
229
|
-
static readonly
|
|
230
|
-
static readonly
|
|
231
|
-
static readonly
|
|
232
|
-
static readonly
|
|
233
|
-
static readonly
|
|
234
|
-
static readonly
|
|
235
|
-
static readonly
|
|
236
|
-
static readonly
|
|
237
|
-
static readonly
|
|
238
|
-
static readonly
|
|
239
|
-
static readonly
|
|
240
|
-
static readonly
|
|
241
|
-
static readonly
|
|
242
|
-
static readonly
|
|
243
|
-
static readonly
|
|
244
|
-
static readonly
|
|
245
|
-
static readonly
|
|
246
|
-
static readonly
|
|
247
|
-
static readonly
|
|
248
|
-
static readonly
|
|
249
|
-
static readonly
|
|
250
|
-
static readonly
|
|
251
|
-
static readonly
|
|
252
|
-
static readonly
|
|
253
|
-
static readonly
|
|
254
|
-
static readonly
|
|
255
|
-
static readonly
|
|
256
|
-
static readonly
|
|
257
|
-
static readonly
|
|
258
|
-
static readonly
|
|
259
|
-
static readonly
|
|
260
|
-
static readonly
|
|
261
|
-
static readonly
|
|
262
|
-
static readonly
|
|
263
|
-
static readonly
|
|
264
|
-
static readonly
|
|
265
|
-
static readonly
|
|
266
|
-
static readonly
|
|
267
|
-
static readonly
|
|
268
|
-
static readonly
|
|
269
|
-
static readonly
|
|
270
|
-
static readonly
|
|
271
|
-
static readonly
|
|
272
|
-
static readonly
|
|
273
|
-
static readonly
|
|
274
|
-
static readonly
|
|
275
|
-
static readonly
|
|
276
|
-
static readonly
|
|
277
|
-
static readonly
|
|
278
|
-
static readonly
|
|
279
|
-
static readonly
|
|
280
|
-
static readonly
|
|
281
|
-
static readonly
|
|
282
|
-
static readonly
|
|
283
|
-
static readonly
|
|
284
|
-
static readonly
|
|
285
|
-
static readonly
|
|
286
|
-
static readonly
|
|
287
|
-
static readonly
|
|
288
|
-
static readonly
|
|
289
|
-
static readonly
|
|
290
|
-
static readonly
|
|
291
|
-
static readonly
|
|
292
|
-
static readonly
|
|
293
|
-
static readonly
|
|
294
|
-
static readonly
|
|
295
|
-
static readonly
|
|
296
|
-
static readonly
|
|
297
|
-
static readonly
|
|
298
|
-
static readonly
|
|
299
|
-
static readonly
|
|
300
|
-
static readonly
|
|
301
|
-
static readonly
|
|
302
|
-
static readonly
|
|
303
|
-
static readonly
|
|
304
|
-
static readonly
|
|
305
|
-
static readonly
|
|
306
|
-
static readonly
|
|
307
|
-
static readonly
|
|
308
|
-
static readonly
|
|
309
|
-
static readonly
|
|
310
|
-
static readonly
|
|
311
|
-
static readonly
|
|
312
|
-
static readonly
|
|
313
|
-
static readonly
|
|
314
|
-
static readonly
|
|
315
|
-
static readonly
|
|
316
|
-
static readonly
|
|
317
|
-
static readonly
|
|
318
|
-
static readonly
|
|
319
|
-
static readonly
|
|
320
|
-
static readonly
|
|
321
|
-
static readonly
|
|
322
|
-
static readonly
|
|
323
|
-
static readonly
|
|
324
|
-
static readonly
|
|
325
|
-
static readonly
|
|
326
|
-
static readonly
|
|
327
|
-
static readonly
|
|
328
|
-
static readonly
|
|
329
|
-
static readonly
|
|
330
|
-
static readonly
|
|
331
|
-
static readonly
|
|
332
|
-
static readonly
|
|
333
|
-
static readonly
|
|
334
|
-
static readonly
|
|
335
|
-
static readonly
|
|
336
|
-
static readonly
|
|
337
|
-
static readonly
|
|
338
|
-
static readonly
|
|
339
|
-
static readonly
|
|
340
|
-
static readonly
|
|
341
|
-
static readonly
|
|
342
|
-
static readonly
|
|
343
|
-
static readonly
|
|
344
|
-
static readonly
|
|
345
|
-
static readonly
|
|
346
|
-
static readonly
|
|
347
|
-
static readonly
|
|
348
|
-
static readonly
|
|
349
|
-
static readonly
|
|
350
|
-
static readonly
|
|
351
|
-
static readonly
|
|
352
|
-
static readonly
|
|
353
|
-
static readonly
|
|
354
|
-
static readonly
|
|
355
|
-
static readonly
|
|
356
|
-
static readonly
|
|
357
|
-
static readonly
|
|
358
|
-
static readonly
|
|
359
|
-
static readonly
|
|
360
|
-
static readonly
|
|
361
|
-
static readonly
|
|
362
|
-
static readonly
|
|
363
|
-
static readonly
|
|
364
|
-
static readonly
|
|
365
|
-
static readonly
|
|
366
|
-
static readonly
|
|
367
|
-
static readonly
|
|
368
|
-
static readonly
|
|
369
|
-
static readonly
|
|
370
|
-
static readonly
|
|
371
|
-
static readonly
|
|
372
|
-
static readonly
|
|
373
|
-
static readonly
|
|
374
|
-
static readonly
|
|
208
|
+
static readonly RULE_givenModifier = 15;
|
|
209
|
+
static readonly RULE_givenNameDef = 16;
|
|
210
|
+
static readonly RULE_givenType = 17;
|
|
211
|
+
static readonly RULE_topLevelAnonQueryDef = 18;
|
|
212
|
+
static readonly RULE_annotation = 19;
|
|
213
|
+
static readonly RULE_tags = 20;
|
|
214
|
+
static readonly RULE_blockAnnotation = 21;
|
|
215
|
+
static readonly RULE_docAnnotation = 22;
|
|
216
|
+
static readonly RULE_docBlockAnnotation = 23;
|
|
217
|
+
static readonly RULE_isDefine = 24;
|
|
218
|
+
static readonly RULE_runStatement = 25;
|
|
219
|
+
static readonly RULE_sqlString = 26;
|
|
220
|
+
static readonly RULE_sqlInterpolation = 27;
|
|
221
|
+
static readonly RULE_importStatement = 28;
|
|
222
|
+
static readonly RULE_importSelect = 29;
|
|
223
|
+
static readonly RULE_importItem = 30;
|
|
224
|
+
static readonly RULE_importURL = 31;
|
|
225
|
+
static readonly RULE_docAnnotations = 32;
|
|
226
|
+
static readonly RULE_ignoredObjectAnnotations = 33;
|
|
227
|
+
static readonly RULE_ignoredModelAnnotations = 34;
|
|
228
|
+
static readonly RULE_topLevelQueryDefs = 35;
|
|
229
|
+
static readonly RULE_topLevelQueryDef = 36;
|
|
230
|
+
static readonly RULE_refineOperator = 37;
|
|
231
|
+
static readonly RULE_turtleName = 38;
|
|
232
|
+
static readonly RULE_sqlSource = 39;
|
|
233
|
+
static readonly RULE_exploreTable = 40;
|
|
234
|
+
static readonly RULE_virtualSource = 41;
|
|
235
|
+
static readonly RULE_connectionId = 42;
|
|
236
|
+
static readonly RULE_queryProperties = 43;
|
|
237
|
+
static readonly RULE_queryName = 44;
|
|
238
|
+
static readonly RULE_sourcePropertyList = 45;
|
|
239
|
+
static readonly RULE_sourceDefinition = 46;
|
|
240
|
+
static readonly RULE_sqExplore = 47;
|
|
241
|
+
static readonly RULE_sourceParameters = 48;
|
|
242
|
+
static readonly RULE_legalParamType = 49;
|
|
243
|
+
static readonly RULE_sourceParameter = 50;
|
|
244
|
+
static readonly RULE_parameterNameDef = 51;
|
|
245
|
+
static readonly RULE_sourceNameDef = 52;
|
|
246
|
+
static readonly RULE_exploreProperties = 53;
|
|
247
|
+
static readonly RULE_exploreStatement = 54;
|
|
248
|
+
static readonly RULE_accessLabel = 55;
|
|
249
|
+
static readonly RULE_accessModifierList = 56;
|
|
250
|
+
static readonly RULE_defMeasures = 57;
|
|
251
|
+
static readonly RULE_defDimensions = 58;
|
|
252
|
+
static readonly RULE_renameList = 59;
|
|
253
|
+
static readonly RULE_renameEntry = 60;
|
|
254
|
+
static readonly RULE_defList = 61;
|
|
255
|
+
static readonly RULE_fieldDef = 62;
|
|
256
|
+
static readonly RULE_fieldNameDef = 63;
|
|
257
|
+
static readonly RULE_joinNameDef = 64;
|
|
258
|
+
static readonly RULE_declareStatement = 65;
|
|
259
|
+
static readonly RULE_joinStatement = 66;
|
|
260
|
+
static readonly RULE_queryExtend = 67;
|
|
261
|
+
static readonly RULE_modEither = 68;
|
|
262
|
+
static readonly RULE_sourceArguments = 69;
|
|
263
|
+
static readonly RULE_argumentId = 70;
|
|
264
|
+
static readonly RULE_sourceArgument = 71;
|
|
265
|
+
static readonly RULE_sqExpr = 72;
|
|
266
|
+
static readonly RULE_sourceTypeConstraints = 73;
|
|
267
|
+
static readonly RULE_userTypeName = 74;
|
|
268
|
+
static readonly RULE_includeBlock = 75;
|
|
269
|
+
static readonly RULE_includeItem = 76;
|
|
270
|
+
static readonly RULE_orphanedAnnotation = 77;
|
|
271
|
+
static readonly RULE_accessLabelProp = 78;
|
|
272
|
+
static readonly RULE_includeExceptList = 79;
|
|
273
|
+
static readonly RULE_includeExceptListItem = 80;
|
|
274
|
+
static readonly RULE_includeList = 81;
|
|
275
|
+
static readonly RULE_includeField = 82;
|
|
276
|
+
static readonly RULE_segExpr = 83;
|
|
277
|
+
static readonly RULE_vExpr = 84;
|
|
278
|
+
static readonly RULE_queryExtendStatement = 85;
|
|
279
|
+
static readonly RULE_queryExtendStatementList = 86;
|
|
280
|
+
static readonly RULE_joinList = 87;
|
|
281
|
+
static readonly RULE_isExplore = 88;
|
|
282
|
+
static readonly RULE_matrixOperation = 89;
|
|
283
|
+
static readonly RULE_joinFrom = 90;
|
|
284
|
+
static readonly RULE_joinDef = 91;
|
|
285
|
+
static readonly RULE_joinExpression = 92;
|
|
286
|
+
static readonly RULE_filterStatement = 93;
|
|
287
|
+
static readonly RULE_fieldProperties = 94;
|
|
288
|
+
static readonly RULE_aggregateOrdering = 95;
|
|
289
|
+
static readonly RULE_aggregateOrderBySpec = 96;
|
|
290
|
+
static readonly RULE_aggregateOrderByStatement = 97;
|
|
291
|
+
static readonly RULE_fieldPropertyLimitStatement = 98;
|
|
292
|
+
static readonly RULE_fieldPropertyStatement = 99;
|
|
293
|
+
static readonly RULE_filterClauseList = 100;
|
|
294
|
+
static readonly RULE_whereStatement = 101;
|
|
295
|
+
static readonly RULE_havingStatement = 102;
|
|
296
|
+
static readonly RULE_subQueryDefList = 103;
|
|
297
|
+
static readonly RULE_exploreQueryNameDef = 104;
|
|
298
|
+
static readonly RULE_exploreQueryDef = 105;
|
|
299
|
+
static readonly RULE_drillStatement = 106;
|
|
300
|
+
static readonly RULE_drillClauseList = 107;
|
|
301
|
+
static readonly RULE_queryStatement = 108;
|
|
302
|
+
static readonly RULE_queryJoinStatement = 109;
|
|
303
|
+
static readonly RULE_groupByStatement = 110;
|
|
304
|
+
static readonly RULE_queryFieldList = 111;
|
|
305
|
+
static readonly RULE_queryFieldEntry = 112;
|
|
306
|
+
static readonly RULE_nestStatement = 113;
|
|
307
|
+
static readonly RULE_nestedQueryList = 114;
|
|
308
|
+
static readonly RULE_nestEntry = 115;
|
|
309
|
+
static readonly RULE_aggregateStatement = 116;
|
|
310
|
+
static readonly RULE_calculateStatement = 117;
|
|
311
|
+
static readonly RULE_projectStatement = 118;
|
|
312
|
+
static readonly RULE_partitionByStatement = 119;
|
|
313
|
+
static readonly RULE_groupedByStatement = 120;
|
|
314
|
+
static readonly RULE_orderByStatement = 121;
|
|
315
|
+
static readonly RULE_ordering = 122;
|
|
316
|
+
static readonly RULE_orderBySpec = 123;
|
|
317
|
+
static readonly RULE_limitStatement = 124;
|
|
318
|
+
static readonly RULE_bySpec = 125;
|
|
319
|
+
static readonly RULE_topStatement = 126;
|
|
320
|
+
static readonly RULE_indexElement = 127;
|
|
321
|
+
static readonly RULE_indexFields = 128;
|
|
322
|
+
static readonly RULE_indexStatement = 129;
|
|
323
|
+
static readonly RULE_sampleStatement = 130;
|
|
324
|
+
static readonly RULE_timezoneStatement = 131;
|
|
325
|
+
static readonly RULE_queryAnnotation = 132;
|
|
326
|
+
static readonly RULE_sampleSpec = 133;
|
|
327
|
+
static readonly RULE_aggregate = 134;
|
|
328
|
+
static readonly RULE_malloyType = 135;
|
|
329
|
+
static readonly RULE_malloyBasicType = 136;
|
|
330
|
+
static readonly RULE_malloyRecordType = 137;
|
|
331
|
+
static readonly RULE_malloyRecordField = 138;
|
|
332
|
+
static readonly RULE_compareOp = 139;
|
|
333
|
+
static readonly RULE_string = 140;
|
|
334
|
+
static readonly RULE_shortString = 141;
|
|
335
|
+
static readonly RULE_rawString = 142;
|
|
336
|
+
static readonly RULE_numericLiteral = 143;
|
|
337
|
+
static readonly RULE_literal = 144;
|
|
338
|
+
static readonly RULE_dateLiteral = 145;
|
|
339
|
+
static readonly RULE_tablePath = 146;
|
|
340
|
+
static readonly RULE_tableURI = 147;
|
|
341
|
+
static readonly RULE_id = 148;
|
|
342
|
+
static readonly RULE_timeframe = 149;
|
|
343
|
+
static readonly RULE_ungroup = 150;
|
|
344
|
+
static readonly RULE_malloyOrSQLType = 151;
|
|
345
|
+
static readonly RULE_fieldExpr = 152;
|
|
346
|
+
static readonly RULE_partialCompare = 153;
|
|
347
|
+
static readonly RULE_partialTest = 154;
|
|
348
|
+
static readonly RULE_partialAllowedFieldExpr = 155;
|
|
349
|
+
static readonly RULE_fieldExprList = 156;
|
|
350
|
+
static readonly RULE_pickStatement = 157;
|
|
351
|
+
static readonly RULE_pick = 158;
|
|
352
|
+
static readonly RULE_caseStatement = 159;
|
|
353
|
+
static readonly RULE_caseWhen = 160;
|
|
354
|
+
static readonly RULE_recordKey = 161;
|
|
355
|
+
static readonly RULE_recordElement = 162;
|
|
356
|
+
static readonly RULE_argumentList = 163;
|
|
357
|
+
static readonly RULE_fieldNameList = 164;
|
|
358
|
+
static readonly RULE_fieldCollection = 165;
|
|
359
|
+
static readonly RULE_collectionWildCard = 166;
|
|
360
|
+
static readonly RULE_starQualified = 167;
|
|
361
|
+
static readonly RULE_taggedRef = 168;
|
|
362
|
+
static readonly RULE_refExpr = 169;
|
|
363
|
+
static readonly RULE_collectionMember = 170;
|
|
364
|
+
static readonly RULE_fieldPath = 171;
|
|
365
|
+
static readonly RULE_joinName = 172;
|
|
366
|
+
static readonly RULE_fieldName = 173;
|
|
367
|
+
static readonly RULE_sqlExploreNameRef = 174;
|
|
368
|
+
static readonly RULE_nameSQLBlock = 175;
|
|
369
|
+
static readonly RULE_connectionName = 176;
|
|
370
|
+
static readonly RULE_tripFilterString = 177;
|
|
371
|
+
static readonly RULE_tickFilterString = 178;
|
|
372
|
+
static readonly RULE_filterString = 179;
|
|
373
|
+
static readonly RULE_debugExpr = 180;
|
|
374
|
+
static readonly RULE_debugPartial = 181;
|
|
375
|
+
static readonly RULE_experimentalStatementForTesting = 182;
|
|
375
376
|
static readonly ruleNames: string[];
|
|
376
377
|
private static readonly _LITERAL_NAMES;
|
|
377
378
|
private static readonly _SYMBOLIC_NAMES;
|
|
@@ -398,6 +399,7 @@ export declare class MalloyParser extends Parser {
|
|
|
398
399
|
defineGivenStatement(): DefineGivenStatementContext;
|
|
399
400
|
givenDefList(): GivenDefListContext;
|
|
400
401
|
givenDef(): GivenDefContext;
|
|
402
|
+
givenModifier(): GivenModifierContext;
|
|
401
403
|
givenNameDef(): GivenNameDefContext;
|
|
402
404
|
givenType(): GivenTypeContext;
|
|
403
405
|
topLevelAnonQueryDef(): TopLevelAnonQueryDefContext;
|
|
@@ -766,6 +768,7 @@ export declare class GivenDefContext extends ParserRuleContext {
|
|
|
766
768
|
givenNameDef(): GivenNameDefContext;
|
|
767
769
|
DOUBLECOLON(): TerminalNode;
|
|
768
770
|
givenType(): GivenTypeContext;
|
|
771
|
+
givenModifier(): GivenModifierContext | undefined;
|
|
769
772
|
isDefine(): IsDefineContext | undefined;
|
|
770
773
|
fieldExpr(): FieldExprContext | undefined;
|
|
771
774
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
@@ -774,6 +777,14 @@ export declare class GivenDefContext extends ParserRuleContext {
|
|
|
774
777
|
exitRule(listener: MalloyParserListener): void;
|
|
775
778
|
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
776
779
|
}
|
|
780
|
+
export declare class GivenModifierContext extends ParserRuleContext {
|
|
781
|
+
id(): IdContext;
|
|
782
|
+
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
783
|
+
get ruleIndex(): number;
|
|
784
|
+
enterRule(listener: MalloyParserListener): void;
|
|
785
|
+
exitRule(listener: MalloyParserListener): void;
|
|
786
|
+
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
787
|
+
}
|
|
777
788
|
export declare class GivenNameDefContext extends ParserRuleContext {
|
|
778
789
|
id(): IdContext;
|
|
779
790
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
@@ -2770,6 +2781,16 @@ export declare class ExprWarnInContext extends FieldExprContext {
|
|
|
2770
2781
|
exitRule(listener: MalloyParserListener): void;
|
|
2771
2782
|
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
2772
2783
|
}
|
|
2784
|
+
export declare class ExprInGivenContext extends FieldExprContext {
|
|
2785
|
+
fieldExpr(): FieldExprContext;
|
|
2786
|
+
IN(): TerminalNode;
|
|
2787
|
+
GIVEN_REF(): TerminalNode;
|
|
2788
|
+
NOT(): TerminalNode | undefined;
|
|
2789
|
+
constructor(ctx: FieldExprContext);
|
|
2790
|
+
enterRule(listener: MalloyParserListener): void;
|
|
2791
|
+
exitRule(listener: MalloyParserListener): void;
|
|
2792
|
+
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
2793
|
+
}
|
|
2773
2794
|
export declare class ExprApplyContext extends FieldExprContext {
|
|
2774
2795
|
fieldExpr(): FieldExprContext;
|
|
2775
2796
|
QMARK(): TerminalNode;
|