@malloydata/malloy 0.0.80-dev230907183434 → 0.0.80

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.
Files changed (32) hide show
  1. package/dist/lang/ast/expressions/expr-aggregate-function.d.ts +8 -2
  2. package/dist/lang/ast/expressions/expr-aggregate-function.js +211 -12
  3. package/dist/lang/ast/expressions/expr-asymmetric.d.ts +2 -1
  4. package/dist/lang/ast/expressions/expr-asymmetric.js +5 -2
  5. package/dist/lang/ast/expressions/expr-avg.d.ts +1 -1
  6. package/dist/lang/ast/expressions/expr-avg.js +2 -2
  7. package/dist/lang/ast/expressions/expr-sum.d.ts +1 -1
  8. package/dist/lang/ast/expressions/expr-sum.js +2 -2
  9. package/dist/lang/ast/field-space/static-space.js +19 -2
  10. package/dist/lang/ast/field-space/struct-space-field-base.d.ts +2 -1
  11. package/dist/lang/ast/field-space/struct-space-field-base.js +3 -0
  12. package/dist/lang/ast/types/lookup-result.d.ts +5 -0
  13. package/dist/lang/ast/types/malloy-element.d.ts +1 -0
  14. package/dist/lang/ast/types/malloy-element.js +4 -0
  15. package/dist/lang/lib/Malloy/MalloyLexer.d.ts +75 -74
  16. package/dist/lang/lib/Malloy/MalloyLexer.js +1101 -1094
  17. package/dist/lang/lib/Malloy/MalloyParser.d.ts +91 -78
  18. package/dist/lang/lib/Malloy/MalloyParser.js +866 -801
  19. package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +13 -0
  20. package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +8 -0
  21. package/dist/lang/malloy-to-ast.d.ts +3 -0
  22. package/dist/lang/malloy-to-ast.js +76 -25
  23. package/dist/lang/parse-malloy.d.ts +1 -0
  24. package/dist/lang/parse-malloy.js +13 -0
  25. package/dist/lang/test/expressions.spec.js +241 -25
  26. package/dist/lang/test/parse.spec.js +1 -127
  27. package/dist/lang/test/query.spec.js +1 -1
  28. package/dist/lang/test/test-translator.d.ts +7 -1
  29. package/dist/lang/test/test-translator.js +40 -13
  30. package/dist/model/utils.d.ts +1 -0
  31. package/dist/model/utils.js +101 -1
  32. package/package.json +1 -1
