@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.
Files changed (310) hide show
  1. package/dist/connection_utils.js +10 -10
  2. package/dist/dialect/dialect.d.ts +2 -2
  3. package/dist/dialect/dialect.js +13 -13
  4. package/dist/dialect/dialect_map.d.ts +1 -1
  5. package/dist/dialect/duckdb.d.ts +3 -3
  6. package/dist/dialect/duckdb.js +44 -44
  7. package/dist/dialect/index.d.ts +6 -6
  8. package/dist/dialect/postgres.d.ts +3 -3
  9. package/dist/dialect/postgres.js +46 -46
  10. package/dist/dialect/standardsql.d.ts +4 -4
  11. package/dist/dialect/standardsql.js +51 -51
  12. package/dist/index.d.ts +10 -10
  13. package/dist/lang/ast/ast-utils.d.ts +1 -1
  14. package/dist/lang/ast/ast-utils.js +3 -3
  15. package/dist/lang/ast/elements/define-query.d.ts +3 -3
  16. package/dist/lang/ast/elements/define-query.js +6 -6
  17. package/dist/lang/ast/elements/define-source.d.ts +4 -4
  18. package/dist/lang/ast/elements/define-source.js +8 -8
  19. package/dist/lang/ast/elements/import-statement.d.ts +2 -2
  20. package/dist/lang/ast/elements/import-statement.js +7 -7
  21. package/dist/lang/ast/elements/pipeline-desc.d.ts +5 -5
  22. package/dist/lang/ast/elements/pipeline-desc.js +11 -11
  23. package/dist/lang/ast/elements/refined-source.d.ts +4 -4
  24. package/dist/lang/ast/elements/refined-source.js +6 -6
  25. package/dist/lang/ast/elements/source.d.ts +3 -3
  26. package/dist/lang/ast/elements/source.js +1 -1
  27. package/dist/lang/ast/error-factory.d.ts +1 -1
  28. package/dist/lang/ast/error-factory.js +15 -15
  29. package/dist/lang/ast/executors/index-executor.d.ts +7 -7
  30. package/dist/lang/ast/executors/index-executor.js +4 -4
  31. package/dist/lang/ast/executors/project-executor.d.ts +5 -5
  32. package/dist/lang/ast/executors/project-executor.js +2 -2
  33. package/dist/lang/ast/executors/reduce-executor.d.ts +8 -8
  34. package/dist/lang/ast/executors/reduce-executor.js +5 -5
  35. package/dist/lang/ast/expressions/apply.d.ts +2 -2
  36. package/dist/lang/ast/expressions/apply.js +1 -1
  37. package/dist/lang/ast/expressions/binary-boolean.d.ts +3 -3
  38. package/dist/lang/ast/expressions/binary-boolean.js +6 -6
  39. package/dist/lang/ast/expressions/binary-numeric.d.ts +3 -3
  40. package/dist/lang/ast/expressions/binary-numeric.js +2 -2
  41. package/dist/lang/ast/expressions/boolean.d.ts +4 -4
  42. package/dist/lang/ast/expressions/boolean.js +2 -2
  43. package/dist/lang/ast/expressions/constant-sub-expression.d.ts +4 -4
  44. package/dist/lang/ast/expressions/constant-sub-expression.js +12 -12
  45. package/dist/lang/ast/expressions/expr-add-sub.d.ts +2 -2
  46. package/dist/lang/ast/expressions/expr-add-sub.js +1 -1
  47. package/dist/lang/ast/expressions/expr-aggregate-function.d.ts +5 -5
  48. package/dist/lang/ast/expressions/expr-aggregate-function.js +15 -15
  49. package/dist/lang/ast/expressions/expr-alternation-tree.d.ts +6 -6
  50. package/dist/lang/ast/expressions/expr-alternation-tree.js +6 -6
  51. package/dist/lang/ast/expressions/expr-asymmetric.d.ts +5 -5
  52. package/dist/lang/ast/expressions/expr-asymmetric.js +3 -3
  53. package/dist/lang/ast/expressions/expr-avg.d.ts +3 -3
  54. package/dist/lang/ast/expressions/expr-avg.js +2 -2
  55. package/dist/lang/ast/expressions/expr-cast.d.ts +4 -4
  56. package/dist/lang/ast/expressions/expr-cast.js +6 -6
  57. package/dist/lang/ast/expressions/expr-compare.d.ts +5 -5
  58. package/dist/lang/ast/expressions/expr-compare.js +9 -9
  59. package/dist/lang/ast/expressions/expr-count-distinct.d.ts +2 -2
  60. package/dist/lang/ast/expressions/expr-count-distinct.js +1 -1
  61. package/dist/lang/ast/expressions/expr-count.d.ts +4 -4
  62. package/dist/lang/ast/expressions/expr-count.js +10 -10
  63. package/dist/lang/ast/expressions/expr-filter.d.ts +4 -4
  64. package/dist/lang/ast/expressions/expr-filter.js +13 -13
  65. package/dist/lang/ast/expressions/expr-func.d.ts +3 -3
  66. package/dist/lang/ast/expressions/expr-func.js +8 -8
  67. package/dist/lang/ast/expressions/expr-granular-time.d.ts +4 -4
  68. package/dist/lang/ast/expressions/expr-granular-time.js +17 -17
  69. package/dist/lang/ast/expressions/expr-id-reference.d.ts +4 -4
  70. package/dist/lang/ast/expressions/expr-id-reference.js +11 -11
  71. package/dist/lang/ast/expressions/expr-logical-op.d.ts +2 -2
  72. package/dist/lang/ast/expressions/expr-logical-op.js +1 -1
  73. package/dist/lang/ast/expressions/expr-max.d.ts +4 -4
  74. package/dist/lang/ast/expressions/expr-max.js +1 -1
  75. package/dist/lang/ast/expressions/expr-min.d.ts +4 -4
  76. package/dist/lang/ast/expressions/expr-min.js +1 -1
  77. package/dist/lang/ast/expressions/expr-minus.d.ts +3 -3
  78. package/dist/lang/ast/expressions/expr-minus.js +5 -5
  79. package/dist/lang/ast/expressions/expr-mul-div.d.ts +2 -2
  80. package/dist/lang/ast/expressions/expr-mul-div.js +1 -1
  81. package/dist/lang/ast/expressions/expr-not.d.ts +4 -4
  82. package/dist/lang/ast/expressions/expr-not.js +3 -3
  83. package/dist/lang/ast/expressions/expr-now.d.ts +3 -3
  84. package/dist/lang/ast/expressions/expr-now.js +8 -8
  85. package/dist/lang/ast/expressions/expr-null.d.ts +2 -2
  86. package/dist/lang/ast/expressions/expr-null.js +4 -4
  87. package/dist/lang/ast/expressions/expr-number.d.ts +3 -3
  88. package/dist/lang/ast/expressions/expr-number.js +2 -2
  89. package/dist/lang/ast/expressions/expr-parens.d.ts +3 -3
  90. package/dist/lang/ast/expressions/expr-parens.js +3 -3
  91. package/dist/lang/ast/expressions/expr-regex.d.ts +2 -2
  92. package/dist/lang/ast/expressions/expr-regex.js +4 -4
  93. package/dist/lang/ast/expressions/expr-string.d.ts +3 -3
  94. package/dist/lang/ast/expressions/expr-string.js +8 -8
  95. package/dist/lang/ast/expressions/expr-sum.d.ts +3 -3
  96. package/dist/lang/ast/expressions/expr-sum.js +2 -2
  97. package/dist/lang/ast/expressions/expr-time-extract.d.ts +4 -4
  98. package/dist/lang/ast/expressions/expr-time-extract.js +30 -30
  99. package/dist/lang/ast/expressions/expr-time.d.ts +4 -4
  100. package/dist/lang/ast/expressions/expr-time.js +10 -10
  101. package/dist/lang/ast/expressions/expr-ungroup.d.ts +6 -6
  102. package/dist/lang/ast/expressions/expr-ungroup.js +13 -13
  103. package/dist/lang/ast/expressions/for-range.d.ts +4 -4
  104. package/dist/lang/ast/expressions/for-range.js +17 -17
  105. package/dist/lang/ast/expressions/granular-literal.d.ts +4 -4
  106. package/dist/lang/ast/expressions/granular-literal.js +34 -34
  107. package/dist/lang/ast/expressions/partial-compare.d.ts +4 -4
  108. package/dist/lang/ast/expressions/partial-compare.js +4 -4
  109. package/dist/lang/ast/expressions/pick-when.d.ts +4 -4
  110. package/dist/lang/ast/expressions/pick-when.js +32 -32
  111. package/dist/lang/ast/expressions/range.d.ts +3 -3
  112. package/dist/lang/ast/expressions/range.js +20 -20
  113. package/dist/lang/ast/expressions/time-frame.d.ts +2 -2
  114. package/dist/lang/ast/expressions/time-frame.js +3 -3
  115. package/dist/lang/ast/expressions/top-by.d.ts +4 -4
  116. package/dist/lang/ast/expressions/top-by.js +5 -5
  117. package/dist/lang/ast/expressions/unary.d.ts +1 -1
  118. package/dist/lang/ast/expressions/unary.js +1 -1
  119. package/dist/lang/ast/expressions/utils.d.ts +2 -2
  120. package/dist/lang/ast/expressions/utils.js +6 -6
  121. package/dist/lang/ast/field-space/column-space-field.d.ts +3 -3
  122. package/dist/lang/ast/field-space/dynamic-space.d.ts +7 -7
  123. package/dist/lang/ast/field-space/dynamic-space.js +2 -2
  124. package/dist/lang/ast/field-space/field-definition-value.d.ts +5 -5
  125. package/dist/lang/ast/field-space/index-field-space.d.ts +3 -3
  126. package/dist/lang/ast/field-space/index-field-space.js +4 -4
  127. package/dist/lang/ast/field-space/join-space-field.d.ts +3 -3
  128. package/dist/lang/ast/field-space/project-field-space.d.ts +2 -2
  129. package/dist/lang/ast/field-space/project-field-space.js +5 -5
  130. package/dist/lang/ast/field-space/query-field-struct.d.ts +3 -3
  131. package/dist/lang/ast/field-space/query-field-struct.js +1 -1
  132. package/dist/lang/ast/field-space/query-space-field.d.ts +4 -4
  133. package/dist/lang/ast/field-space/query-space-field.js +1 -1
  134. package/dist/lang/ast/field-space/query-spaces.d.ts +11 -11
  135. package/dist/lang/ast/field-space/query-spaces.js +8 -8
  136. package/dist/lang/ast/field-space/reference-field.d.ts +5 -5
  137. package/dist/lang/ast/field-space/reference-field.js +1 -1
  138. package/dist/lang/ast/field-space/refined-space.d.ts +4 -4
  139. package/dist/lang/ast/field-space/refined-space.js +2 -2
  140. package/dist/lang/ast/field-space/rename-space-field.d.ts +3 -3
  141. package/dist/lang/ast/field-space/rename-space-field.js +2 -2
  142. package/dist/lang/ast/field-space/static-space.d.ts +7 -7
  143. package/dist/lang/ast/field-space/static-space.js +12 -12
  144. package/dist/lang/ast/field-space/struct-space-field-base.d.ts +4 -4
  145. package/dist/lang/ast/field-space/struct-space-field-base.js +1 -1
  146. package/dist/lang/ast/field-space/wild-space-field.d.ts +4 -4
  147. package/dist/lang/ast/field-space/wild-space-field.js +1 -1
  148. package/dist/lang/ast/fragtype-utils.d.ts +1 -1
  149. package/dist/lang/ast/fragtype-utils.js +15 -15
  150. package/dist/lang/ast/index.d.ts +90 -90
  151. package/dist/lang/ast/parameters/constant-parameter.d.ts +3 -3
  152. package/dist/lang/ast/parameters/constant-parameter.js +10 -10
  153. package/dist/lang/ast/parameters/has-parameter.d.ts +3 -3
  154. package/dist/lang/ast/parameters/has-parameter.js +7 -7
  155. package/dist/lang/ast/query-elements/anonymous-query.d.ts +3 -3
  156. package/dist/lang/ast/query-elements/anonymous-query.js +2 -2
  157. package/dist/lang/ast/query-elements/existing-query.d.ts +4 -4
  158. package/dist/lang/ast/query-elements/existing-query.js +10 -10
  159. package/dist/lang/ast/query-elements/full-query.d.ts +4 -4
  160. package/dist/lang/ast/query-elements/full-query.js +10 -10
  161. package/dist/lang/ast/query-elements/query-head-struct.d.ts +2 -2
  162. package/dist/lang/ast/query-elements/query-head-struct.js +2 -2
  163. package/dist/lang/ast/query-items/field-declaration.d.ts +6 -6
  164. package/dist/lang/ast/query-items/field-declaration.js +14 -14
  165. package/dist/lang/ast/query-items/field-references.d.ts +6 -6
  166. package/dist/lang/ast/query-items/field-references.js +9 -9
  167. package/dist/lang/ast/query-properties/aggregate.d.ts +2 -2
  168. package/dist/lang/ast/query-properties/aggregate.js +1 -1
  169. package/dist/lang/ast/query-properties/declare-fields.d.ts +2 -2
  170. package/dist/lang/ast/query-properties/declare-fields.js +1 -1
  171. package/dist/lang/ast/query-properties/dimmensions.d.ts +2 -2
  172. package/dist/lang/ast/query-properties/dimmensions.js +1 -1
  173. package/dist/lang/ast/query-properties/filters.d.ts +4 -4
  174. package/dist/lang/ast/query-properties/filters.js +16 -16
  175. package/dist/lang/ast/query-properties/group-by.d.ts +2 -2
  176. package/dist/lang/ast/query-properties/group-by.js +1 -1
  177. package/dist/lang/ast/query-properties/indexing.d.ts +3 -3
  178. package/dist/lang/ast/query-properties/indexing.js +3 -3
  179. package/dist/lang/ast/query-properties/joins.d.ts +6 -6
  180. package/dist/lang/ast/query-properties/joins.js +27 -27
  181. package/dist/lang/ast/query-properties/limit.d.ts +1 -1
  182. package/dist/lang/ast/query-properties/limit.js +1 -1
  183. package/dist/lang/ast/query-properties/measures.d.ts +2 -2
  184. package/dist/lang/ast/query-properties/measures.js +1 -1
  185. package/dist/lang/ast/query-properties/nest-reference.d.ts +2 -2
  186. package/dist/lang/ast/query-properties/nest-reference.js +1 -1
  187. package/dist/lang/ast/query-properties/nest.d.ts +7 -7
  188. package/dist/lang/ast/query-properties/nest.js +7 -7
  189. package/dist/lang/ast/query-properties/nests.d.ts +2 -2
  190. package/dist/lang/ast/query-properties/nests.js +1 -1
  191. package/dist/lang/ast/query-properties/ordering.d.ts +3 -3
  192. package/dist/lang/ast/query-properties/ordering.js +6 -6
  193. package/dist/lang/ast/query-properties/project-statement.d.ts +2 -2
  194. package/dist/lang/ast/query-properties/project-statement.js +1 -1
  195. package/dist/lang/ast/query-properties/qop-desc.d.ts +7 -7
  196. package/dist/lang/ast/query-properties/qop-desc.js +20 -20
  197. package/dist/lang/ast/query-properties/sampling.d.ts +2 -2
  198. package/dist/lang/ast/query-properties/sampling.js +1 -1
  199. package/dist/lang/ast/query-properties/top.d.ts +4 -4
  200. package/dist/lang/ast/query-properties/top.js +5 -5
  201. package/dist/lang/ast/source-properties/field-list-edit.d.ts +4 -4
  202. package/dist/lang/ast/source-properties/field-list-edit.js +2 -2
  203. package/dist/lang/ast/source-properties/primary-key.d.ts +2 -2
  204. package/dist/lang/ast/source-properties/primary-key.js +2 -2
  205. package/dist/lang/ast/source-properties/renames.d.ts +2 -2
  206. package/dist/lang/ast/source-properties/renames.js +3 -3
  207. package/dist/lang/ast/source-properties/turtles.d.ts +2 -2
  208. package/dist/lang/ast/source-properties/turtles.js +1 -1
  209. package/dist/lang/ast/sources/named-source.d.ts +4 -4
  210. package/dist/lang/ast/sources/named-source.js +5 -5
  211. package/dist/lang/ast/sources/query-source.d.ts +3 -3
  212. package/dist/lang/ast/sources/query-source.js +3 -3
  213. package/dist/lang/ast/sources/sql-source.d.ts +2 -2
  214. package/dist/lang/ast/sources/sql-source.js +2 -2
  215. package/dist/lang/ast/sources/table-source.d.ts +2 -2
  216. package/dist/lang/ast/sources/table-source.js +7 -7
  217. package/dist/lang/ast/space-seed.d.ts +2 -2
  218. package/dist/lang/ast/space-seed.js +1 -1
  219. package/dist/lang/ast/sql-elements/sql-statement.d.ts +4 -4
  220. package/dist/lang/ast/sql-elements/sql-statement.js +9 -9
  221. package/dist/lang/ast/sql-elements/sql-string.d.ts +3 -3
  222. package/dist/lang/ast/sql-elements/sql-string.js +6 -6
  223. package/dist/lang/ast/struct-utils.d.ts +2 -2
  224. package/dist/lang/ast/struct-utils.js +3 -3
  225. package/dist/lang/ast/time-utils.d.ts +6 -6
  226. package/dist/lang/ast/time-utils.js +46 -46
  227. package/dist/lang/ast/types/document-compile-result.d.ts +2 -2
  228. package/dist/lang/ast/types/executor.d.ts +3 -3
  229. package/dist/lang/ast/types/explore-desc.d.ts +2 -2
  230. package/dist/lang/ast/types/explore-desc.js +1 -1
  231. package/dist/lang/ast/types/explore-field.d.ts +3 -3
  232. package/dist/lang/ast/types/expr-result.d.ts +2 -2
  233. package/dist/lang/ast/types/expr-value.d.ts +2 -2
  234. package/dist/lang/ast/types/expression-def.d.ts +4 -4
  235. package/dist/lang/ast/types/expression-def.js +86 -86
  236. package/dist/lang/ast/types/field-collection-member.d.ts +3 -3
  237. package/dist/lang/ast/types/field-decl.d.ts +5 -5
  238. package/dist/lang/ast/types/field-space.d.ts +5 -5
  239. package/dist/lang/ast/types/field-space.js +1 -1
  240. package/dist/lang/ast/types/granular-result.d.ts +3 -3
  241. package/dist/lang/ast/types/granular-result.js +1 -1
  242. package/dist/lang/ast/types/lookup-result.d.ts +1 -1
  243. package/dist/lang/ast/types/malloy-element.d.ts +6 -6
  244. package/dist/lang/ast/types/malloy-element.js +49 -49
  245. package/dist/lang/ast/types/model-entry.d.ts +1 -1
  246. package/dist/lang/ast/types/name-space.d.ts +1 -1
  247. package/dist/lang/ast/types/nested-query.d.ts +2 -2
  248. package/dist/lang/ast/types/op-desc.d.ts +2 -2
  249. package/dist/lang/ast/types/query-comp.d.ts +1 -1
  250. package/dist/lang/ast/types/query-element.d.ts +3 -3
  251. package/dist/lang/ast/types/query-item.d.ts +4 -4
  252. package/dist/lang/ast/types/query-property.d.ts +15 -15
  253. package/dist/lang/ast/types/source-property.d.ts +8 -8
  254. package/dist/lang/ast/types/space-entry.d.ts +2 -2
  255. package/dist/lang/ast/types/space-field.d.ts +4 -4
  256. package/dist/lang/ast/types/space-field.js +4 -4
  257. package/dist/lang/ast/types/space-param.d.ts +4 -4
  258. package/dist/lang/ast/types/space-param.js +4 -4
  259. package/dist/lang/ast/types/time-result.d.ts +2 -2
  260. package/dist/lang/ast/types/turtle-headed-pipe.d.ts +2 -2
  261. package/dist/lang/ast/types/turtle-headed-pipe.js +1 -1
  262. package/dist/lang/ast/types/type-desc.d.ts +3 -3
  263. package/dist/lang/field-utils.d.ts +1 -1
  264. package/dist/lang/field-utils.js +4 -4
  265. package/dist/lang/index.d.ts +10 -10
  266. package/dist/lang/malloy-to-ast.d.ts +8 -8
  267. package/dist/lang/malloy-to-ast.js +68 -68
  268. package/dist/lang/parse-error-handler.d.ts +3 -3
  269. package/dist/lang/parse-error-handler.js +4 -4
  270. package/dist/lang/parse-log.d.ts +2 -2
  271. package/dist/lang/parse-log.js +1 -1
  272. package/dist/lang/parse-malloy.d.ts +7 -7
  273. package/dist/lang/parse-malloy.js +81 -81
  274. package/dist/lang/parse-tree-walkers/document-completion-walker.d.ts +2 -2
  275. package/dist/lang/parse-tree-walkers/document-completion-walker.js +38 -38
  276. package/dist/lang/parse-tree-walkers/document-help-context-walker.d.ts +1 -1
  277. package/dist/lang/parse-tree-walkers/document-help-context-walker.js +14 -14
  278. package/dist/lang/parse-tree-walkers/document-highlight-walker.d.ts +3 -3
  279. package/dist/lang/parse-tree-walkers/document-highlight-walker.js +85 -85
  280. package/dist/lang/parse-tree-walkers/document-symbol-walker.d.ts +4 -4
  281. package/dist/lang/parse-tree-walkers/document-symbol-walker.js +40 -40
  282. package/dist/lang/parse-tree-walkers/explore-query-walker.d.ts +3 -3
  283. package/dist/lang/parse-tree-walkers/explore-query-walker.js +3 -3
  284. package/dist/lang/parse-tree-walkers/find-external-references.d.ts +4 -4
  285. package/dist/lang/parse-tree-walkers/find-external-references.js +2 -2
  286. package/dist/lang/reference-list.d.ts +1 -1
  287. package/dist/lang/test/document-help-context-walker.spec.js +9 -9
  288. package/dist/lang/test/document-symbol-walker.spec.js +32 -32
  289. package/dist/lang/test/field-symbols.spec.js +87 -87
  290. package/dist/lang/test/parse.spec.d.ts +1 -1
  291. package/dist/lang/test/parse.spec.js +768 -768
  292. package/dist/lang/test/test-translator.d.ts +6 -6
  293. package/dist/lang/test/test-translator.js +159 -159
  294. package/dist/lang/translate-response.d.ts +7 -7
  295. package/dist/lang/translate-response.js +1 -1
  296. package/dist/lang/zone.d.ts +5 -5
  297. package/dist/lang/zone.js +8 -8
  298. package/dist/malloy.d.ts +7 -7
  299. package/dist/malloy.js +192 -192
  300. package/dist/model/index.d.ts +2 -2
  301. package/dist/model/malloy_query.d.ts +12 -12
  302. package/dist/model/malloy_query.js +497 -502
  303. package/dist/model/malloy_types.d.ts +68 -68
  304. package/dist/model/malloy_types.js +102 -102
  305. package/dist/model/sql_block.d.ts +1 -1
  306. package/dist/model/sql_block.js +4 -4
  307. package/dist/model/utils.d.ts +1 -1
  308. package/dist/model/utils.js +10 -10
  309. package/dist/runtime_types.d.ts +2 -2
  310. package/package.json +4 -1
