@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.
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Generated from Malloy.g4 by ANTLR 4.9.0-SNAPSHOT
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=MalloyVisitor.js.map
@@ -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
- return new ast.ExprMulDiv(this.getFieldExpr(pcx.fieldExpr(0)), pcx.STAR() ? "*" : "/", this.getFieldExpr(pcx.fieldExpr(1)));
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.12-dev221204204332",
3
+ "version": "0.0.12",
4
4
  "license": "GPL-2.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",