@@ -84,80 +84,81 @@ export declare class MalloyParser extends Parser {
84
84
  static readonly REFINE = 73;
85
85
  static readonly SECOND = 74;
86
86
  static readonly STRING = 75;
87
- static readonly SUM = 76;
88
- static readonly SQL = 77;
89
- static readonly TABLE = 78;
90
- static readonly THEN = 79;
91
- static readonly THIS = 80;
92
- static readonly TIMESTAMP = 81;
93
- static readonly TO = 82;
94
- static readonly TRUE = 83;
95
- static readonly TURTLE = 84;
96
- static readonly WEEK = 85;
97
- static readonly WHEN = 86;
98
- static readonly WITH = 87;
99
- static readonly YEAR = 88;
100
- static readonly UNGROUPED = 89;
101
- static readonly STRING_ESCAPE = 90;
102
- static readonly HACKY_REGEX = 91;
103
- static readonly SQ_STRING = 92;
104
- static readonly DQ_STRING = 93;
105
- static readonly BQ_STRING = 94;
106
- static readonly DOC_ANNOTATION = 95;
107
- static readonly ANNOTATION = 96;
108
- static readonly AMPER = 97;
109
- static readonly ARROW = 98;
110
- static readonly FAT_ARROW = 99;
111
- static readonly OPAREN = 100;
112
- static readonly CPAREN = 101;
113
- static readonly OBRACK = 102;
114
- static readonly CBRACK = 103;
115
- static readonly OCURLY = 104;
116
- static readonly CCURLY = 105;
117
- static readonly DOUBLECOLON = 106;
118
- static readonly TRIPLECOLON = 107;
119
- static readonly EXCLAM = 108;
120
- static readonly COLON = 109;
121
- static readonly COMMA = 110;
122
- static readonly DOT = 111;
123
- static readonly LT = 112;
124
- static readonly GT = 113;
125
- static readonly EQ = 114;
126
- static readonly NE = 115;
127
- static readonly LTE = 116;
128
- static readonly GTE = 117;
129
- static readonly PLUS = 118;
130
- static readonly MINUS = 119;
131
- static readonly STAR = 120;
132
- static readonly STARSTAR = 121;
133
- static readonly SLASH = 122;
134
- static readonly BAR = 123;
135
- static readonly SEMI = 124;
136
- static readonly NOT_MATCH = 125;
137
- static readonly MATCH = 126;
138
- static readonly PERCENT = 127;
139
- static readonly DOUBLE_QMARK = 128;
140
- static readonly QMARK = 129;
141
- static readonly LITERAL_TIMESTAMP = 130;
142
- static readonly LITERAL_HOUR = 131;
143
- static readonly LITERAL_DAY = 132;
144
- static readonly LITERAL_QUARTER = 133;
145
- static readonly LITERAL_MONTH = 134;
146
- static readonly LITERAL_WEEK = 135;
147
- static readonly LITERAL_YEAR = 136;
148
- static readonly IDENTIFIER = 137;
149
- static readonly PERCENT_LITERAL = 138;
150
- static readonly NUMERIC_LITERAL = 139;
151
- static readonly INTEGER_LITERAL = 140;
152
- static readonly BLOCK_COMMENT = 141;
153
- static readonly COMMENT_TO_EOL = 142;
154
- static readonly WHITE_SPACE = 143;
155
- static readonly SQL_BEGIN = 144;
156
- static readonly CLOSE_CODE = 145;
157
- static readonly UNWATED_CHARS_TRAILING_NUMBERS = 146;
158
- static readonly UNEXPECTED_CHAR = 147;
159
- static readonly OPEN_CODE = 148;
160
- static readonly SQL_END = 149;
87
+ static readonly SOURCE_KW = 76;
88
+ static readonly SUM = 77;
89
+ static readonly SQL = 78;
90
+ static readonly TABLE = 79;
91
+ static readonly THEN = 80;
92
+ static readonly THIS = 81;
93
+ static readonly TIMESTAMP = 82;
94
+ static readonly TO = 83;
95
+ static readonly TRUE = 84;
96
+ static readonly TURTLE = 85;
97
+ static readonly WEEK = 86;
98
+ static readonly WHEN = 87;
99
+ static readonly WITH = 88;
100
+ static readonly YEAR = 89;
101
+ static readonly UNGROUPED = 90;
102
+ static readonly STRING_ESCAPE = 91;
103
+ static readonly HACKY_REGEX = 92;
104
+ static readonly SQ_STRING = 93;
105
+ static readonly DQ_STRING = 94;
106
+ static readonly BQ_STRING = 95;
107
+ static readonly DOC_ANNOTATION = 96;
108
+ static readonly ANNOTATION = 97;
109
+ static readonly AMPER = 98;
110
+ static readonly ARROW = 99;
111
+ static readonly FAT_ARROW = 100;
112
+ static readonly OPAREN = 101;
113
+ static readonly CPAREN = 102;
114
+ static readonly OBRACK = 103;
115
+ static readonly CBRACK = 104;
116
+ static readonly OCURLY = 105;
117
+ static readonly CCURLY = 106;
118
+ static readonly DOUBLECOLON = 107;
119
+ static readonly TRIPLECOLON = 108;
120
+ static readonly EXCLAM = 109;
121
+ static readonly COLON = 110;
122
+ static readonly COMMA = 111;
123
+ static readonly DOT = 112;
124
+ static readonly LT = 113;
125
+ static readonly GT = 114;
126
+ static readonly EQ = 115;
127
+ static readonly NE = 116;
128
+ static readonly LTE = 117;
129
+ static readonly GTE = 118;
130
+ static readonly PLUS = 119;
131
+ static readonly MINUS = 120;
132
+ static readonly STAR = 121;
133
+ static readonly STARSTAR = 122;
134
+ static readonly SLASH = 123;
135
+ static readonly BAR = 124;
136
+ static readonly SEMI = 125;
137
+ static readonly NOT_MATCH = 126;
138
+ static readonly MATCH = 127;
139
+ static readonly PERCENT = 128;
140
+ static readonly DOUBLE_QMARK = 129;
141
+ static readonly QMARK = 130;
142
+ static readonly LITERAL_TIMESTAMP = 131;
143
+ static readonly LITERAL_HOUR = 132;
144
+ static readonly LITERAL_DAY = 133;
145
+ static readonly LITERAL_QUARTER = 134;
146
+ static readonly LITERAL_MONTH = 135;
147
+ static readonly LITERAL_WEEK = 136;
148
+ static readonly LITERAL_YEAR = 137;
149
+ static readonly IDENTIFIER = 138;
150
+ static readonly PERCENT_LITERAL = 139;
151
+ static readonly NUMERIC_LITERAL = 140;
152
+ static readonly INTEGER_LITERAL = 141;
153
+ static readonly BLOCK_COMMENT = 142;
154
+ static readonly COMMENT_TO_EOL = 143;
155
+ static readonly WHITE_SPACE = 144;
156
+ static readonly SQL_BEGIN = 145;
157
+ static readonly CLOSE_CODE = 146;
158
+ static readonly UNWATED_CHARS_TRAILING_NUMBERS = 147;
159
+ static readonly UNEXPECTED_CHAR = 148;
160
+ static readonly OPEN_CODE = 149;
161
+ static readonly SQL_END = 150;
161
162
  static readonly RULE_malloyDocument = 0;
162
163
  static readonly RULE_malloyStatement = 1;
163
164
  static readonly RULE_defineSourceStatement = 2;
@@ -2123,11 +2124,11 @@ export declare class ExprCountDisinctContext extends FieldExprContext {
2123
2124
  exitRule(listener: MalloyParserListener): void;
2124
2125
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
2125
2126
  }
2126
- export declare class ExprAggregateContext extends FieldExprContext {
2127
+ export declare class ExprPathlessAggregateContext extends FieldExprContext {
2127
2128
  aggregate(): AggregateContext;
2128
2129
  OPAREN(): TerminalNode;
2129
2130
  CPAREN(): TerminalNode;
2130
- fieldPath(): FieldPathContext | undefined;
2131
+ SOURCE_KW(): TerminalNode | undefined;
2131
2132
  DOT(): TerminalNode | undefined;
2132
2133
  fieldExpr(): FieldExprContext | undefined;
2133
2134
  STAR(): TerminalNode | undefined;
@@ -2136,6 +2137,18 @@ export declare class ExprAggregateContext extends FieldExprContext {
2136
2137
  exitRule(listener: MalloyParserListener): void;
2137
2138
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
2138
2139
  }
2140
+ export declare class ExprAggregateContext extends FieldExprContext {
2141
+ fieldPath(): FieldPathContext;
2142
+ DOT(): TerminalNode;
2143
+ aggregate(): AggregateContext;
2144
+ OPAREN(): TerminalNode;
2145
+ CPAREN(): TerminalNode;
2146
+ fieldExpr(): FieldExprContext | undefined;
2147
+ constructor(ctx: FieldExprContext);
2148
+ enterRule(listener: MalloyParserListener): void;
2149
+ exitRule(listener: MalloyParserListener): void;
2150
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
2151
+ }
2139
2152
  export declare class ExprExprContext extends FieldExprContext {
2140
2153
  OPAREN(): TerminalNode;
2141
2154
  partialAllowedFieldExpr(): PartialAllowedFieldExprContext;
@@ -2146,11 +2159,11 @@ export declare class ExprExprContext extends FieldExprContext {
2146
2159
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
2147
2160
  }
2148
2161
  export declare class ExprAggFuncContext extends FieldExprContext {
2162
+ fieldPath(): FieldPathContext;
2163
+ DOT(): TerminalNode;
2149
2164
  id(): IdContext;
2150
2165
  OPAREN(): TerminalNode;
2151
2166
  CPAREN(): TerminalNode;
2152
- fieldPath(): FieldPathContext | undefined;
2153
- DOT(): TerminalNode | undefined;
2154
2167
  argumentList(): ArgumentListContext | undefined;
2155
2168
  constructor(ctx: FieldExprContext);
2156
2169
  enterRule(listener: MalloyParserListener): void;