@@ -75,20 +75,20 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
75
75
  /**
76
76
  * Log an error message relative to an AST node
77
77
  */
78
- astError(el, str, sev = "error") {
79
- this.msgLog.log({ "message": str, "at": el.location, "severity": sev });
78
+ astError(el, str, sev = 'error') {
79
+ this.msgLog.log({ message: str, at: el.location, severity: sev });
80
80
  }
81
81
  /**
82
82
  * Log an error message relative to a parse node
83
83
  */
84
- contextError(cx, msg, sev = "error") {
84
+ contextError(cx, msg, sev = 'error') {
85
85
  this.msgLog.log({
86
- "message": msg,
87
- "at": {
88
- "url": this.parse.subTranslator.sourceURL,
89
- "range": this.parse.subTranslator.rangeFromContext(cx)
86
+ message: msg,
87
+ at: {
88
+ url: this.parse.subTranslator.sourceURL,
89
+ range: this.parse.subTranslator.rangeFromContext(cx),
90
90
  },
91
- "severity": sev
91
+ severity: sev,
92
92
  });
93
93
  }
94
94
  onlyExploreProperties(els) {
@@ -174,7 +174,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
174
174
  return this.astAt(new ast.ModelEntryReference(this.getIdText(cx)), cx);
175
175
  }
176
176
  stripQuotes(s) {
177
- if (s[0] === "`" || s[0] === "'" || s[0] === '"') {
177
+ if (s[0] === '`' || s[0] === "'" || s[0] === '"') {
178
178
  if (s[0] === s[s.length - 1]) {
179
179
  return s.slice(1, -1);
180
180
  }
@@ -192,8 +192,8 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
192
192
  }
193
193
  astAt(el, cx) {
194
194
  el.location = {
195
- "url": this.parse.subTranslator.sourceURL,
196
- "range": this.parse.subTranslator.rangeFromContext(cx)
195
+ url: this.parse.subTranslator.sourceURL,
196
+ range: this.parse.subTranslator.rangeFromContext(cx),
197
197
  };
198
198
  return el;
199
199
  }
@@ -220,7 +220,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
220
220
  }
221
221
  }
222
222
  else {
223
- this.contextError(cx, "Expected field definition");
223
+ this.contextError(cx, 'Expected field definition');
224
224
  }
225
225
  }
226
226
  return visited;
@@ -233,7 +233,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
233
233
  throw this.internalError(cx, `expression node unknown type '${element.elementType}'`);
234
234
  }
235
235
  getSegments(segments) {
236
- return segments.map((cx) => this.visitQueryProperties(cx.queryProperties()));
236
+ return segments.map(cx => this.visitQueryProperties(cx.queryProperties()));
237
237
  }
238
238
  getFilterShortcut(cx) {
239
239
  const el = this.getFilterElement(cx.fieldExpr());
@@ -256,17 +256,17 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
256
256
  sqlStr.push(this.visit(part.query()));
257
257
  }
258
258
  const lastChars = (_a = pcx.SQL_END()) === null || _a === void 0 ? void 0 : _a.text.slice(0, -3);
259
- sqlStr.push(lastChars || "");
259
+ sqlStr.push(lastChars || '');
260
260
  this.astAt(sqlStr, pcx);
261
261
  }
