@malloydata/malloy 0.0.11-dev221202152346 → 0.0.11
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/index.d.ts +1 -1
- package/dist/lang/ast/ast-main.d.ts +61 -21
- package/dist/lang/ast/ast-main.js +170 -92
- package/dist/lang/index.d.ts +1 -1
- package/dist/lang/lib/Malloy/MalloyLexer.d.ts +135 -128
- package/dist/lang/lib/Malloy/MalloyLexer.js +1124 -1069
- 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 +276 -232
- package/dist/lang/lib/Malloy/MalloyParser.js +1719 -1456
- package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +48 -15
- package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +30 -9
- package/dist/lang/lib/Malloy/MalloyVisitor.d.ts +1276 -0
- package/dist/lang/lib/Malloy/MalloyVisitor.js +4 -0
- package/dist/lang/parse-malloy.d.ts +14 -23
- package/dist/lang/parse-malloy.js +37 -51
- package/dist/lang/parse-to-ast.d.ts +3 -2
- package/dist/lang/parse-to-ast.js +45 -13
- package/dist/lang/parse-tree-walkers/document-symbol-walker.js +2 -2
- package/dist/lang/test/parse.spec.d.ts +5 -3
- package/dist/lang/test/parse.spec.js +267 -181
- package/dist/malloy.d.ts +20 -20
- package/dist/malloy.js +73 -75
- package/dist/md5.d.ts +1 -0
- package/dist/md5.js +30 -0
- package/dist/model/malloy_query.js +1 -1
- package/dist/model/malloy_types.d.ts +19 -9
- package/dist/model/malloy_types.js +10 -1
- package/dist/model/sql_block.d.ts +5 -9
- package/dist/model/sql_block.js +21 -13
- package/dist/runtime_types.d.ts +8 -23
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { AnonymousQueryContext } from "./MalloyParser";
|
|
|
9
9
|
import { NamedSourceContext } from "./MalloyParser";
|
|
10
10
|
import { TableSourceContext } from "./MalloyParser";
|
|
11
11
|
import { QuerySourceContext } from "./MalloyParser";
|
|
12
|
-
import {
|
|
12
|
+
import { SQLSourceNameContext } from "./MalloyParser";
|
|
13
13
|
import { LiteralTimestampContext } from "./MalloyParser";
|
|
14
14
|
import { LiteralDayContext } from "./MalloyParser";
|
|
15
15
|
import { LiteralWeekContext } from "./MalloyParser";
|
|
@@ -75,7 +75,10 @@ import { ExploreKeywordContext } from "./MalloyParser";
|
|
|
75
75
|
import { DefineQueryContext } from "./MalloyParser";
|
|
76
76
|
import { TopLevelAnonQueryDefContext } from "./MalloyParser";
|
|
77
77
|
import { DefineSQLStatementContext } from "./MalloyParser";
|
|
78
|
-
import {
|
|
78
|
+
import { SqlBlockContext } from "./MalloyParser";
|
|
79
|
+
import { BlockSQLDefContext } from "./MalloyParser";
|
|
80
|
+
import { SqlStringContext } from "./MalloyParser";
|
|
81
|
+
import { SqlInterpolationContext } from "./MalloyParser";
|
|
79
82
|
import { ImportStatementContext } from "./MalloyParser";
|
|
80
83
|
import { ImportURLContext } from "./MalloyParser";
|
|
81
84
|
import { TopLevelQueryDefsContext } from "./MalloyParser";
|
|
@@ -167,7 +170,7 @@ import { JsonObjectContext } from "./MalloyParser";
|
|
|
167
170
|
import { JsonPropertyContext } from "./MalloyParser";
|
|
168
171
|
import { JsonArrayContext } from "./MalloyParser";
|
|
169
172
|
import { SqlExploreNameRefContext } from "./MalloyParser";
|
|
170
|
-
import {
|
|
173
|
+
import { NameSQLBlockContext } from "./MalloyParser";
|
|
171
174
|
import { ConnectionNameContext } from "./MalloyParser";
|
|
172
175
|
/**
|
|
173
176
|
* This interface defines a complete listener for a parse tree produced by
|
|
@@ -295,17 +298,17 @@ export interface MalloyParserListener extends ParseTreeListener {
|
|
|
295
298
|
*/
|
|
296
299
|
exitQuerySource?: (ctx: QuerySourceContext) => void;
|
|
297
300
|
/**
|
|
298
|
-
* Enter a parse tree produced by the `
|
|
301
|
+
* Enter a parse tree produced by the `SQLSourceName`
|
|
299
302
|
* labeled alternative in `MalloyParser.exploreSource`.
|
|
300
303
|
* @param ctx the parse tree
|
|
301
304
|
*/
|
|
302
|
-
|
|
305
|
+
enterSQLSourceName?: (ctx: SQLSourceNameContext) => void;
|
|
303
306
|
/**
|
|
304
|
-
* Exit a parse tree produced by the `
|
|
307
|
+
* Exit a parse tree produced by the `SQLSourceName`
|
|
305
308
|
* labeled alternative in `MalloyParser.exploreSource`.
|
|
306
309
|
* @param ctx the parse tree
|
|
307
310
|
*/
|
|
308
|
-
|
|
311
|
+
exitSQLSourceName?: (ctx: SQLSourceNameContext) => void;
|
|
309
312
|
/**
|
|
310
313
|
* Enter a parse tree produced by the `literalTimestamp`
|
|
311
314
|
* labeled alternative in `MalloyParser.dateLiteral`.
|
|
@@ -1073,15 +1076,45 @@ export interface MalloyParserListener extends ParseTreeListener {
|
|
|
1073
1076
|
*/
|
|
1074
1077
|
exitDefineSQLStatement?: (ctx: DefineSQLStatementContext) => void;
|
|
1075
1078
|
/**
|
|
1076
|
-
* Enter a parse tree produced by `MalloyParser.
|
|
1079
|
+
* Enter a parse tree produced by `MalloyParser.sqlBlock`.
|
|
1077
1080
|
* @param ctx the parse tree
|
|
1078
1081
|
*/
|
|
1079
|
-
|
|
1082
|
+
enterSqlBlock?: (ctx: SqlBlockContext) => void;
|
|
1080
1083
|
/**
|
|
1081
|
-
* Exit a parse tree produced by `MalloyParser.
|
|
1084
|
+
* Exit a parse tree produced by `MalloyParser.sqlBlock`.
|
|
1082
1085
|
* @param ctx the parse tree
|
|
1083
1086
|
*/
|
|
1084
|
-
|
|
1087
|
+
exitSqlBlock?: (ctx: SqlBlockContext) => void;
|
|
1088
|
+
/**
|
|
1089
|
+
* Enter a parse tree produced by `MalloyParser.blockSQLDef`.
|
|
1090
|
+
* @param ctx the parse tree
|
|
1091
|
+
*/
|
|
1092
|
+
enterBlockSQLDef?: (ctx: BlockSQLDefContext) => void;
|
|
1093
|
+
/**
|
|
1094
|
+
* Exit a parse tree produced by `MalloyParser.blockSQLDef`.
|
|
1095
|
+
* @param ctx the parse tree
|
|
1096
|
+
*/
|
|
1097
|
+
exitBlockSQLDef?: (ctx: BlockSQLDefContext) => void;
|
|
1098
|
+
/**
|
|
1099
|
+
* Enter a parse tree produced by `MalloyParser.sqlString`.
|
|
1100
|
+
* @param ctx the parse tree
|
|
1101
|
+
*/
|
|
1102
|
+
enterSqlString?: (ctx: SqlStringContext) => void;
|
|
1103
|
+
/**
|
|
1104
|
+
* Exit a parse tree produced by `MalloyParser.sqlString`.
|
|
1105
|
+
* @param ctx the parse tree
|
|
1106
|
+
*/
|
|
1107
|
+
exitSqlString?: (ctx: SqlStringContext) => void;
|
|
1108
|
+
/**
|
|
1109
|
+
* Enter a parse tree produced by `MalloyParser.sqlInterpolation`.
|
|
1110
|
+
* @param ctx the parse tree
|
|
1111
|
+
*/
|
|
1112
|
+
enterSqlInterpolation?: (ctx: SqlInterpolationContext) => void;
|
|
1113
|
+
/**
|
|
1114
|
+
* Exit a parse tree produced by `MalloyParser.sqlInterpolation`.
|
|
1115
|
+
* @param ctx the parse tree
|
|
1116
|
+
*/
|
|
1117
|
+
exitSqlInterpolation?: (ctx: SqlInterpolationContext) => void;
|
|
1085
1118
|
/**
|
|
1086
1119
|
* Enter a parse tree produced by `MalloyParser.importStatement`.
|
|
1087
1120
|
* @param ctx the parse tree
|
|
@@ -1993,15 +2026,15 @@ export interface MalloyParserListener extends ParseTreeListener {
|
|
|
1993
2026
|
*/
|
|
1994
2027
|
exitSqlExploreNameRef?: (ctx: SqlExploreNameRefContext) => void;
|
|
1995
2028
|
/**
|
|
1996
|
-
* Enter a parse tree produced by `MalloyParser.
|
|
2029
|
+
* Enter a parse tree produced by `MalloyParser.nameSQLBlock`.
|
|
1997
2030
|
* @param ctx the parse tree
|
|
1998
2031
|
*/
|
|
1999
|
-
|
|
2032
|
+
enterNameSQLBlock?: (ctx: NameSQLBlockContext) => void;
|
|
2000
2033
|
/**
|
|
2001
|
-
* Exit a parse tree produced by `MalloyParser.
|
|
2034
|
+
* Exit a parse tree produced by `MalloyParser.nameSQLBlock`.
|
|
2002
2035
|
* @param ctx the parse tree
|
|
2003
2036
|
*/
|
|
2004
|
-
|
|
2037
|
+
exitNameSQLBlock?: (ctx: NameSQLBlockContext) => void;
|
|
2005
2038
|
/**
|
|
2006
2039
|
* Enter a parse tree produced by `MalloyParser.connectionName`.
|
|
2007
2040
|
* @param ctx the parse tree
|
|
@@ -9,7 +9,7 @@ import { AnonymousQueryContext } from "./MalloyParser";
|
|
|
9
9
|
import { NamedSourceContext } from "./MalloyParser";
|
|
10
10
|
import { TableSourceContext } from "./MalloyParser";
|
|
11
11
|
import { QuerySourceContext } from "./MalloyParser";
|
|
12
|
-
import {
|
|
12
|
+
import { SQLSourceNameContext } from "./MalloyParser";
|
|
13
13
|
import { LiteralTimestampContext } from "./MalloyParser";
|
|
14
14
|
import { LiteralDayContext } from "./MalloyParser";
|
|
15
15
|
import { LiteralWeekContext } from "./MalloyParser";
|
|
@@ -75,7 +75,10 @@ import { ExploreKeywordContext } from "./MalloyParser";
|
|
|
75
75
|
import { DefineQueryContext } from "./MalloyParser";
|
|
76
76
|
import { TopLevelAnonQueryDefContext } from "./MalloyParser";
|
|
77
77
|
import { DefineSQLStatementContext } from "./MalloyParser";
|
|
78
|
-
import {
|
|
78
|
+
import { SqlBlockContext } from "./MalloyParser";
|
|
79
|
+
import { BlockSQLDefContext } from "./MalloyParser";
|
|
80
|
+
import { SqlStringContext } from "./MalloyParser";
|
|
81
|
+
import { SqlInterpolationContext } from "./MalloyParser";
|
|
79
82
|
import { ImportStatementContext } from "./MalloyParser";
|
|
80
83
|
import { ImportURLContext } from "./MalloyParser";
|
|
81
84
|
import { TopLevelQueryDefsContext } from "./MalloyParser";
|
|
@@ -167,7 +170,7 @@ import { JsonObjectContext } from "./MalloyParser";
|
|
|
167
170
|
import { JsonPropertyContext } from "./MalloyParser";
|
|
168
171
|
import { JsonArrayContext } from "./MalloyParser";
|
|
169
172
|
import { SqlExploreNameRefContext } from "./MalloyParser";
|
|
170
|
-
import {
|
|
173
|
+
import { NameSQLBlockContext } from "./MalloyParser";
|
|
171
174
|
import { ConnectionNameContext } from "./MalloyParser";
|
|
172
175
|
/**
|
|
173
176
|
* This interface defines a complete generic visitor for a parse tree produced
|
|
@@ -248,12 +251,12 @@ export interface MalloyParserVisitor<Result> extends ParseTreeVisitor<Result> {
|
|
|
248
251
|
*/
|
|
249
252
|
visitQuerySource?: (ctx: QuerySourceContext) => Result;
|
|
250
253
|
/**
|
|
251
|
-
* Visit a parse tree produced by the `
|
|
254
|
+
* Visit a parse tree produced by the `SQLSourceName`
|
|
252
255
|
* labeled alternative in `MalloyParser.exploreSource`.
|
|
253
256
|
* @param ctx the parse tree
|
|
254
257
|
* @return the visitor result
|
|
255
258
|
*/
|
|
256
|
-
|
|
259
|
+
visitSQLSourceName?: (ctx: SQLSourceNameContext) => Result;
|
|
257
260
|
/**
|
|
258
261
|
* Visit a parse tree produced by the `literalTimestamp`
|
|
259
262
|
* labeled alternative in `MalloyParser.dateLiteral`.
|
|
@@ -703,11 +706,29 @@ export interface MalloyParserVisitor<Result> extends ParseTreeVisitor<Result> {
|
|
|
703
706
|
*/
|
|
704
707
|
visitDefineSQLStatement?: (ctx: DefineSQLStatementContext) => Result;
|
|
705
708
|
/**
|
|
706
|
-
* Visit a parse tree produced by `MalloyParser.
|
|
709
|
+
* Visit a parse tree produced by `MalloyParser.sqlBlock`.
|
|
707
710
|
* @param ctx the parse tree
|
|
708
711
|
* @return the visitor result
|
|
709
712
|
*/
|
|
710
|
-
|
|
713
|
+
visitSqlBlock?: (ctx: SqlBlockContext) => Result;
|
|
714
|
+
/**
|
|
715
|
+
* Visit a parse tree produced by `MalloyParser.blockSQLDef`.
|
|
716
|
+
* @param ctx the parse tree
|
|
717
|
+
* @return the visitor result
|
|
718
|
+
*/
|
|
719
|
+
visitBlockSQLDef?: (ctx: BlockSQLDefContext) => Result;
|
|
720
|
+
/**
|
|
721
|
+
* Visit a parse tree produced by `MalloyParser.sqlString`.
|
|
722
|
+
* @param ctx the parse tree
|
|
723
|
+
* @return the visitor result
|
|
724
|
+
*/
|
|
725
|
+
visitSqlString?: (ctx: SqlStringContext) => Result;
|
|
726
|
+
/**
|
|
727
|
+
* Visit a parse tree produced by `MalloyParser.sqlInterpolation`.
|
|
728
|
+
* @param ctx the parse tree
|
|
729
|
+
* @return the visitor result
|
|
730
|
+
*/
|
|
731
|
+
visitSqlInterpolation?: (ctx: SqlInterpolationContext) => Result;
|
|
711
732
|
/**
|
|
712
733
|
* Visit a parse tree produced by `MalloyParser.importStatement`.
|
|
713
734
|
* @param ctx the parse tree
|
|
@@ -1255,11 +1276,11 @@ export interface MalloyParserVisitor<Result> extends ParseTreeVisitor<Result> {
|
|
|
1255
1276
|
*/
|
|
1256
1277
|
visitSqlExploreNameRef?: (ctx: SqlExploreNameRefContext) => Result;
|
|
1257
1278
|
/**
|
|
1258
|
-
* Visit a parse tree produced by `MalloyParser.
|
|
1279
|
+
* Visit a parse tree produced by `MalloyParser.nameSQLBlock`.
|
|
1259
1280
|
* @param ctx the parse tree
|
|
1260
1281
|
* @return the visitor result
|
|
1261
1282
|
*/
|
|
1262
|
-
|
|
1283
|
+
visitNameSQLBlock?: (ctx: NameSQLBlockContext) => Result;
|
|
1263
1284
|
/**
|
|
1264
1285
|
* Visit a parse tree produced by `MalloyParser.connectionName`.
|
|
1265
1286
|
* @param ctx the parse tree
|