@malloydata/malloy 0.0.14 → 0.0.15-dev221208001612
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/lang/lib/Malloy/MalloyParser.d.ts +2 -13
- package/dist/lang/lib/Malloy/MalloyParser.js +204 -295
- package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +0 -26
- package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +0 -16
- package/dist/lang/parse-to-ast.d.ts +1 -2
- package/dist/lang/parse-to-ast.js +10 -8
- package/package.json +1 -1
- package/dist/lang/lib/Malloy/MalloyListener.d.ts +0 -2026
- package/dist/lang/lib/Malloy/MalloyListener.js +0 -4
- package/dist/lang/lib/Malloy/MalloyVisitor.d.ts +0 -1276
- package/dist/lang/lib/Malloy/MalloyVisitor.js +0 -4
- package/dist/md5.d.ts +0 -1
- package/dist/md5.js +0 -30
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener";
|
|
2
|
-
import { ExprPartialCompareContext } from "./MalloyParser";
|
|
3
|
-
import { ExprNotPartialContext } from "./MalloyParser";
|
|
4
2
|
import { NameMemberContext } from "./MalloyParser";
|
|
5
3
|
import { WildMemberContext } from "./MalloyParser";
|
|
6
4
|
import { NewMemberContext } from "./MalloyParser";
|
|
@@ -177,30 +175,6 @@ import { ConnectionNameContext } from "./MalloyParser";
|
|
|
177
175
|
* `MalloyParser`.
|
|
178
176
|
*/
|
|
179
177
|
export interface MalloyParserListener extends ParseTreeListener {
|
|
180
|
-
/**
|
|
181
|
-
* Enter a parse tree produced by the `exprPartialCompare`
|
|
182
|
-
* labeled alternative in `MalloyParser.partialAllowedFieldExpr`.
|
|
183
|
-
* @param ctx the parse tree
|
|
184
|
-
*/
|
|
185
|
-
enterExprPartialCompare?: (ctx: ExprPartialCompareContext) => void;
|
|
186
|
-
/**
|
|
187
|
-
* Exit a parse tree produced by the `exprPartialCompare`
|
|
188
|
-
* labeled alternative in `MalloyParser.partialAllowedFieldExpr`.
|
|
189
|
-
* @param ctx the parse tree
|
|
190
|
-
*/
|
|
191
|
-
exitExprPartialCompare?: (ctx: ExprPartialCompareContext) => void;
|
|
192
|
-
/**
|
|
193
|
-
* Enter a parse tree produced by the `exprNotPartial`
|
|
194
|
-
* labeled alternative in `MalloyParser.partialAllowedFieldExpr`.
|
|
195
|
-
* @param ctx the parse tree
|
|
196
|
-
*/
|
|
197
|
-
enterExprNotPartial?: (ctx: ExprNotPartialContext) => void;
|
|
198
|
-
/**
|
|
199
|
-
* Exit a parse tree produced by the `exprNotPartial`
|
|
200
|
-
* labeled alternative in `MalloyParser.partialAllowedFieldExpr`.
|
|
201
|
-
* @param ctx the parse tree
|
|
202
|
-
*/
|
|
203
|
-
exitExprNotPartial?: (ctx: ExprNotPartialContext) => void;
|
|
204
178
|
/**
|
|
205
179
|
* Enter a parse tree produced by the `nameMember`
|
|
206
180
|
* labeled alternative in `MalloyParser.collectionMember`.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";
|
|
2
|
-
import { ExprPartialCompareContext } from "./MalloyParser";
|
|
3
|
-
import { ExprNotPartialContext } from "./MalloyParser";
|
|
4
2
|
import { NameMemberContext } from "./MalloyParser";
|
|
5
3
|
import { WildMemberContext } from "./MalloyParser";
|
|
6
4
|
import { NewMemberContext } from "./MalloyParser";
|
|
@@ -180,20 +178,6 @@ import { ConnectionNameContext } from "./MalloyParser";
|
|
|
180
178
|
* operations with no return type.
|
|
181
179
|
*/
|
|
182
180
|
export interface MalloyParserVisitor<Result> extends ParseTreeVisitor<Result> {
|
|
183
|
-
/**
|
|
184
|
-
* Visit a parse tree produced by the `exprPartialCompare`
|
|
185
|
-
* labeled alternative in `MalloyParser.partialAllowedFieldExpr`.
|
|
186
|
-
* @param ctx the parse tree
|
|
187
|
-
* @return the visitor result
|
|
188
|
-
*/
|
|
189
|
-
visitExprPartialCompare?: (ctx: ExprPartialCompareContext) => Result;
|
|
190
|
-
/**
|
|
191
|
-
* Visit a parse tree produced by the `exprNotPartial`
|
|
192
|
-
* labeled alternative in `MalloyParser.partialAllowedFieldExpr`.
|
|
193
|
-
* @param ctx the parse tree
|
|
194
|
-
* @return the visitor result
|
|
195
|
-
*/
|
|
196
|
-
visitExprNotPartial?: (ctx: ExprNotPartialContext) => Result;
|
|
197
181
|
/**
|
|
198
182
|
* Visit a parse tree produced by the `nameMember`
|
|
199
183
|
* labeled alternative in `MalloyParser.collectionMember`.
|
|
@@ -114,8 +114,7 @@ export declare class MalloyToAST extends AbstractParseTreeVisitor<ast.MalloyElem
|
|
|
114
114
|
allFieldExpressions(exprList: parse.FieldExprContext[]): ast.ExpressionDef[];
|
|
115
115
|
visitExprLogical(pcx: parse.ExprLogicalContext): ast.ExprLogicalOp;
|
|
116
116
|
visitExprLogicalTree(pcx: parse.ExprLogicalTreeContext): ast.ExprAlternationTree;
|
|
117
|
-
|
|
118
|
-
visitExprPartialCompare(pcx: parse.ExprPartialCompareContext): ast.MalloyElement;
|
|
117
|
+
visitPartialAllowedFieldExpr(pcx: parse.PartialAllowedFieldExprContext): ast.ExpressionDef;
|
|
119
118
|
visitExprString(pcx: parse.ExprStringContext): ast.ExprString;
|
|
120
119
|
visitExprRegex(pcx: parse.ExprRegexContext): ast.ExprRegEx;
|
|
121
120
|
visitExprNow(_pcx: parse.ExprNowContext): ast.ExprNow;
|
|
@@ -686,15 +686,17 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
|
|
|
686
686
|
const right = this.getFieldExpr(pcx.partialAllowedFieldExpr());
|
|
687
687
|
return new ast.ExprAlternationTree(left, pcx.AMPER() ? "&" : "|", right);
|
|
688
688
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
689
|
+
visitPartialAllowedFieldExpr(pcx) {
|
|
690
|
+
var _a;
|
|
691
|
+
const fieldExpr = this.getFieldExpr(pcx.fieldExpr());
|
|
692
|
+
const partialOp = (_a = pcx.compareOp()) === null || _a === void 0 ? void 0 : _a.text;
|
|
693
|
+
if (partialOp) {
|
|
694
|
+
if (ast.isComparison(partialOp)) {
|
|
695
|
+
return this.astAt(new ast.PartialCompare(partialOp, fieldExpr), pcx);
|
|
696
|
+
}
|
|
697
|
+
throw this.internalError(pcx, `partial comparison '${partialOp}' not recognized`);
|
|
696
698
|
}
|
|
697
|
-
|
|
699
|
+
return fieldExpr;
|
|
698
700
|
}
|
|
699
701
|
visitExprString(pcx) {
|
|
700
702
|
return new ast.ExprString(pcx.STRING_LITERAL().text);
|