262
262
  visitMalloyDocument(pcx) {
263
- const stmts = this.onlyDocStatements(pcx.malloyStatement().map((scx) => this.visit(scx)));
263
+ const stmts = this.onlyDocStatements(pcx.malloyStatement().map(scx => this.visit(scx)));
264
264
  return new ast.Document(stmts);
265
265
  }
266
266
  visitDefineSourceStatement(pcx) {
267
267
  const defsCx = pcx.sourcePropertyList().sourceDefinition();
268
- const defs = defsCx.map((dcx) => this.visitsourceDefinition(dcx));
269
- if (defs.length == 1) {
268
+ const defs = defsCx.map(dcx => this.visitsourceDefinition(dcx));
269
+ if (defs.length === 1) {
270
270
  return defs[0];
271
271
  }
272
272
  return new ast.DefineSourceList(defs);
@@ -285,7 +285,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
285
285
  }
286
286
  visitExploreProperties(pcx) {
287
287
  const filterCx = pcx.filterShortcut();
288
- const visited = pcx.exploreStatement().map((ecx) => this.visit(ecx));
288
+ const visited = pcx.exploreStatement().map(ecx => this.visit(ecx));
289
289
  const propList = new ast.ExploreDesc(this.onlyExploreProperties(visited));
290
290
  if (filterCx) {
291
291
  propList.push(this.getFilterShortcut(filterCx));
@@ -317,13 +317,13 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
317
317
  if (join instanceof ast.Join) {
318
318
  joins.push(join);
319
319
  if (join instanceof ast.ExpressionJoin) {
320
- join.joinType = "many";
321
- if (join.joinOn == undefined) {
322
- join.log("join_many: requires ON expression");
320
+ join.joinType = 'many';
321
+ if (join.joinOn === undefined) {
322
+ join.log('join_many: requires ON expression');
323
323
  }
324
324
  }
325
325
  else if (join instanceof ast.KeyJoin) {
326
- join.log("Foreign key join not legal in join_many:");
326
+ join.log('Foreign key join not legal in join_many:');
327
327
  }
328
328
  }
329
329
  }
@@ -336,7 +336,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
336
336
  if (join instanceof ast.Join) {
337
337
  joins.push(join);
338
338
  if (join instanceof ast.ExpressionJoin) {
339
- join.joinType = "one";
339
+ join.joinType = 'one';
340
340
  }
341
341
  }
342
342
  }
@@ -349,17 +349,17 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
349
349
  if (join instanceof ast.Join) {
350
350
  joins.push(join);
351
351
  if (join instanceof ast.ExpressionJoin) {
352
- join.joinType = "cross";
352
+ join.joinType = 'cross';
353
353
  }
354
354
  else {
355
- join.log("Foreign key join not legal in join_cross:");
355
+ join.log('Foreign key join not legal in join_cross:');
356
356
  }
357
357
  }
358
358
  }
359
359
  return new ast.Joins(joins);
360
360
  }
