@malloydata/malloy 0.0.12-dev221204204332 → 0.0.12
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/ast/apply-expr.js +1 -1
- package/dist/lang/ast/ast-expr.d.ts +1 -1
- package/dist/lang/ast/ast-expr.js +1 -1
- package/dist/lang/lib/Malloy/MalloyLexer.d.ts +21 -20
- package/dist/lang/lib/Malloy/MalloyLexer.js +879 -874
- package/dist/lang/lib/Malloy/MalloyListener.d.ts +2026 -0
- package/dist/lang/lib/Malloy/MalloyListener.js +4 -0
- package/dist/lang/lib/Malloy/MalloyParser.d.ts +22 -20
- package/dist/lang/lib/Malloy/MalloyParser.js +51 -50
- package/dist/lang/lib/Malloy/MalloyVisitor.d.ts +1276 -0
- package/dist/lang/lib/Malloy/MalloyVisitor.js +4 -0
- package/dist/lang/parse-to-ast.js +2 -1
- package/dist/lang/test/parse.spec.js +1 -0
- package/dist/md5.d.ts +1 -0
- package/dist/md5.js +30 -0
- package/package.json +1 -1
|
@@ -741,7 +741,8 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
|
|
|
741
741
|
return new ast.ExprAddSub(lhs, op, rhs);
|
|
742
742
|
}
|
|
743
743
|
visitExprMulDiv(pcx) {
|
|
744
|
-
|
|
744
|
+
const op = pcx.STAR() ? "*" : pcx.SLASH() ? "/" : "%";
|
|
745
|
+
return new ast.ExprMulDiv(this.getFieldExpr(pcx.fieldExpr(0)), op, this.getFieldExpr(pcx.fieldExpr(1)));
|
|
745
746
|
}
|
|
746
747
|
visitExprCompare(pcx) {
|
|
747
748
|
const op = pcx.compareOp().text;
|
|
@@ -933,6 +933,7 @@ describe("expressions", () => {
|
|
|
933
933
|
test("addition", exprOK("42 + 7"));
|
|
934
934
|
test("subtraction", exprOK("42 - 7"));
|
|
935
935
|
test("multiplication", exprOK("42 * 7"));
|
|
936
|
+
test("mod", exprOK("42 % 7"));
|
|
936
937
|
test("division", exprOK("42 / 7"));
|
|
937
938
|
test("unary negation", exprOK("- ai"));
|
|
938
939
|
test("equal", exprOK("42 = 7"));
|
package/dist/md5.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const md5: (val: string) => string;
|
package/dist/md5.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.md5 = void 0;
|
|
27
|
+
const crypto = __importStar(require("crypto"));
|
|
28
|
+
const md5 = (val) => crypto.createHash("md5").update(val).digest("hex");
|
|
29
|
+
exports.md5 = md5;
|
|
30
|
+
//# sourceMappingURL=md5.js.map
|