@malloydata/malloy 0.0.24-dev230224214106 → 0.0.24-dev230228224434
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/connection_utils.js +10 -10
- package/dist/dialect/dialect.d.ts +2 -2
- package/dist/dialect/dialect.js +13 -13
- package/dist/dialect/dialect_map.d.ts +1 -1
- package/dist/dialect/duckdb.d.ts +3 -3
- package/dist/dialect/duckdb.js +44 -44
- package/dist/dialect/index.d.ts +6 -6
- package/dist/dialect/postgres.d.ts +3 -3
- package/dist/dialect/postgres.js +46 -46
- package/dist/dialect/standardsql.d.ts +4 -4
- package/dist/dialect/standardsql.js +51 -51
- package/dist/index.d.ts +10 -10
- package/dist/lang/ast/ast-utils.d.ts +1 -1
- package/dist/lang/ast/ast-utils.js +3 -3
- package/dist/lang/ast/elements/define-query.d.ts +3 -3
- package/dist/lang/ast/elements/define-query.js +6 -6
- package/dist/lang/ast/elements/define-source.d.ts +4 -4
- package/dist/lang/ast/elements/define-source.js +8 -8
- package/dist/lang/ast/elements/import-statement.d.ts +2 -2
- package/dist/lang/ast/elements/import-statement.js +7 -7
- package/dist/lang/ast/elements/pipeline-desc.d.ts +5 -5
- package/dist/lang/ast/elements/pipeline-desc.js +11 -11
- package/dist/lang/ast/elements/refined-source.d.ts +4 -4
- package/dist/lang/ast/elements/refined-source.js +6 -6
- package/dist/lang/ast/elements/source.d.ts +3 -3
- package/dist/lang/ast/elements/source.js +1 -1
- package/dist/lang/ast/error-factory.d.ts +1 -1
- package/dist/lang/ast/error-factory.js +15 -15
- package/dist/lang/ast/executors/index-executor.d.ts +7 -7
- package/dist/lang/ast/executors/index-executor.js +4 -4
- package/dist/lang/ast/executors/project-executor.d.ts +5 -5
- package/dist/lang/ast/executors/project-executor.js +2 -2
- package/dist/lang/ast/executors/reduce-executor.d.ts +8 -8
- package/dist/lang/ast/executors/reduce-executor.js +5 -5
- package/dist/lang/ast/expressions/apply.d.ts +2 -2
- package/dist/lang/ast/expressions/apply.js +1 -1
- package/dist/lang/ast/expressions/binary-boolean.d.ts +3 -3
- package/dist/lang/ast/expressions/binary-boolean.js +6 -6
- package/dist/lang/ast/expressions/binary-numeric.d.ts +3 -3
- package/dist/lang/ast/expressions/binary-numeric.js +2 -2
- package/dist/lang/ast/expressions/boolean.d.ts +4 -4
- package/dist/lang/ast/expressions/boolean.js +2 -2
- package/dist/lang/ast/expressions/constant-sub-expression.d.ts +4 -4
- package/dist/lang/ast/expressions/constant-sub-expression.js +12 -12
- package/dist/lang/ast/expressions/expr-add-sub.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-add-sub.js +1 -1
- package/dist/lang/ast/expressions/expr-aggregate-function.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-aggregate-function.js +15 -15
- package/dist/lang/ast/expressions/expr-alternation-tree.d.ts +6 -6
- package/dist/lang/ast/expressions/expr-alternation-tree.js +6 -6
- package/dist/lang/ast/expressions/expr-asymmetric.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-asymmetric.js +3 -3
- package/dist/lang/ast/expressions/expr-avg.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-avg.js +2 -2
- package/dist/lang/ast/expressions/expr-cast.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-cast.js +6 -6
- package/dist/lang/ast/expressions/expr-compare.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-compare.js +9 -9
- package/dist/lang/ast/expressions/expr-count-distinct.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-count-distinct.js +1 -1
- package/dist/lang/ast/expressions/expr-count.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-count.js +10 -10
- package/dist/lang/ast/expressions/expr-filter.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-filter.js +13 -13
- package/dist/lang/ast/expressions/expr-func.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-func.js +8 -8
- package/dist/lang/ast/expressions/expr-granular-time.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-granular-time.js +17 -17
- package/dist/lang/ast/expressions/expr-id-reference.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-id-reference.js +11 -11
- package/dist/lang/ast/expressions/expr-logical-op.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-logical-op.js +1 -1
- package/dist/lang/ast/expressions/expr-max.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-max.js +1 -1
- package/dist/lang/ast/expressions/expr-min.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-min.js +1 -1
- package/dist/lang/ast/expressions/expr-minus.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-minus.js +5 -5
- package/dist/lang/ast/expressions/expr-mul-div.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-mul-div.js +1 -1
- package/dist/lang/ast/expressions/expr-not.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-not.js +3 -3
- package/dist/lang/ast/expressions/expr-now.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-now.js +8 -8
- package/dist/lang/ast/expressions/expr-null.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-null.js +4 -4
- package/dist/lang/ast/expressions/expr-number.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-number.js +2 -2
- package/dist/lang/ast/expressions/expr-parens.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-parens.js +3 -3
- package/dist/lang/ast/expressions/expr-regex.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-regex.js +4 -4
- package/dist/lang/ast/expressions/expr-string.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-string.js +8 -8
- package/dist/lang/ast/expressions/expr-sum.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-sum.js +2 -2
- package/dist/lang/ast/expressions/expr-time-extract.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-time-extract.js +30 -30
- package/dist/lang/ast/expressions/expr-time.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-time.js +10 -10
- package/dist/lang/ast/expressions/expr-ungroup.d.ts +6 -6
- package/dist/lang/ast/expressions/expr-ungroup.js +13 -13
- package/dist/lang/ast/expressions/for-range.d.ts +4 -4
- package/dist/lang/ast/expressions/for-range.js +17 -17
- package/dist/lang/ast/expressions/granular-literal.d.ts +4 -4
- package/dist/lang/ast/expressions/granular-literal.js +34 -34
- package/dist/lang/ast/expressions/partial-compare.d.ts +4 -4
- package/dist/lang/ast/expressions/partial-compare.js +4 -4
- package/dist/lang/ast/expressions/pick-when.d.ts +4 -4
- package/dist/lang/ast/expressions/pick-when.js +32 -32
- package/dist/lang/ast/expressions/range.d.ts +3 -3
- package/dist/lang/ast/expressions/range.js +20 -20
- package/dist/lang/ast/expressions/time-frame.d.ts +2 -2
- package/dist/lang/ast/expressions/time-frame.js +3 -3
- package/dist/lang/ast/expressions/top-by.d.ts +4 -4
- package/dist/lang/ast/expressions/top-by.js +5 -5
- package/dist/lang/ast/expressions/unary.d.ts +1 -1
- package/dist/lang/ast/expressions/unary.js +1 -1
- package/dist/lang/ast/expressions/utils.d.ts +2 -2
- package/dist/lang/ast/expressions/utils.js +6 -6
- package/dist/lang/ast/field-space/column-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/dynamic-space.d.ts +7 -7
- package/dist/lang/ast/field-space/dynamic-space.js +2 -2
- package/dist/lang/ast/field-space/field-definition-value.d.ts +5 -5
- package/dist/lang/ast/field-space/index-field-space.d.ts +3 -3
- package/dist/lang/ast/field-space/index-field-space.js +4 -4
- package/dist/lang/ast/field-space/join-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/project-field-space.d.ts +2 -2
- package/dist/lang/ast/field-space/project-field-space.js +5 -5
- package/dist/lang/ast/field-space/query-field-struct.d.ts +3 -3
- package/dist/lang/ast/field-space/query-field-struct.js +1 -1
- package/dist/lang/ast/field-space/query-space-field.d.ts +4 -4
- package/dist/lang/ast/field-space/query-space-field.js +1 -1
- package/dist/lang/ast/field-space/query-spaces.d.ts +11 -11
- package/dist/lang/ast/field-space/query-spaces.js +8 -8
- package/dist/lang/ast/field-space/reference-field.d.ts +5 -5
- package/dist/lang/ast/field-space/reference-field.js +1 -1
- package/dist/lang/ast/field-space/refined-space.d.ts +4 -4
- package/dist/lang/ast/field-space/refined-space.js +2 -2
- package/dist/lang/ast/field-space/rename-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/rename-space-field.js +2 -2
- package/dist/lang/ast/field-space/static-space.d.ts +7 -7
- package/dist/lang/ast/field-space/static-space.js +12 -12
- package/dist/lang/ast/field-space/struct-space-field-base.d.ts +4 -4
- package/dist/lang/ast/field-space/struct-space-field-base.js +1 -1
- package/dist/lang/ast/field-space/wild-space-field.d.ts +4 -4
- package/dist/lang/ast/field-space/wild-space-field.js +1 -1
- package/dist/lang/ast/fragtype-utils.d.ts +1 -1
- package/dist/lang/ast/fragtype-utils.js +15 -15
- package/dist/lang/ast/index.d.ts +90 -90
- package/dist/lang/ast/parameters/constant-parameter.d.ts +3 -3
- package/dist/lang/ast/parameters/constant-parameter.js +10 -10
- package/dist/lang/ast/parameters/has-parameter.d.ts +3 -3
- package/dist/lang/ast/parameters/has-parameter.js +7 -7
- package/dist/lang/ast/query-elements/anonymous-query.d.ts +3 -3
- package/dist/lang/ast/query-elements/anonymous-query.js +2 -2
- package/dist/lang/ast/query-elements/existing-query.d.ts +4 -4
- package/dist/lang/ast/query-elements/existing-query.js +10 -10
- package/dist/lang/ast/query-elements/full-query.d.ts +4 -4
- package/dist/lang/ast/query-elements/full-query.js +10 -10
- package/dist/lang/ast/query-elements/query-head-struct.d.ts +2 -2
- package/dist/lang/ast/query-elements/query-head-struct.js +2 -2
- package/dist/lang/ast/query-items/field-declaration.d.ts +6 -6
- package/dist/lang/ast/query-items/field-declaration.js +14 -14
- package/dist/lang/ast/query-items/field-references.d.ts +6 -6
- package/dist/lang/ast/query-items/field-references.js +9 -9
- package/dist/lang/ast/query-properties/aggregate.d.ts +2 -2
- package/dist/lang/ast/query-properties/aggregate.js +1 -1
- package/dist/lang/ast/query-properties/declare-fields.d.ts +2 -2
- package/dist/lang/ast/query-properties/declare-fields.js +1 -1
- package/dist/lang/ast/query-properties/dimmensions.d.ts +2 -2
- package/dist/lang/ast/query-properties/dimmensions.js +1 -1
- package/dist/lang/ast/query-properties/filters.d.ts +4 -4
- package/dist/lang/ast/query-properties/filters.js +16 -16
- package/dist/lang/ast/query-properties/group-by.d.ts +2 -2
- package/dist/lang/ast/query-properties/group-by.js +1 -1
- package/dist/lang/ast/query-properties/indexing.d.ts +3 -3
- package/dist/lang/ast/query-properties/indexing.js +3 -3
- package/dist/lang/ast/query-properties/joins.d.ts +6 -6
- package/dist/lang/ast/query-properties/joins.js +27 -27
- package/dist/lang/ast/query-properties/limit.d.ts +1 -1
- package/dist/lang/ast/query-properties/limit.js +1 -1
- package/dist/lang/ast/query-properties/measures.d.ts +2 -2
- package/dist/lang/ast/query-properties/measures.js +1 -1
- package/dist/lang/ast/query-properties/nest-reference.d.ts +2 -2
- package/dist/lang/ast/query-properties/nest-reference.js +1 -1
- package/dist/lang/ast/query-properties/nest.d.ts +7 -7
- package/dist/lang/ast/query-properties/nest.js +7 -7
- package/dist/lang/ast/query-properties/nests.d.ts +2 -2
- package/dist/lang/ast/query-properties/nests.js +1 -1
- package/dist/lang/ast/query-properties/ordering.d.ts +3 -3
- package/dist/lang/ast/query-properties/ordering.js +6 -6
- package/dist/lang/ast/query-properties/project-statement.d.ts +2 -2
- package/dist/lang/ast/query-properties/project-statement.js +1 -1
- package/dist/lang/ast/query-properties/qop-desc.d.ts +7 -7
- package/dist/lang/ast/query-properties/qop-desc.js +20 -20
- package/dist/lang/ast/query-properties/sampling.d.ts +2 -2
- package/dist/lang/ast/query-properties/sampling.js +1 -1
- package/dist/lang/ast/query-properties/top.d.ts +4 -4
- package/dist/lang/ast/query-properties/top.js +5 -5
- package/dist/lang/ast/source-properties/field-list-edit.d.ts +4 -4
- package/dist/lang/ast/source-properties/field-list-edit.js +2 -2
- package/dist/lang/ast/source-properties/primary-key.d.ts +2 -2
- package/dist/lang/ast/source-properties/primary-key.js +2 -2
- package/dist/lang/ast/source-properties/renames.d.ts +2 -2
- package/dist/lang/ast/source-properties/renames.js +3 -3
- package/dist/lang/ast/source-properties/turtles.d.ts +2 -2
- package/dist/lang/ast/source-properties/turtles.js +1 -1
- package/dist/lang/ast/sources/named-source.d.ts +4 -4
- package/dist/lang/ast/sources/named-source.js +5 -5
- package/dist/lang/ast/sources/query-source.d.ts +3 -3
- package/dist/lang/ast/sources/query-source.js +3 -3
- package/dist/lang/ast/sources/sql-source.d.ts +2 -2
- package/dist/lang/ast/sources/sql-source.js +2 -2
- package/dist/lang/ast/sources/table-source.d.ts +2 -2
- package/dist/lang/ast/sources/table-source.js +7 -7
- package/dist/lang/ast/space-seed.d.ts +2 -2
- package/dist/lang/ast/space-seed.js +1 -1
- package/dist/lang/ast/sql-elements/sql-statement.d.ts +4 -4
- package/dist/lang/ast/sql-elements/sql-statement.js +9 -9
- package/dist/lang/ast/sql-elements/sql-string.d.ts +3 -3
- package/dist/lang/ast/sql-elements/sql-string.js +6 -6
- package/dist/lang/ast/struct-utils.d.ts +2 -2
- package/dist/lang/ast/struct-utils.js +3 -3
- package/dist/lang/ast/time-utils.d.ts +6 -6
- package/dist/lang/ast/time-utils.js +46 -46
- package/dist/lang/ast/types/document-compile-result.d.ts +2 -2
- package/dist/lang/ast/types/executor.d.ts +3 -3
- package/dist/lang/ast/types/explore-desc.d.ts +2 -2
- package/dist/lang/ast/types/explore-desc.js +1 -1
- package/dist/lang/ast/types/explore-field.d.ts +3 -3
- package/dist/lang/ast/types/expr-result.d.ts +2 -2
- package/dist/lang/ast/types/expr-value.d.ts +2 -2
- package/dist/lang/ast/types/expression-def.d.ts +4 -4
- package/dist/lang/ast/types/expression-def.js +86 -86
- package/dist/lang/ast/types/field-collection-member.d.ts +3 -3
- package/dist/lang/ast/types/field-decl.d.ts +5 -5
- package/dist/lang/ast/types/field-space.d.ts +5 -5
- package/dist/lang/ast/types/field-space.js +1 -1
- package/dist/lang/ast/types/granular-result.d.ts +3 -3
- package/dist/lang/ast/types/granular-result.js +1 -1
- package/dist/lang/ast/types/lookup-result.d.ts +1 -1
- package/dist/lang/ast/types/malloy-element.d.ts +6 -6
- package/dist/lang/ast/types/malloy-element.js +49 -49
- package/dist/lang/ast/types/model-entry.d.ts +1 -1
- package/dist/lang/ast/types/name-space.d.ts +1 -1
- package/dist/lang/ast/types/nested-query.d.ts +2 -2
- package/dist/lang/ast/types/op-desc.d.ts +2 -2
- package/dist/lang/ast/types/query-comp.d.ts +1 -1
- package/dist/lang/ast/types/query-element.d.ts +3 -3
- package/dist/lang/ast/types/query-item.d.ts +4 -4
- package/dist/lang/ast/types/query-property.d.ts +15 -15
- package/dist/lang/ast/types/source-property.d.ts +8 -8
- package/dist/lang/ast/types/space-entry.d.ts +2 -2
- package/dist/lang/ast/types/space-field.d.ts +4 -4
- package/dist/lang/ast/types/space-field.js +4 -4
- package/dist/lang/ast/types/space-param.d.ts +4 -4
- package/dist/lang/ast/types/space-param.js +4 -4
- package/dist/lang/ast/types/time-result.d.ts +2 -2
- package/dist/lang/ast/types/turtle-headed-pipe.d.ts +2 -2
- package/dist/lang/ast/types/turtle-headed-pipe.js +1 -1
- package/dist/lang/ast/types/type-desc.d.ts +3 -3
- package/dist/lang/field-utils.d.ts +1 -1
- package/dist/lang/field-utils.js +4 -4
- package/dist/lang/index.d.ts +10 -10
- package/dist/lang/malloy-to-ast.d.ts +8 -8
- package/dist/lang/malloy-to-ast.js +68 -68
- package/dist/lang/parse-error-handler.d.ts +3 -3
- package/dist/lang/parse-error-handler.js +4 -4
- package/dist/lang/parse-log.d.ts +2 -2
- package/dist/lang/parse-log.js +1 -1
- package/dist/lang/parse-malloy.d.ts +7 -7
- package/dist/lang/parse-malloy.js +81 -81
- package/dist/lang/parse-tree-walkers/document-completion-walker.d.ts +2 -2
- package/dist/lang/parse-tree-walkers/document-completion-walker.js +38 -38
- package/dist/lang/parse-tree-walkers/document-help-context-walker.d.ts +1 -1
- package/dist/lang/parse-tree-walkers/document-help-context-walker.js +14 -14
- package/dist/lang/parse-tree-walkers/document-highlight-walker.d.ts +3 -3
- package/dist/lang/parse-tree-walkers/document-highlight-walker.js +85 -85
- package/dist/lang/parse-tree-walkers/document-symbol-walker.d.ts +4 -4
- package/dist/lang/parse-tree-walkers/document-symbol-walker.js +40 -40
- package/dist/lang/parse-tree-walkers/explore-query-walker.d.ts +3 -3
- package/dist/lang/parse-tree-walkers/explore-query-walker.js +3 -3
- package/dist/lang/parse-tree-walkers/find-external-references.d.ts +4 -4
- package/dist/lang/parse-tree-walkers/find-external-references.js +2 -2
- package/dist/lang/reference-list.d.ts +1 -1
- package/dist/lang/test/document-help-context-walker.spec.js +9 -9
- package/dist/lang/test/document-symbol-walker.spec.js +32 -32
- package/dist/lang/test/field-symbols.spec.js +87 -87
- package/dist/lang/test/parse.spec.d.ts +1 -1
- package/dist/lang/test/parse.spec.js +768 -768
- package/dist/lang/test/test-translator.d.ts +6 -6
- package/dist/lang/test/test-translator.js +159 -159
- package/dist/lang/translate-response.d.ts +7 -7
- package/dist/lang/translate-response.js +1 -1
- package/dist/lang/zone.d.ts +5 -5
- package/dist/lang/zone.js +8 -8
- package/dist/malloy.d.ts +7 -7
- package/dist/malloy.js +192 -192
- package/dist/model/index.d.ts +2 -2
- package/dist/model/malloy_query.d.ts +12 -12
- package/dist/model/malloy_query.js +497 -502
- package/dist/model/malloy_types.d.ts +68 -68
- package/dist/model/malloy_types.js +102 -102
- package/dist/model/sql_block.d.ts +1 -1
- package/dist/model/sql_block.js +4 -4
- package/dist/model/utils.d.ts +1 -1
- package/dist/model/utils.js +10 -10
- package/dist/runtime_types.d.ts +2 -2
- package/package.json +4 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TimestampUnit } from
|
|
2
|
-
import { ExprValue } from
|
|
3
|
-
import { TimeResult } from
|
|
1
|
+
import { TimestampUnit } from '../../../model/malloy_types';
|
|
2
|
+
import { ExprValue } from './expr-value';
|
|
3
|
+
import { TimeResult } from './time-result';
|
|
4
4
|
export interface GranularResult extends TimeResult {
|
|
5
5
|
timeframe: TimestampUnit;
|
|
6
6
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.isGranularResult = void 0;
|
|
26
26
|
function isGranularResult(v) {
|
|
27
|
-
if (v.dataType !==
|
|
27
|
+
if (v.dataType !== 'date' && v.dataType !== 'timestamp') {
|
|
28
28
|
return false;
|
|
29
29
|
}
|
|
30
30
|
return v.timeframe !== undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DocumentLocation, DocumentReference, ModelDef, Query, SQLBlockStructDef } from
|
|
2
|
-
import { MalloyTranslation } from
|
|
3
|
-
import { ModelDataRequest } from
|
|
4
|
-
import { DocumentCompileResult } from
|
|
5
|
-
import { ModelEntry } from
|
|
6
|
-
import { NameSpace } from
|
|
1
|
+
import { DocumentLocation, DocumentReference, ModelDef, Query, SQLBlockStructDef } from '../../../model/malloy_types';
|
|
2
|
+
import { MalloyTranslation } from '../../parse-malloy';
|
|
3
|
+
import { ModelDataRequest } from '../../translate-response';
|
|
4
|
+
import { DocumentCompileResult } from './document-compile-result';
|
|
5
|
+
import { ModelEntry } from './model-entry';
|
|
6
|
+
import { NameSpace } from './name-space';
|
|
7
7
|
export declare abstract class MalloyElement {
|
|
8
8
|
abstract elementType: string;
|
|
9
9
|
codeLocation?: DocumentLocation;
|
|
@@ -69,11 +69,11 @@ class MalloyElement {
|
|
|
69
69
|
return this.parent.location;
|
|
70
70
|
}
|
|
71
71
|
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
72
|
+
url: this.sourceURL,
|
|
73
|
+
range: {
|
|
74
|
+
start: { line: 0, character: 0 },
|
|
75
|
+
end: { line: 0, character: 0 },
|
|
76
|
+
},
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
set location(loc) {
|
|
@@ -86,36 +86,36 @@ class MalloyElement {
|
|
|
86
86
|
else if (this.parent) {
|
|
87
87
|
return this.parent.namespace();
|
|
88
88
|
}
|
|
89
|
-
throw new Error(
|
|
89
|
+
throw new Error('INTERNAL ERROR: Translation without document scope');
|
|
90
90
|
}
|
|
91
91
|
modelEntry(reference) {
|
|
92
92
|
var _a;
|
|
93
93
|
const key = reference instanceof ModelEntryReference ? reference.name : reference;
|
|
94
94
|
const result = (_a = this.namespace()) === null || _a === void 0 ? void 0 : _a.getEntry(key);
|
|
95
95
|
if (reference instanceof ModelEntryReference) {
|
|
96
|
-
if ((result === null || result === void 0 ? void 0 : result.entry.type) ===
|
|
96
|
+
if ((result === null || result === void 0 ? void 0 : result.entry.type) === 'query') {
|
|
97
97
|
this.addReference({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
type: 'queryReference',
|
|
99
|
+
text: key,
|
|
100
|
+
definition: result.entry,
|
|
101
|
+
location: reference.location,
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
else if ((result === null || result === void 0 ? void 0 : result.entry.type) ===
|
|
104
|
+
else if ((result === null || result === void 0 ? void 0 : result.entry.type) === 'struct') {
|
|
105
105
|
if ((0, malloy_types_1.isSQLBlock)(result.entry)) {
|
|
106
106
|
this.addReference({
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
type: 'sqlBlockReference',
|
|
108
|
+
text: key,
|
|
109
|
+
definition: result.entry,
|
|
110
|
+
location: reference.location,
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
else {
|
|
114
114
|
this.addReference({
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
type: 'exploreReference',
|
|
116
|
+
text: key,
|
|
117
|
+
definition: result.entry,
|
|
118
|
+
location: reference.location,
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
}
|
|
@@ -140,7 +140,7 @@ class MalloyElement {
|
|
|
140
140
|
}
|
|
141
141
|
get sourceURL() {
|
|
142
142
|
const trans = this.translator();
|
|
143
|
-
return (trans === null || trans === void 0 ? void 0 : trans.sourceURL) ||
|
|
143
|
+
return (trans === null || trans === void 0 ? void 0 : trans.sourceURL) || '(missing)';
|
|
144
144
|
}
|
|
145
145
|
errorsExist() {
|
|
146
146
|
var _a;
|
|
@@ -162,7 +162,7 @@ class MalloyElement {
|
|
|
162
162
|
this.logged.add(message);
|
|
163
163
|
}
|
|
164
164
|
const trans = this.translator();
|
|
165
|
-
const msg = {
|
|
165
|
+
const msg = { at: this.location, message };
|
|
166
166
|
const logTo = trans === null || trans === void 0 ? void 0 : trans.root.logger;
|
|
167
167
|
if (logTo) {
|
|
168
168
|
logTo.log(msg);
|
|
@@ -177,25 +177,25 @@ class MalloyElement {
|
|
|
177
177
|
* @param indent only used for recursion
|
|
178
178
|
*/
|
|
179
179
|
toString() {
|
|
180
|
-
return this.stringify(
|
|
180
|
+
return this.stringify('', 0);
|
|
181
181
|
}
|
|
182
182
|
stringify(prefix, indent) {
|
|
183
|
-
const left =
|
|
183
|
+
const left = ' '.repeat(indent);
|
|
184
184
|
let asString = `${left}${prefix}<${this.elementType}>${this.varInfo()}`;
|
|
185
185
|
for (const kidLabel of Object.keys(this.children)) {
|
|
186
186
|
const kiddle = this.children[kidLabel];
|
|
187
187
|
if (kiddle instanceof MalloyElement) {
|
|
188
|
-
asString +=
|
|
188
|
+
asString += '\n' + kiddle.stringify(`${kidLabel}: `, indent + 2);
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
191
191
|
asString += `\n${left} ${kidLabel}: [`;
|
|
192
192
|
if (kiddle.length > 0) {
|
|
193
193
|
asString +=
|
|
194
|
-
|
|
195
|
-
kiddle.map(
|
|
194
|
+
'\n' +
|
|
195
|
+
kiddle.map(k => k.stringify('', indent + 4)).join('\n') +
|
|
196
196
|
`\n${left} `;
|
|
197
197
|
}
|
|
198
|
-
asString +=
|
|
198
|
+
asString += ']';
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
return asString;
|
|
@@ -215,13 +215,13 @@ class MalloyElement {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
varInfo() {
|
|
218
|
-
let extra =
|
|
218
|
+
let extra = '';
|
|
219
219
|
for (const [key, value] of Object.entries(this)) {
|
|
220
|
-
if (key !==
|
|
221
|
-
if (typeof value
|
|
220
|
+
if (key !== 'elementType') {
|
|
221
|
+
if (typeof value === 'boolean') {
|
|
222
222
|
extra += value ? ` ${key}` : ` !${key}`;
|
|
223
223
|
}
|
|
224
|
-
else if (typeof value ===
|
|
224
|
+
else if (typeof value === 'string' || typeof value === 'number') {
|
|
225
225
|
extra += ` ${key}=${value}`;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -237,7 +237,7 @@ exports.MalloyElement = MalloyElement;
|
|
|
237
237
|
class Unimplemented extends MalloyElement {
|
|
238
238
|
constructor() {
|
|
239
239
|
super(...arguments);
|
|
240
|
-
this.elementType =
|
|
240
|
+
this.elementType = 'unimplemented';
|
|
241
241
|
this.reported = false;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -246,7 +246,7 @@ class ModelEntryReference extends MalloyElement {
|
|
|
246
246
|
constructor(name) {
|
|
247
247
|
super();
|
|
248
248
|
this.name = name;
|
|
249
|
-
this.elementType =
|
|
249
|
+
this.elementType = 'modelEntryReference';
|
|
250
250
|
}
|
|
251
251
|
get refString() {
|
|
252
252
|
return this.name;
|
|
@@ -264,8 +264,8 @@ class ListOf extends MalloyElement {
|
|
|
264
264
|
constructor(listDesc, elements) {
|
|
265
265
|
super();
|
|
266
266
|
this.elements = elements;
|
|
267
|
-
this.elementType =
|
|
268
|
-
if (this.elementType ===
|
|
267
|
+
this.elementType = 'genericElementList';
|
|
268
|
+
if (this.elementType === 'genericElementList') {
|
|
269
269
|
this.elementType = listDesc;
|
|
270
270
|
}
|
|
271
271
|
this.newContents();
|
|
@@ -329,13 +329,13 @@ exports.RunList = RunList;
|
|
|
329
329
|
class Document extends MalloyElement {
|
|
330
330
|
constructor(statements) {
|
|
331
331
|
super();
|
|
332
|
-
this.elementType =
|
|
332
|
+
this.elementType = 'document';
|
|
333
333
|
this.documentModel = {};
|
|
334
334
|
this.queryList = [];
|
|
335
335
|
this.sqlBlocks = [];
|
|
336
336
|
this.didInitModel = false;
|
|
337
|
-
this.statements = new RunList(
|
|
338
|
-
this.has({
|
|
337
|
+
this.statements = new RunList('topLevelStatements', statements);
|
|
338
|
+
this.has({ statements: statements });
|
|
339
339
|
}
|
|
340
340
|
initModelDef(extendingModelDef) {
|
|
341
341
|
if (this.didInitModel) {
|
|
@@ -347,9 +347,9 @@ class Document extends MalloyElement {
|
|
|
347
347
|
if (extendingModelDef) {
|
|
348
348
|
for (const inName in extendingModelDef.contents) {
|
|
349
349
|
const struct = extendingModelDef.contents[inName];
|
|
350
|
-
if (struct.type
|
|
350
|
+
if (struct.type === 'struct') {
|
|
351
351
|
const exported = extendingModelDef.exports.includes(inName);
|
|
352
|
-
this.setEntry(inName, {
|
|
352
|
+
this.setEntry(inName, { entry: struct, exported });
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
}
|
|
@@ -358,18 +358,18 @@ class Document extends MalloyElement {
|
|
|
358
358
|
compile() {
|
|
359
359
|
const needs = this.statements.executeList(this);
|
|
360
360
|
const ret = {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
needs
|
|
361
|
+
modelDef: this.modelDef(),
|
|
362
|
+
queryList: this.queryList,
|
|
363
|
+
sqlBlocks: this.sqlBlocks,
|
|
364
|
+
needs,
|
|
365
365
|
};
|
|
366
366
|
return ret;
|
|
367
367
|
}
|
|
368
368
|
modelDef() {
|
|
369
|
-
const def = {
|
|
369
|
+
const def = { name: '', exports: [], contents: {} };
|
|
370
370
|
for (const entry in this.documentModel) {
|
|
371
371
|
const entryDef = this.documentModel[entry].entry;
|
|
372
|
-
if (entryDef.type ===
|
|
372
|
+
if (entryDef.type === 'struct' || entryDef.type === 'query') {
|
|
373
373
|
if (this.documentModel[entry].exported) {
|
|
374
374
|
def.exports.push(entry);
|
|
375
375
|
}
|
|
@@ -379,13 +379,13 @@ class Document extends MalloyElement {
|
|
|
379
379
|
return def;
|
|
380
380
|
}
|
|
381
381
|
defineSQL(sql, name) {
|
|
382
|
-
const ret = { ...sql,
|
|
382
|
+
const ret = { ...sql, as: `$${this.sqlBlocks.length}` };
|
|
383
383
|
if (name) {
|
|
384
384
|
if (this.getEntry(name)) {
|
|
385
385
|
return false;
|
|
386
386
|
}
|
|
387
387
|
ret.as = name;
|
|
388
|
-
this.setEntry(name, {
|
|
388
|
+
this.setEntry(name, { entry: ret, sqlType: true });
|
|
389
389
|
}
|
|
390
390
|
this.sqlBlocks.push(ret);
|
|
391
391
|
return true;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { NestDefinition, NestRefinement } from
|
|
2
|
-
import { NestReference } from
|
|
1
|
+
import { NestDefinition, NestRefinement } from '../query-properties/nest';
|
|
2
|
+
import { NestReference } from '../query-properties/nest-reference';
|
|
3
3
|
export declare type NestedQuery = NestReference | NestDefinition | NestRefinement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PipeSegment } from
|
|
2
|
-
import { FieldSpace } from
|
|
1
|
+
import { PipeSegment } from '../../../model/malloy_types';
|
|
2
|
+
import { FieldSpace } from './field-space';
|
|
3
3
|
export interface OpDesc {
|
|
4
4
|
segment: PipeSegment;
|
|
5
5
|
outputSpace: () => FieldSpace;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MalloyElement } from
|
|
2
|
-
import { ExistingQuery } from
|
|
3
|
-
import { FullQuery } from
|
|
1
|
+
import { MalloyElement } from './malloy-element';
|
|
2
|
+
import { ExistingQuery } from '../query-elements/existing-query';
|
|
3
|
+
import { FullQuery } from '../query-elements/full-query';
|
|
4
4
|
export declare type QueryElement = FullQuery | ExistingQuery;
|
|
5
5
|
export declare function isQueryElement(e: MalloyElement): e is QueryElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldDeclaration } from
|
|
2
|
-
import { FieldReference } from
|
|
3
|
-
import { NestReference } from
|
|
4
|
-
import { NestDefinition } from
|
|
1
|
+
import { FieldDeclaration } from '../query-items/field-declaration';
|
|
2
|
+
import { FieldReference } from '../query-items/field-references';
|
|
3
|
+
import { NestReference } from '../query-properties/nest-reference';
|
|
4
|
+
import { NestDefinition } from '../query-properties/nest';
|
|
5
5
|
export declare type QueryItem = FieldDeclaration | FieldReference | NestDefinition | NestReference;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { NestDefinition } from
|
|
2
|
-
import { NestReference } from
|
|
3
|
-
import { MalloyElement } from
|
|
4
|
-
import { Aggregate } from
|
|
5
|
-
import { DeclareFields } from
|
|
6
|
-
import { Filter } from
|
|
7
|
-
import { GroupBy } from
|
|
8
|
-
import { Index } from
|
|
9
|
-
import { Joins } from
|
|
10
|
-
import { Limit } from
|
|
11
|
-
import { Nests } from
|
|
12
|
-
import { Ordering } from
|
|
13
|
-
import { ProjectStatement } from
|
|
14
|
-
import { SampleProperty } from
|
|
15
|
-
import { Top } from
|
|
1
|
+
import { NestDefinition } from '../query-properties/nest';
|
|
2
|
+
import { NestReference } from '../query-properties/nest-reference';
|
|
3
|
+
import { MalloyElement } from './malloy-element';
|
|
4
|
+
import { Aggregate } from '../query-properties/aggregate';
|
|
5
|
+
import { DeclareFields } from '../query-properties/declare-fields';
|
|
6
|
+
import { Filter } from '../query-properties/filters';
|
|
7
|
+
import { GroupBy } from '../query-properties/group-by';
|
|
8
|
+
import { Index } from '../query-properties/indexing';
|
|
9
|
+
import { Joins } from '../query-properties/joins';
|
|
10
|
+
import { Limit } from '../query-properties/limit';
|
|
11
|
+
import { Nests } from '../query-properties/nests';
|
|
12
|
+
import { Ordering } from '../query-properties/ordering';
|
|
13
|
+
import { ProjectStatement } from '../query-properties/project-statement';
|
|
14
|
+
import { SampleProperty } from '../query-properties/sampling';
|
|
15
|
+
import { Top } from '../query-properties/top';
|
|
16
16
|
export declare type QueryProperty = Ordering | Top | Limit | Filter | Index | SampleProperty | Joins | DeclareFields | ProjectStatement | NestReference | NestDefinition | NestReference | Nests | Aggregate | GroupBy;
|
|
17
17
|
export declare function isQueryProperty(q: MalloyElement): q is QueryProperty;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Filter } from
|
|
2
|
-
import { Joins } from
|
|
3
|
-
import { DeclareFields } from
|
|
4
|
-
import { FieldListEdit } from
|
|
5
|
-
import { Renames } from
|
|
6
|
-
import { PrimaryKey } from
|
|
7
|
-
import { Turtles } from
|
|
8
|
-
import { MalloyElement } from
|
|
1
|
+
import { Filter } from '../query-properties/filters';
|
|
2
|
+
import { Joins } from '../query-properties/joins';
|
|
3
|
+
import { DeclareFields } from '../query-properties/declare-fields';
|
|
4
|
+
import { FieldListEdit } from '../source-properties/field-list-edit';
|
|
5
|
+
import { Renames } from '../source-properties/renames';
|
|
6
|
+
import { PrimaryKey } from '../source-properties/primary-key';
|
|
7
|
+
import { Turtles } from '../source-properties/turtles';
|
|
8
|
+
import { MalloyElement } from './malloy-element';
|
|
9
9
|
export declare type SourceProperty = Filter | Joins | DeclareFields | FieldListEdit | Renames | PrimaryKey | Turtles;
|
|
10
10
|
export declare function isSourceProperty(p: MalloyElement): p is SourceProperty;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FieldDef, QueryFieldDef } from
|
|
2
|
-
import { SpaceEntry } from
|
|
3
|
-
import { FieldSpace } from
|
|
4
|
-
import { TypeDesc } from
|
|
1
|
+
import { FieldDef, QueryFieldDef } from '../../../model/malloy_types';
|
|
2
|
+
import { SpaceEntry } from './space-entry';
|
|
3
|
+
import { FieldSpace } from './field-space';
|
|
4
|
+
import { TypeDesc } from './type-desc';
|
|
5
5
|
export declare abstract class SpaceField extends SpaceEntry {
|
|
6
6
|
readonly refType = "field";
|
|
7
7
|
protected fieldTypeFromFieldDef(def: FieldDef): TypeDesc;
|
|
@@ -28,15 +28,15 @@ const space_entry_1 = require("./space-entry");
|
|
|
28
28
|
class SpaceField extends space_entry_1.SpaceEntry {
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
|
-
this.refType =
|
|
31
|
+
this.refType = 'field';
|
|
32
32
|
}
|
|
33
33
|
fieldTypeFromFieldDef(def) {
|
|
34
|
-
const ref = {
|
|
34
|
+
const ref = { dataType: def.type, expressionType: 'scalar' };
|
|
35
35
|
if ((0, malloy_types_1.isFieldTypeDef)(def) && def.expressionType) {
|
|
36
36
|
ref.expressionType = def.expressionType;
|
|
37
37
|
}
|
|
38
|
-
if (ref.dataType ===
|
|
39
|
-
def.type ===
|
|
38
|
+
if (ref.dataType === 'unsupported' &&
|
|
39
|
+
def.type === 'unsupported' &&
|
|
40
40
|
def.rawType) {
|
|
41
41
|
ref.rawType = def.rawType;
|
|
42
42
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Parameter } from
|
|
2
|
-
import { SpaceEntry } from
|
|
3
|
-
import { HasParameter } from
|
|
4
|
-
import { TypeDesc } from
|
|
1
|
+
import { Parameter } from '../../../model/malloy_types';
|
|
2
|
+
import { SpaceEntry } from './space-entry';
|
|
3
|
+
import { HasParameter } from '../parameters/has-parameter';
|
|
4
|
+
import { TypeDesc } from './type-desc';
|
|
5
5
|
export declare abstract class SpaceParam extends SpaceEntry {
|
|
6
6
|
abstract parameter(): Parameter;
|
|
7
7
|
readonly refType = "parameter";
|
|
@@ -27,7 +27,7 @@ const space_entry_1 = require("./space-entry");
|
|
|
27
27
|
class SpaceParam extends space_entry_1.SpaceEntry {
|
|
28
28
|
constructor() {
|
|
29
29
|
super(...arguments);
|
|
30
|
-
this.refType =
|
|
30
|
+
this.refType = 'parameter';
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.SpaceParam = SpaceParam;
|
|
@@ -40,8 +40,8 @@ class AbstractParameter extends SpaceParam {
|
|
|
40
40
|
return this.astParam.parameter();
|
|
41
41
|
}
|
|
42
42
|
typeDesc() {
|
|
43
|
-
const type = this.astParam.type ||
|
|
44
|
-
return {
|
|
43
|
+
const type = this.astParam.type || 'unknown';
|
|
44
|
+
return { dataType: type, expressionType: 'scalar' };
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
exports.AbstractParameter = AbstractParameter;
|
|
@@ -54,7 +54,7 @@ class DefinedParameter extends SpaceParam {
|
|
|
54
54
|
return this.paramDef;
|
|
55
55
|
}
|
|
56
56
|
typeDesc() {
|
|
57
|
-
return {
|
|
57
|
+
return { dataType: this.paramDef.type, expressionType: 'scalar' };
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
exports.DefinedParameter = DefinedParameter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TimeFieldType } from
|
|
2
|
-
import { ExprResult } from
|
|
1
|
+
import { TimeFieldType } from '../../../model/malloy_types';
|
|
2
|
+
import { ExprResult } from './expr-result';
|
|
3
3
|
export interface TimeResult extends ExprResult {
|
|
4
4
|
dataType: TimeFieldType;
|
|
5
5
|
alsoTimestamp?: true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PipelineDesc } from
|
|
2
|
-
import { FieldName } from
|
|
1
|
+
import { PipelineDesc } from '../elements/pipeline-desc';
|
|
2
|
+
import { FieldName } from './field-space';
|
|
3
3
|
export declare abstract class TurtleHeadedPipe extends PipelineDesc {
|
|
4
4
|
_turtleName?: FieldName;
|
|
5
5
|
set turtleName(turtleName: FieldName | undefined);
|
|
@@ -27,7 +27,7 @@ const pipeline_desc_1 = require("../elements/pipeline-desc");
|
|
|
27
27
|
class TurtleHeadedPipe extends pipeline_desc_1.PipelineDesc {
|
|
28
28
|
set turtleName(turtleName) {
|
|
29
29
|
this._turtleName = turtleName;
|
|
30
|
-
this.has({
|
|
30
|
+
this.has({ turtleName: turtleName });
|
|
31
31
|
}
|
|
32
32
|
get turtleName() {
|
|
33
33
|
return this._turtleName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AtomicFieldType, ExpressionType } from
|
|
2
|
-
export declare type ExpressionValueType = AtomicFieldType |
|
|
3
|
-
export declare type FieldValueType = ExpressionValueType |
|
|
1
|
+
import { AtomicFieldType, ExpressionType } from '../../../model/malloy_types';
|
|
2
|
+
export declare type ExpressionValueType = AtomicFieldType | 'null' | 'unknown' | 'duration' | 'regular expression';
|
|
3
|
+
export declare type FieldValueType = ExpressionValueType | 'turtle' | 'struct';
|
|
4
4
|
export interface TypeDesc {
|
|
5
5
|
dataType: FieldValueType;
|
|
6
6
|
expressionType: ExpressionType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldDef, QueryFieldDef } from
|
|
1
|
+
import { FieldDef, QueryFieldDef } from '../model/malloy_types';
|
|
2
2
|
declare type Field = QueryFieldDef | FieldDef;
|
|
3
3
|
export declare function nameOf(qfd: Field): string;
|
|
4
4
|
export declare function mergeFields<T extends Field>(older: T[] | undefined, newer: T[]): T[];
|
package/dist/lang/field-utils.js
CHANGED
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.mergeFields = exports.nameOf = void 0;
|
|
26
26
|
function nameOf(qfd) {
|
|
27
|
-
if (typeof qfd
|
|
27
|
+
if (typeof qfd === 'string') {
|
|
28
28
|
return qfd;
|
|
29
29
|
}
|
|
30
30
|
return qfd.as || qfd.name;
|
|
31
31
|
}
|
|
32
32
|
exports.nameOf = nameOf;
|
|
33
33
|
function mergeFields(older, newer) {
|
|
34
|
-
if (older
|
|
34
|
+
if (older === undefined) {
|
|
35
35
|
return newer;
|
|
36
36
|
}
|
|
37
|
-
const redefined = new Set(newer.map(
|
|
38
|
-
const merged = older.filter(
|
|
37
|
+
const redefined = new Set(newer.map(f => nameOf(f)));
|
|
38
|
+
const merged = older.filter(f => !redefined.has(nameOf(f)));
|
|
39
39
|
merged.push(...newer);
|
|
40
40
|
return merged;
|
|
41
41
|
}
|
package/dist/lang/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { MalloyTranslator } from
|
|
2
|
-
export type { UpdateData, SchemaData, URLData, SQLBlockData } from
|
|
3
|
-
export type { TranslateResponse } from
|
|
4
|
-
export { exploreQueryWalkerBuilder } from
|
|
5
|
-
export type { ExploreClauseRef } from
|
|
6
|
-
export { HighlightType } from
|
|
7
|
-
export type { DocumentHighlight } from
|
|
8
|
-
export type { DocumentSymbol } from
|
|
9
|
-
export type { DocumentCompletion } from
|
|
10
|
-
export type { LogMessage } from
|
|
1
|
+
export { MalloyTranslator } from './parse-malloy';
|
|
2
|
+
export type { UpdateData, SchemaData, URLData, SQLBlockData, } from './parse-malloy';
|
|
3
|
+
export type { TranslateResponse } from './translate-response';
|
|
4
|
+
export { exploreQueryWalkerBuilder } from './parse-tree-walkers/explore-query-walker';
|
|
5
|
+
export type { ExploreClauseRef } from './parse-tree-walkers/explore-query-walker';
|
|
6
|
+
export { HighlightType } from './parse-tree-walkers/document-highlight-walker';
|
|
7
|
+
export type { DocumentHighlight } from './parse-tree-walkers/document-highlight-walker';
|
|
8
|
+
export type { DocumentSymbol } from './parse-tree-walkers/document-symbol-walker';
|
|
9
|
+
export type { DocumentCompletion } from './parse-tree-walkers/document-completion-walker';
|
|
10
|
+
export type { LogMessage } from './parse-log';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ParserRuleContext } from
|
|
2
|
-
import { ParseTree } from
|
|
3
|
-
import { AbstractParseTreeVisitor } from
|
|
4
|
-
import { MalloyParserVisitor } from
|
|
5
|
-
import * as parse from
|
|
6
|
-
import * as ast from
|
|
7
|
-
import { LogSeverity, MessageLogger } from
|
|
8
|
-
import { MalloyParseRoot } from
|
|
1
|
+
import { ParserRuleContext } from 'antlr4ts';
|
|
2
|
+
import { ParseTree } from 'antlr4ts/tree';
|
|
3
|
+
import { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor';
|
|
4
|
+
import { MalloyParserVisitor } from './lib/Malloy/MalloyParserVisitor';
|
|
5
|
+
import * as parse from './lib/Malloy/MalloyParser';
|
|
6
|
+
import * as ast from './ast';
|
|
7
|
+
import { LogSeverity, MessageLogger } from './parse-log';
|
|
8
|
+
import { MalloyParseRoot } from './parse-malloy';
|
|
9
9
|
/**
|
|
10
10
|
* ANTLR visitor pattern parse tree traversal. Generates a Malloy
|
|
11
11
|
* AST from an ANTLR parse tree.
|