361
361
  getJoinList(pcx) {
362
- return pcx.joinDef().map((jcx) => this.visit(jcx));
362
+ return pcx.joinDef().map(jcx => this.visit(jcx));
363
363
  }
364
364
  getJoinSource(name, ecx) {
365
365
  if (ecx) {
@@ -414,12 +414,12 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
414
414
  }
415
415
  visitDefExploreRename(pcx) {
416
416
  const rcxs = pcx.renameList().exploreRenameDef();
417
- const renames = rcxs.map((rcx) => this.visitExploreRenameDef(rcx));
417
+ const renames = rcxs.map(rcx => this.visitExploreRenameDef(rcx));
418
418
  const stmt = new ast.Renames(renames);
419
419
  return this.astAt(stmt, pcx);
420
420
  }
421
421
  visitFilterClauseList(pcx) {
422
- return new ast.Filter(pcx.fieldExpr().map((f) => this.getFilterElement(f)));
422
+ return new ast.Filter(pcx.fieldExpr().map(f => this.getFilterElement(f)));
423
423
  }
424
424
  visitFilterByShortcut(pcx) {
425
425
  const el = this.getFilterElement(pcx.fieldExpr());
@@ -438,7 +438,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
438
438
  visitSubQueryDefList(pcx) {
439
439
  const babyTurtles = pcx
440
440
  .exploreQueryDef()
441
- .map((cx) => this.visitExploreQueryDef(cx));
441
+ .map(cx => this.visitExploreQueryDef(cx));
442
442
  return new ast.Turtles(babyTurtles);
443
443
  }
444
444
  visitDefExplorePrimaryKey(pcx) {
@@ -448,18 +448,18 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
448
448
  visitFieldNameList(pcx) {
449
449
  const members = pcx
450
450
  .fieldName()
451
- .map((cx) => new ast.FieldReference([this.getFieldName(cx)]));
451
+ .map(cx => new ast.FieldReference([this.getFieldName(cx)]));
452
452
  return new ast.FieldReferences(members);
453
453
  }
454
454
  visitDefExploreEditField(pcx) {
455
- const action = pcx.ACCEPT() ? "accept" : "except";
455
+ const action = pcx.ACCEPT() ? 'accept' : 'except';
456
456
  return new ast.FieldListEdit(action, this.visitFieldNameList(pcx.fieldNameList()));
457
457
  }
458
458
  visitQueryProperties(pcx) {
459
459
  const qProps = pcx
460
460
  .queryStatement()
461
- .map((qcx) => this.astAt(this.visit(qcx), qcx))
462
- .filter(function (p) {
461
+ .map(qcx => this.astAt(this.visit(qcx), qcx))
462
+ .filter((p) => {
463
463
  if (ast.isQueryProperty(p)) {
464
464
  return true;
465
465
  }
@@ -473,7 +473,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
473
473
  return new ast.QOPDesc(qProps);
474
474
  }
475
475
  visitFieldPath(pcx) {
476
- const names = pcx.fieldName().map((nameCx) => this.getFieldName(nameCx));
476
+ const names = pcx.fieldName().map(nameCx => this.getFieldName(nameCx));
477
477
  return this.astAt(new ast.FieldReference(names), pcx);
478
478
  }
479
479
  visitQueryFieldDef(pcx) {
@@ -493,7 +493,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
493
493
  // return noItem;
494
494
  // }
495
495
  getQueryItems(pcx) {
496
- const itemList = pcx.queryFieldEntry().map((e) => this.visit(e));
496
+ const itemList = pcx.queryFieldEntry().map(e => this.visit(e));
497
497
  return this.onlyQueryRefs(itemList);
498
498
  }
499
499
  visitAggregateStatement(pcx) {
@@ -517,22 +517,22 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
517
517
  }
518
518
  visitWildMember(pcx) {
519
519
  const nameCx = pcx.fieldPath();
520
- const stars = pcx.STAR() ? "*" : "**";
520
+ const stars = pcx.STAR() ? '*' : '**';
521
521
  const join = nameCx ? this.visitFieldPath(nameCx) : undefined;
522
522
  return new ast.WildcardFieldReference(join, stars);
523
523
  }
524
524
  visitIndexFields(pcx) {
525
- const refList = pcx.indexElement().map((el) => {
526
- const hasStar = el.STAR() != undefined;
525
+ const refList = pcx.indexElement().map(el => {
526
+ const hasStar = el.STAR() !== undefined;
527
527
  const pathCx = el.fieldPath();
528
528
  if (!pathCx) {
529
- return new ast.WildcardFieldReference(undefined, "*");
529
+ return new ast.WildcardFieldReference(undefined, '*');
530
530
  }
531
531
  const path = this.visitFieldPath(pathCx);
532
532
  if (!hasStar) {
533
533
  return this.astAt(path, pcx);
534
534
  }
535
- return this.astAt(new ast.WildcardFieldReference(path, "*"), pcx);
535
+ return this.astAt(new ast.WildcardFieldReference(path, '*'), pcx);
536
536
  });
537
537
  return new ast.FieldReferences(refList);
538
538
  }
@@ -549,7 +549,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
549
549
  return new ast.Limit(this.getNumber(pcx.INTEGER_LITERAL()));
550
550
  }
551
551
  visitOrderBySpec(pcx) {
552
- const dir = pcx.ASC() ? "asc" : pcx.DESC() ? "desc" : undefined;
552
+ const dir = pcx.ASC() ? 'asc' : pcx.DESC() ? 'desc' : undefined;
553
553
  const ncx = pcx.INTEGER_LITERAL();
554
554
  if (ncx) {
555
555
  return new ast.OrderBy(this.getNumber(ncx), dir);
@@ -561,7 +561,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
561
561
  throw this.internalError(pcx, "can't parse order_by specification");
562
562
  }
563
563
  visitOrdering(pcx) {
564
- const orderList = pcx.orderBySpec().map((o) => this.visitOrderBySpec(o));
564
+ const orderList = pcx.orderBySpec().map(o => this.visitOrderBySpec(o));
565
565
  return this.astAt(new ast.Ordering(orderList), pcx);
566
566
  }
567
567
  visitTopStatement(pcx) {
@@ -626,7 +626,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
626
626
  visitTopLevelQueryDefs(pcx) {
627
627
  const stmts = pcx
628
628
  .topLevelQueryDef()
629
- .map((cx) => this.visitTopLevelQueryDef(cx));
629
+ .map(cx => this.visitTopLevelQueryDef(cx));
630
630
  if (stmts.length === 1) {
631
631
  return stmts[0];
632
632
  }
@@ -648,8 +648,8 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
648
648
  throw this.internalError(pcx, `Anonymous query matched, but ${query.elementType} found`);
649
649
  }
650
650
  visitNestedQueryList(pcx) {
651
- const nestedList = pcx.nestEntry().map((cx) => this.visit(cx));
652
- if (nestedList.length == 1) {
651
+ const nestedList = pcx.nestEntry().map(cx => this.visit(cx));
652
+ if (nestedList.length === 1) {
653
653
  return nestedList[0];
654
654
  }
655
655
  return new ast.Nests(this.onlyNestedQueries(nestedList));
@@ -681,20 +681,20 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
681
681
  return new ast.ExprNot(this.getFieldExpr(pcx.fieldExpr()));
682
682
  }
683
683
  visitExprBool(pcx) {
684
- return new ast.Boolean(pcx.TRUE() ? "true" : "false");
684
+ return new ast.Boolean(pcx.TRUE() ? 'true' : 'false');
685
685
  }
686
686
  allFieldExpressions(exprList) {
687
- return exprList.map((ecx) => this.getFieldExpr(ecx));
687
+ return exprList.map(ecx => this.getFieldExpr(ecx));
688
688
  }
689
689
  visitExprLogical(pcx) {
690
690
  const left = this.getFieldExpr(pcx.fieldExpr(0));
691
691
  const right = this.getFieldExpr(pcx.fieldExpr(1));
692
- return new ast.ExprLogicalOp(left, pcx.AND() ? "and" : "or", right);
692
+ return new ast.ExprLogicalOp(left, pcx.AND() ? 'and' : 'or', right);
693
693
  }
694
694
  visitExprLogicalTree(pcx) {
695
695
  const left = this.getFieldExpr(pcx.fieldExpr());
696
696
  const right = this.getFieldExpr(pcx.partialAllowedFieldExpr());
697
- return new ast.ExprAlternationTree(left, pcx.AMPER() ? "&" : "|", right);
697
+ return new ast.ExprAlternationTree(left, pcx.AMPER() ? '&' : '|', right);
698
698
  }
699
699
  visitPartialAllowedFieldExpr(pcx) {
700
700
  var _a;
@@ -730,7 +730,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
730
730
  }
731
731
  else {
732
732
  this.contextError(pcx, `'${pcx.text}' is not a number`);
733
- return new ast.ExprNumber("42");
733
+ return new ast.ExprNumber('42');
734
734
  }
735
735
  }
736
736
  visitExprFieldPath(pcx) {
@@ -749,11 +749,11 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
749
749
  visitExprAddSub(pcx) {
750
750
  const lhs = this.getFieldExpr(pcx.fieldExpr(0));
751
751
  const rhs = this.getFieldExpr(pcx.fieldExpr(1));
752
- const op = pcx.PLUS() ? "+" : "-";
752
+ const op = pcx.PLUS() ? '+' : '-';
753
753
  return new ast.ExprAddSub(lhs, op, rhs);
754
754
  }
755
755
  visitExprMulDiv(pcx) {
756
- const op = pcx.STAR() ? "*" : pcx.SLASH() ? "/" : "%";
756
+ const op = pcx.STAR() ? '*' : pcx.SLASH() ? '/' : '%';
757
757
  return new ast.ExprMulDiv(this.getFieldExpr(pcx.fieldExpr(0)), op, this.getFieldExpr(pcx.fieldExpr(1)));
758
758
  }
759
759
  visitExprCompare(pcx) {
@@ -767,9 +767,9 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
767
767
  return this.astAt(new ast.ExprCountDistinct(this.getFieldExpr(pcx.fieldExpr())), pcx);
768
768
  }
769
769
  visitExprUngroup(pcx) {
770
- const flist = pcx.fieldName().map((fcx) => this.getFieldName(fcx));
770
+ const flist = pcx.fieldName().map(fcx => this.getFieldName(fcx));
771
771
  const kw = this.getIdText(pcx.ungroup()).toLocaleLowerCase();
772
- return this.astAt(new ast.ExprUngroup(kw == "all" ? kw : "exclude", this.getFieldExpr(pcx.fieldExpr()), flist), pcx);
772
+ return this.astAt(new ast.ExprUngroup(kw === 'all' ? kw : 'exclude', this.getFieldExpr(pcx.fieldExpr()), flist), pcx);
773
773
  }
774
774
  visitExprAggregate(pcx) {
775
775
  const pathCx = pcx.fieldPath();
@@ -778,7 +778,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
778
778
  const exprDef = pcx.fieldExpr();
779
779
  if (pcx.aggregate().COUNT()) {
780
780
  if (exprDef) {
781
- this.contextError(exprDef, "Ignored expression inside COUNT()");
781
+ this.contextError(exprDef, 'Ignored expression inside COUNT()');
782
782
  }
783
783
  return new ast.ExprCount(source);
784
784
  }
@@ -791,24 +791,24 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
791
791
  const expr = exprDef ? this.getFieldExpr(exprDef) : undefined;
792
792
  if (pcx.aggregate().MIN()) {
793
793
  if (path) {
794
- this.contextError(pcx, `Path not legal for min()`);
794
+ this.contextError(pcx, 'Path not legal for min()');
795
795
  }
796
796
  else if (expr) {
797
797
  return new ast.ExprMin(expr);
798
798
  }
799
799
  else {
800
- this.contextError(pcx, "Missing expression for min");
800
+ this.contextError(pcx, 'Missing expression for min');
801
801
  }
802
802
  }
803
803
  else if (pcx.aggregate().MAX()) {
804
804
  if (path) {
805
- this.contextError(pcx, `Path not legal for max()`);
805
+ this.contextError(pcx, 'Path not legal for max()');
806
806
  }
807
807
  else if (expr) {
808
808
  return new ast.ExprMax(expr);
809
809
  }
810
810
  else {
811
- this.contextError(pcx, "Missing expression for max");
811
+ this.contextError(pcx, 'Missing expression for max');
812
812
  }
813
813
  }
814
814
  else if (pcx.aggregate().AVG()) {
@@ -821,7 +821,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
821
821
  }
822
822
  visitExprApply(pcx) {
823
823
  if (pcx.COLON()) {
824
- this.contextError(pcx, "':' for apply is deprecated, use '?'", "warn");
824
+ this.contextError(pcx, "':' for apply is deprecated, use '?'", 'warn');
825
825
  }
826
826
  return new ast.Apply(this.getFieldExpr(pcx.fieldExpr()), this.getFieldExpr(pcx.partialAllowedFieldExpr()));
827
827
  }
@@ -869,8 +869,8 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
869
869
  fn = dCx.text;
870
870
  }
871
871
  else {
872
- this.contextError(pcx, "Funciton name error");
873
- fn = "FUNCTION_NAME_ERROR";
872
+ this.contextError(pcx, 'Funciton name error');
873
+ fn = 'FUNCTION_NAME_ERROR';
874
874
  }
875
875
  if (ast.ExprTimeExtract.extractor(fn)) {
876
876
  return this.astAt(new ast.ExprTimeExtract(fn, args), pcx);
@@ -881,7 +881,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
881
881
  return new ast.ExprDuration(this.getFieldExpr(pcx.fieldExpr()), this.visitTimeframe(pcx.timeframe()).text);
882
882
  }
883
883
  visitPickStatement(pcx) {
884
- const picks = pcx.pick().map((pwCx) => {
884
+ const picks = pcx.pick().map(pwCx => {
885
885
  let pickExpr;
886
886
  if (pwCx._pickValue) {
887
887
  pickExpr = this.getFieldExpr(pwCx._pickValue);
@@ -955,7 +955,7 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
955
955
  const nmCx = blockEnt.connectionName();
956
956
  if (nmCx) {
957
957
  if (connectionName) {
958
- this.contextError(nmCx, "Cannot redefine connection");
958
+ this.contextError(nmCx, 'Cannot redefine connection');
959
959
  }
960
960
  else {
961
961
  connectionName = this.getIdText(nmCx);
@@ -976,14 +976,14 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
976
976
  visitSampleStatement(pcx) {
977
977
  const rowCx = pcx.sampleSpec().INTEGER_LITERAL();
978
978
  if (rowCx) {
979
- return new ast.SampleProperty({ "rows": this.getNumber(rowCx) });
979
+ return new ast.SampleProperty({ rows: this.getNumber(rowCx) });
980
980
  }
981
981
  const limitCx = pcx.sampleSpec().PERCENT_LITERAL();
982
982
  if (limitCx) {
983
- return new ast.SampleProperty({ "percent": this.getNumber(limitCx) });
983
+ return new ast.SampleProperty({ percent: this.getNumber(limitCx) });
984
984
  }
985
- const enabled = pcx.sampleSpec().TRUE() != undefined;
986
- return new ast.SampleProperty({ "enable": enabled });
985
+ const enabled = pcx.sampleSpec().TRUE() !== undefined;
986
+ return new ast.SampleProperty({ enable: enabled });
987
987
  }
988
988
  }
989
989
  exports.MalloyToAST = MalloyToAST;
@@ -1,6 +1,6 @@
1
- import { ANTLRErrorListener, Token } from "antlr4ts";
2
- import { MessageLogger } from "./parse-log";
3
- import { MalloyTranslation } from "./parse-malloy";
1
+ import { ANTLRErrorListener, Token } from 'antlr4ts';
2
+ import { MessageLogger } from './parse-log';
3
+ import { MalloyTranslation } from './parse-malloy';
4
4
  export declare class MalloyParserErrorHandler implements ANTLRErrorListener<Token> {
5
5
  readonly translator: MalloyTranslation;
6
6
  readonly messages: MessageLogger;
@@ -29,13 +29,13 @@ class MalloyParserErrorHandler {
29
29
  this.messages = messages;
30
30
  }
31
31
  syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, _e) {
32
- const errAt = { "line": line - 1, "character": charPositionInLine };
32
+ const errAt = { line: line - 1, character: charPositionInLine };
33
33
  const range = offendingSymbol
34
34
  ? this.translator.rangeFromToken(offendingSymbol)
35
- : { "start": errAt, "end": errAt };
35
+ : { start: errAt, end: errAt };
36
36
  const error = {
37
- "message": msg,
38
- "at": { "url": this.translator.sourceURL, range }
37
+ message: msg,
38
+ at: { url: this.translator.sourceURL, range },
39
39
  };
40
40
  this.messages.log(error);
41
41
  }
@@ -1,5 +1,5 @@
1
- import { DocumentLocation } from "../model/malloy_types";
2
- export declare type LogSeverity = "error" | "warn" | "debug";
1
+ import { DocumentLocation } from '../model/malloy_types';
2
+ export declare type LogSeverity = 'error' | 'warn' | 'debug';
3
3
  /**
4
4
  * Default severity is "error"
5
5
  */
@@ -40,7 +40,7 @@ class MessageLog {
40
40
  return !this.hasErrors();
41
41
  }
42
42
  hasErrors() {
43
- const firstError = this.rawLog.find((l) => l.severity !== "warn");
43
+ const firstError = this.rawLog.find(l => l.severity !== 'warn');
44
44
  return firstError !== undefined;
45
45
  }
46
46
  empty() {
@@ -1,10 +1,10 @@
1
- import { CodePointCharStream, CommonTokenStream, ParserRuleContext, Token } from "antlr4ts";
2
- import { ParseTree } from "antlr4ts/tree";
3
- import { DocumentLocation, DocumentPosition, DocumentRange, DocumentReference, ModelDef, NamedStructDefs, Query, SQLBlockStructDef, StructDef } from "../model/malloy_types";
4
- import { MessageLog } from "./parse-log";
5
- import { Zone, ZoneData } from "./zone";
6
- import { ReferenceList } from "./reference-list";
7
- import { ASTResponse, CompletionsResponse, DataRequestResponse, ErrorResponse, FatalResponse, FinalResponse, HelpContextResponse, MetadataResponse, ModelDataRequest, NeedURLData, TranslateResponse } from "./translate-response";
1
+ import { CodePointCharStream, CommonTokenStream, ParserRuleContext, Token } from 'antlr4ts';
2
+ import { ParseTree } from 'antlr4ts/tree';
3
+ import { DocumentLocation, DocumentPosition, DocumentRange, DocumentReference, ModelDef, NamedStructDefs, Query, SQLBlockStructDef, StructDef } from '../model/malloy_types';
4
+ import { MessageLog } from './parse-log';
5
+ import { Zone, ZoneData } from './zone';
6
+ import { ReferenceList } from './reference-list';
7
+ import { ASTResponse, CompletionsResponse, DataRequestResponse, ErrorResponse, FatalResponse, FinalResponse, HelpContextResponse, MetadataResponse, ModelDataRequest, NeedURLData, TranslateResponse } from './translate-response';
8
8
  export declare type StepResponses = DataRequestResponse | ASTResponse | TranslateResponse | ParseResponse | MetadataResponse;
9
9
  /**
10
10
  * A Translation is a series of translation steps. Each step can depend