spark-sql-language-server 0.0.1-beta.6 → 0.2.0-beta.0

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 (740) hide show
  1. package/out/sparksql-server-worker.js +1 -1
  2. package/out/sparksql-server-worker.js.map +1 -1
  3. package/out-tsc/assets/built-in-functions.d.ts +2 -0
  4. package/out-tsc/assets/built-in-functions.d.ts.map +1 -0
  5. package/out-tsc/assets/built-in-functions.js +4 -2
  6. package/out-tsc/assets/built-in-functions.js.map +1 -1
  7. package/out-tsc/completion-parser.d.ts +11 -0
  8. package/out-tsc/completion-parser.d.ts.map +1 -0
  9. package/out-tsc/completion-parser.js +148 -0
  10. package/out-tsc/completion-parser.js.map +1 -0
  11. package/out-tsc/constants.d.ts +9 -0
  12. package/out-tsc/constants.d.ts.map +1 -0
  13. package/out-tsc/constants.js +12 -0
  14. package/out-tsc/constants.js.map +1 -0
  15. package/out-tsc/cursor.d.ts +10 -0
  16. package/out-tsc/cursor.d.ts.map +1 -0
  17. package/out-tsc/cursor.js +3 -0
  18. package/out-tsc/cursor.js.map +1 -1
  19. package/out-tsc/execute-command.d.ts +7 -0
  20. package/out-tsc/execute-command.d.ts.map +1 -0
  21. package/out-tsc/execute-command.js +78 -0
  22. package/out-tsc/execute-command.js.map +1 -0
  23. package/out-tsc/execute-commands.d.ts +1 -0
  24. package/out-tsc/execute-commands.d.ts.map +1 -0
  25. package/out-tsc/execute-commands.js +3 -4
  26. package/out-tsc/execute-commands.js.map +1 -1
  27. package/out-tsc/formatter/boundary-writer.d.ts +30 -0
  28. package/out-tsc/formatter/boundary-writer.d.ts.map +1 -0
  29. package/out-tsc/formatter/boundary-writer.js +47 -0
  30. package/out-tsc/formatter/boundary-writer.js.map +1 -0
  31. package/out-tsc/formatter/core/comment-helper.d.ts +11 -0
  32. package/out-tsc/formatter/core/comment-helper.d.ts.map +1 -0
  33. package/out-tsc/formatter/core/comment-helper.js +139 -0
  34. package/out-tsc/formatter/core/comment-helper.js.map +1 -0
  35. package/out-tsc/formatter/core/edit-collector.d.ts +110 -0
  36. package/out-tsc/formatter/core/edit-collector.d.ts.map +1 -0
  37. package/out-tsc/formatter/core/edit-collector.js +159 -0
  38. package/out-tsc/formatter/core/edit-collector.js.map +1 -0
  39. package/out-tsc/formatter/core/formatting-context.d.ts +183 -0
  40. package/out-tsc/formatter/core/formatting-context.d.ts.map +1 -0
  41. package/out-tsc/formatter/core/formatting-context.js +294 -0
  42. package/out-tsc/formatter/core/formatting-context.js.map +1 -0
  43. package/out-tsc/formatter/core/index.d.ts +25 -0
  44. package/out-tsc/formatter/core/index.d.ts.map +1 -0
  45. package/out-tsc/formatter/core/index.js +57 -0
  46. package/out-tsc/formatter/core/index.js.map +1 -0
  47. package/out-tsc/formatter/core/pipeline/formatting-pipeline.d.ts +116 -0
  48. package/out-tsc/formatter/core/pipeline/formatting-pipeline.d.ts.map +1 -0
  49. package/out-tsc/formatter/core/pipeline/formatting-pipeline.js +237 -0
  50. package/out-tsc/formatter/core/pipeline/formatting-pipeline.js.map +1 -0
  51. package/out-tsc/formatter/core/pipeline/index.d.ts +12 -0
  52. package/out-tsc/formatter/core/pipeline/index.d.ts.map +1 -0
  53. package/out-tsc/formatter/core/pipeline/index.js +19 -0
  54. package/out-tsc/formatter/core/pipeline/index.js.map +1 -0
  55. package/out-tsc/formatter/core/pipeline/statement-separation.d.ts +5 -0
  56. package/out-tsc/formatter/core/pipeline/statement-separation.d.ts.map +1 -0
  57. package/out-tsc/formatter/core/pipeline/statement-separation.js +149 -0
  58. package/out-tsc/formatter/core/pipeline/statement-separation.js.map +1 -0
  59. package/out-tsc/formatter/core/rules/index.d.ts +11 -0
  60. package/out-tsc/formatter/core/rules/index.d.ts.map +1 -0
  61. package/out-tsc/formatter/core/rules/index.js +29 -0
  62. package/out-tsc/formatter/core/rules/index.js.map +1 -0
  63. package/out-tsc/formatter/core/rules/newline-rules.d.ts +169 -0
  64. package/out-tsc/formatter/core/rules/newline-rules.d.ts.map +1 -0
  65. package/out-tsc/formatter/core/rules/newline-rules.js +246 -0
  66. package/out-tsc/formatter/core/rules/newline-rules.js.map +1 -0
  67. package/out-tsc/formatter/core/rules/spacing-rules.d.ts +150 -0
  68. package/out-tsc/formatter/core/rules/spacing-rules.d.ts.map +1 -0
  69. package/out-tsc/formatter/core/rules/spacing-rules.js +219 -0
  70. package/out-tsc/formatter/core/rules/spacing-rules.js.map +1 -0
  71. package/out-tsc/formatter/core/strategy-bridge.d.ts +56 -0
  72. package/out-tsc/formatter/core/strategy-bridge.d.ts.map +1 -0
  73. package/out-tsc/formatter/core/strategy-bridge.js +159 -0
  74. package/out-tsc/formatter/core/strategy-bridge.js.map +1 -0
  75. package/out-tsc/formatter/core/strategy-interface.d.ts +123 -0
  76. package/out-tsc/formatter/core/strategy-interface.d.ts.map +1 -0
  77. package/out-tsc/formatter/core/strategy-interface.js +83 -0
  78. package/out-tsc/formatter/core/strategy-interface.js.map +1 -0
  79. package/out-tsc/formatter/core/token-helper.d.ts +12 -0
  80. package/out-tsc/formatter/core/token-helper.d.ts.map +1 -0
  81. package/out-tsc/formatter/core/token-helper.js +79 -0
  82. package/out-tsc/formatter/core/token-helper.js.map +1 -0
  83. package/out-tsc/formatter/core/unicode-utils.d.ts +107 -0
  84. package/out-tsc/formatter/core/unicode-utils.d.ts.map +1 -0
  85. package/out-tsc/formatter/core/unicode-utils.js +181 -0
  86. package/out-tsc/formatter/core/unicode-utils.js.map +1 -0
  87. package/out-tsc/formatter/core/whitespace-writer.d.ts +20 -0
  88. package/out-tsc/formatter/core/whitespace-writer.d.ts.map +1 -0
  89. package/out-tsc/formatter/core/whitespace-writer.js +86 -0
  90. package/out-tsc/formatter/core/whitespace-writer.js.map +1 -0
  91. package/out-tsc/formatter/formatter-adapter.d.ts +56 -0
  92. package/out-tsc/formatter/formatter-adapter.d.ts.map +1 -0
  93. package/out-tsc/formatter/formatter-adapter.js +719 -0
  94. package/out-tsc/formatter/formatter-adapter.js.map +1 -0
  95. package/out-tsc/formatter/index.d.ts +16 -0
  96. package/out-tsc/formatter/index.d.ts.map +1 -0
  97. package/out-tsc/formatter/index.js +43 -0
  98. package/out-tsc/formatter/index.js.map +1 -0
  99. package/out-tsc/formatter/pipe-step-classifier.d.ts +9 -0
  100. package/out-tsc/formatter/pipe-step-classifier.d.ts.map +1 -0
  101. package/out-tsc/formatter/pipe-step-classifier.js +49 -0
  102. package/out-tsc/formatter/pipe-step-classifier.js.map +1 -0
  103. package/out-tsc/formatter/state.d.ts +10 -0
  104. package/out-tsc/formatter/state.d.ts.map +1 -0
  105. package/out-tsc/formatter/state.js +12 -0
  106. package/out-tsc/formatter/state.js.map +1 -0
  107. package/out-tsc/formatter/strategies/block.strategy.d.ts +191 -0
  108. package/out-tsc/formatter/strategies/block.strategy.d.ts.map +1 -0
  109. package/out-tsc/formatter/strategies/block.strategy.js +238 -0
  110. package/out-tsc/formatter/strategies/block.strategy.js.map +1 -0
  111. package/out-tsc/formatter/strategies/clause-head-body.strategy.d.ts +17 -0
  112. package/out-tsc/formatter/strategies/clause-head-body.strategy.d.ts.map +1 -0
  113. package/out-tsc/formatter/strategies/clause-head-body.strategy.js +13 -0
  114. package/out-tsc/formatter/strategies/clause-head-body.strategy.js.map +1 -0
  115. package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.d.ts +68 -0
  116. package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.d.ts.map +1 -0
  117. package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.js +242 -0
  118. package/out-tsc/formatter/strategies/ddl/alter-table-extended.strategy.js.map +1 -0
  119. package/out-tsc/formatter/strategies/ddl/alter-table.strategy.d.ts +146 -0
  120. package/out-tsc/formatter/strategies/ddl/alter-table.strategy.d.ts.map +1 -0
  121. package/out-tsc/formatter/strategies/ddl/alter-table.strategy.js +578 -0
  122. package/out-tsc/formatter/strategies/ddl/alter-table.strategy.js.map +1 -0
  123. package/out-tsc/formatter/strategies/ddl/create-table.strategy.d.ts +103 -0
  124. package/out-tsc/formatter/strategies/ddl/create-table.strategy.d.ts.map +1 -0
  125. package/out-tsc/formatter/strategies/ddl/create-table.strategy.js +659 -0
  126. package/out-tsc/formatter/strategies/ddl/create-table.strategy.js.map +1 -0
  127. package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.d.ts +64 -0
  128. package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.d.ts.map +1 -0
  129. package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.js +402 -0
  130. package/out-tsc/formatter/strategies/ddl/create-view-function.strategy.js.map +1 -0
  131. package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.d.ts +119 -0
  132. package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.d.ts.map +1 -0
  133. package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.js +863 -0
  134. package/out-tsc/formatter/strategies/ddl/drop-utility.strategy.js.map +1 -0
  135. package/out-tsc/formatter/strategies/ddl/index.d.ts +17 -0
  136. package/out-tsc/formatter/strategies/ddl/index.d.ts.map +1 -0
  137. package/out-tsc/formatter/strategies/ddl/index.js +57 -0
  138. package/out-tsc/formatter/strategies/ddl/index.js.map +1 -0
  139. package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.d.ts +26 -0
  140. package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.d.ts.map +1 -0
  141. package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.js +77 -0
  142. package/out-tsc/formatter/strategies/ddl/namespace-catalog.strategy.js.map +1 -0
  143. package/out-tsc/formatter/strategies/ddl/pipeline.strategy.d.ts +99 -0
  144. package/out-tsc/formatter/strategies/ddl/pipeline.strategy.d.ts.map +1 -0
  145. package/out-tsc/formatter/strategies/ddl/pipeline.strategy.js +385 -0
  146. package/out-tsc/formatter/strategies/ddl/pipeline.strategy.js.map +1 -0
  147. package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.d.ts +48 -0
  148. package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.d.ts.map +1 -0
  149. package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.js +145 -0
  150. package/out-tsc/formatter/strategies/ddl/set-reset-config.strategy.js.map +1 -0
  151. package/out-tsc/formatter/strategies/ddl/show-utility.strategy.d.ts +71 -0
  152. package/out-tsc/formatter/strategies/ddl/show-utility.strategy.d.ts.map +1 -0
  153. package/out-tsc/formatter/strategies/ddl/show-utility.strategy.js +196 -0
  154. package/out-tsc/formatter/strategies/ddl/show-utility.strategy.js.map +1 -0
  155. package/out-tsc/formatter/strategies/dml/index.d.ts +10 -0
  156. package/out-tsc/formatter/strategies/dml/index.d.ts.map +1 -0
  157. package/out-tsc/formatter/strategies/dml/index.js +35 -0
  158. package/out-tsc/formatter/strategies/dml/index.js.map +1 -0
  159. package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.d.ts +113 -0
  160. package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.d.ts.map +1 -0
  161. package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.js +438 -0
  162. package/out-tsc/formatter/strategies/dml/insert-update-delete.strategy.js.map +1 -0
  163. package/out-tsc/formatter/strategies/dml/select-clause.strategy.d.ts +76 -0
  164. package/out-tsc/formatter/strategies/dml/select-clause.strategy.d.ts.map +1 -0
  165. package/out-tsc/formatter/strategies/dml/select-clause.strategy.js +480 -0
  166. package/out-tsc/formatter/strategies/dml/select-clause.strategy.js.map +1 -0
  167. package/out-tsc/formatter/strategies/expression/function-call.strategy.d.ts +50 -0
  168. package/out-tsc/formatter/strategies/expression/function-call.strategy.d.ts.map +1 -0
  169. package/out-tsc/formatter/strategies/expression/function-call.strategy.js +319 -0
  170. package/out-tsc/formatter/strategies/expression/function-call.strategy.js.map +1 -0
  171. package/out-tsc/formatter/strategies/expression/index.d.ts +18 -0
  172. package/out-tsc/formatter/strategies/expression/index.d.ts.map +1 -0
  173. package/out-tsc/formatter/strategies/expression/index.js +51 -0
  174. package/out-tsc/formatter/strategies/expression/index.js.map +1 -0
  175. package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.d.ts +55 -0
  176. package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.d.ts.map +1 -0
  177. package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.js +266 -0
  178. package/out-tsc/formatter/strategies/expression/logical-comparison.strategy.js.map +1 -0
  179. package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.d.ts +38 -0
  180. package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.d.ts.map +1 -0
  181. package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.js +397 -0
  182. package/out-tsc/formatter/strategies/expression/subquery-parenthesis.strategy.js.map +1 -0
  183. package/out-tsc/formatter/strategies/function-call.strategy.d.ts +80 -0
  184. package/out-tsc/formatter/strategies/function-call.strategy.d.ts.map +1 -0
  185. package/out-tsc/formatter/strategies/function-call.strategy.js +136 -0
  186. package/out-tsc/formatter/strategies/function-call.strategy.js.map +1 -0
  187. package/out-tsc/formatter/strategies/index.d.ts +87 -0
  188. package/out-tsc/formatter/strategies/index.d.ts.map +1 -0
  189. package/out-tsc/formatter/strategies/index.js +121 -0
  190. package/out-tsc/formatter/strategies/index.js.map +1 -0
  191. package/out-tsc/formatter/strategies/join.strategy.d.ts +31 -0
  192. package/out-tsc/formatter/strategies/join.strategy.d.ts.map +1 -0
  193. package/out-tsc/formatter/strategies/join.strategy.js +29 -0
  194. package/out-tsc/formatter/strategies/join.strategy.js.map +1 -0
  195. package/out-tsc/formatter/strategies/keyword.strategy.d.ts +82 -0
  196. package/out-tsc/formatter/strategies/keyword.strategy.d.ts.map +1 -0
  197. package/out-tsc/formatter/strategies/keyword.strategy.js +129 -0
  198. package/out-tsc/formatter/strategies/keyword.strategy.js.map +1 -0
  199. package/out-tsc/formatter/strategies/list.strategy.d.ts +159 -0
  200. package/out-tsc/formatter/strategies/list.strategy.d.ts.map +1 -0
  201. package/out-tsc/formatter/strategies/list.strategy.js +193 -0
  202. package/out-tsc/formatter/strategies/list.strategy.js.map +1 -0
  203. package/out-tsc/formatter/strategies/pipe-aggregate.strategy.d.ts +24 -0
  204. package/out-tsc/formatter/strategies/pipe-aggregate.strategy.d.ts.map +1 -0
  205. package/out-tsc/formatter/strategies/pipe-aggregate.strategy.js +47 -0
  206. package/out-tsc/formatter/strategies/pipe-aggregate.strategy.js.map +1 -0
  207. package/out-tsc/formatter/strategies/pipe-drop.strategy.d.ts +21 -0
  208. package/out-tsc/formatter/strategies/pipe-drop.strategy.d.ts.map +1 -0
  209. package/out-tsc/formatter/strategies/pipe-drop.strategy.js +52 -0
  210. package/out-tsc/formatter/strategies/pipe-drop.strategy.js.map +1 -0
  211. package/out-tsc/formatter/strategies/pipe-extend.strategy.d.ts +21 -0
  212. package/out-tsc/formatter/strategies/pipe-extend.strategy.d.ts.map +1 -0
  213. package/out-tsc/formatter/strategies/pipe-extend.strategy.js +45 -0
  214. package/out-tsc/formatter/strategies/pipe-extend.strategy.js.map +1 -0
  215. package/out-tsc/formatter/strategies/pipe-join.strategy.d.ts +22 -0
  216. package/out-tsc/formatter/strategies/pipe-join.strategy.d.ts.map +1 -0
  217. package/out-tsc/formatter/strategies/pipe-join.strategy.js +42 -0
  218. package/out-tsc/formatter/strategies/pipe-join.strategy.js.map +1 -0
  219. package/out-tsc/formatter/strategies/pipe-pivot.strategy.d.ts +7 -0
  220. package/out-tsc/formatter/strategies/pipe-pivot.strategy.d.ts.map +1 -0
  221. package/out-tsc/formatter/strategies/pipe-pivot.strategy.js +34 -0
  222. package/out-tsc/formatter/strategies/pipe-pivot.strategy.js.map +1 -0
  223. package/out-tsc/formatter/strategies/pipe-query-organization.strategy.d.ts +7 -0
  224. package/out-tsc/formatter/strategies/pipe-query-organization.strategy.d.ts.map +1 -0
  225. package/out-tsc/formatter/strategies/pipe-query-organization.strategy.js +14 -0
  226. package/out-tsc/formatter/strategies/pipe-query-organization.strategy.js.map +1 -0
  227. package/out-tsc/formatter/strategies/pipe-sample.strategy.d.ts +7 -0
  228. package/out-tsc/formatter/strategies/pipe-sample.strategy.d.ts.map +1 -0
  229. package/out-tsc/formatter/strategies/pipe-sample.strategy.js +18 -0
  230. package/out-tsc/formatter/strategies/pipe-sample.strategy.js.map +1 -0
  231. package/out-tsc/formatter/strategies/pipe-select.strategy.d.ts +22 -0
  232. package/out-tsc/formatter/strategies/pipe-select.strategy.d.ts.map +1 -0
  233. package/out-tsc/formatter/strategies/pipe-select.strategy.js +51 -0
  234. package/out-tsc/formatter/strategies/pipe-select.strategy.js.map +1 -0
  235. package/out-tsc/formatter/strategies/pipe-set-operation.strategy.d.ts +7 -0
  236. package/out-tsc/formatter/strategies/pipe-set-operation.strategy.d.ts.map +1 -0
  237. package/out-tsc/formatter/strategies/pipe-set-operation.strategy.js +30 -0
  238. package/out-tsc/formatter/strategies/pipe-set-operation.strategy.js.map +1 -0
  239. package/out-tsc/formatter/strategies/pipe-set.strategy.d.ts +21 -0
  240. package/out-tsc/formatter/strategies/pipe-set.strategy.d.ts.map +1 -0
  241. package/out-tsc/formatter/strategies/pipe-set.strategy.js +52 -0
  242. package/out-tsc/formatter/strategies/pipe-set.strategy.js.map +1 -0
  243. package/out-tsc/formatter/strategies/pipe-step.strategy.d.ts +25 -0
  244. package/out-tsc/formatter/strategies/pipe-step.strategy.d.ts.map +1 -0
  245. package/out-tsc/{lib/SparkSqlParserVisitor.js → formatter/strategies/pipe-step.strategy.js} +1 -1
  246. package/out-tsc/formatter/strategies/pipe-step.strategy.js.map +1 -0
  247. package/out-tsc/formatter/strategies/pipe-unpivot.strategy.d.ts +7 -0
  248. package/out-tsc/formatter/strategies/pipe-unpivot.strategy.d.ts.map +1 -0
  249. package/out-tsc/formatter/strategies/pipe-unpivot.strategy.js +33 -0
  250. package/out-tsc/formatter/strategies/pipe-unpivot.strategy.js.map +1 -0
  251. package/out-tsc/formatter/strategies/pipe-where.strategy.d.ts +21 -0
  252. package/out-tsc/formatter/strategies/pipe-where.strategy.d.ts.map +1 -0
  253. package/out-tsc/formatter/strategies/pipe-where.strategy.js +44 -0
  254. package/out-tsc/formatter/strategies/pipe-where.strategy.js.map +1 -0
  255. package/out-tsc/formatter/strategies/procedure/case-statement.strategy.d.ts +20 -0
  256. package/out-tsc/formatter/strategies/procedure/case-statement.strategy.d.ts.map +1 -0
  257. package/out-tsc/formatter/strategies/procedure/case-statement.strategy.js +132 -0
  258. package/out-tsc/formatter/strategies/procedure/case-statement.strategy.js.map +1 -0
  259. package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.d.ts +43 -0
  260. package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.d.ts.map +1 -0
  261. package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.js +174 -0
  262. package/out-tsc/formatter/strategies/procedure/compound-statement.strategy.js.map +1 -0
  263. package/out-tsc/formatter/strategies/procedure/handler.strategy.d.ts +23 -0
  264. package/out-tsc/formatter/strategies/procedure/handler.strategy.d.ts.map +1 -0
  265. package/out-tsc/formatter/strategies/procedure/handler.strategy.js +81 -0
  266. package/out-tsc/formatter/strategies/procedure/handler.strategy.js.map +1 -0
  267. package/out-tsc/formatter/strategies/procedure/if-else.strategy.d.ts +19 -0
  268. package/out-tsc/formatter/strategies/procedure/if-else.strategy.d.ts.map +1 -0
  269. package/out-tsc/formatter/strategies/procedure/if-else.strategy.js +80 -0
  270. package/out-tsc/formatter/strategies/procedure/if-else.strategy.js.map +1 -0
  271. package/out-tsc/formatter/strategies/procedure/index.d.ts +27 -0
  272. package/out-tsc/formatter/strategies/procedure/index.d.ts.map +1 -0
  273. package/out-tsc/formatter/strategies/procedure/index.js +63 -0
  274. package/out-tsc/formatter/strategies/procedure/index.js.map +1 -0
  275. package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.d.ts +19 -0
  276. package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.d.ts.map +1 -0
  277. package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.js +54 -0
  278. package/out-tsc/formatter/strategies/procedure/leave-iterate.strategy.js.map +1 -0
  279. package/out-tsc/formatter/strategies/procedure/loop.strategy.d.ts +71 -0
  280. package/out-tsc/formatter/strategies/procedure/loop.strategy.d.ts.map +1 -0
  281. package/out-tsc/formatter/strategies/procedure/loop.strategy.js +216 -0
  282. package/out-tsc/formatter/strategies/procedure/loop.strategy.js.map +1 -0
  283. package/out-tsc/formatter/strategy-based-formatter.d.ts +329 -0
  284. package/out-tsc/formatter/strategy-based-formatter.d.ts.map +1 -0
  285. package/out-tsc/formatter/strategy-based-formatter.js +3808 -0
  286. package/out-tsc/formatter/strategy-based-formatter.js.map +1 -0
  287. package/out-tsc/formatter/strategy-dispatcher.d.ts +24 -0
  288. package/out-tsc/formatter/strategy-dispatcher.d.ts.map +1 -0
  289. package/out-tsc/formatter/strategy-dispatcher.js +19 -0
  290. package/out-tsc/formatter/strategy-dispatcher.js.map +1 -0
  291. package/out-tsc/formatter/types.d.ts +2 -0
  292. package/out-tsc/formatter/types.d.ts.map +1 -0
  293. package/out-tsc/{lib/SparkSqlParserListener.js → formatter/types.js} +1 -1
  294. package/out-tsc/formatter/types.js.map +1 -0
  295. package/out-tsc/formatter/visitor/ddl/alter-table.d.ts +48 -0
  296. package/out-tsc/formatter/visitor/ddl/alter-table.d.ts.map +1 -0
  297. package/out-tsc/formatter/visitor/ddl/alter-table.js +133 -0
  298. package/out-tsc/formatter/visitor/ddl/alter-table.js.map +1 -0
  299. package/out-tsc/formatter/visitor/ddl/create-table.d.ts +54 -0
  300. package/out-tsc/formatter/visitor/ddl/create-table.d.ts.map +1 -0
  301. package/out-tsc/formatter/visitor/ddl/create-table.js +142 -0
  302. package/out-tsc/formatter/visitor/ddl/create-table.js.map +1 -0
  303. package/out-tsc/formatter/visitor/ddl/create-view.d.ts +27 -0
  304. package/out-tsc/formatter/visitor/ddl/create-view.d.ts.map +1 -0
  305. package/out-tsc/formatter/visitor/ddl/create-view.js +61 -0
  306. package/out-tsc/formatter/visitor/ddl/create-view.js.map +1 -0
  307. package/out-tsc/formatter/visitor/ddl/drop.d.ts +30 -0
  308. package/out-tsc/formatter/visitor/ddl/drop.d.ts.map +1 -0
  309. package/out-tsc/formatter/visitor/ddl/drop.js +69 -0
  310. package/out-tsc/formatter/visitor/ddl/drop.js.map +1 -0
  311. package/out-tsc/formatter/visitor/ddl/index.d.ts +10 -0
  312. package/out-tsc/formatter/visitor/ddl/index.d.ts.map +1 -0
  313. package/out-tsc/formatter/visitor/ddl/index.js +26 -0
  314. package/out-tsc/formatter/visitor/ddl/index.js.map +1 -0
  315. package/out-tsc/formatter/visitor/dml/delete.d.ts +26 -0
  316. package/out-tsc/formatter/visitor/dml/delete.d.ts.map +1 -0
  317. package/out-tsc/formatter/visitor/dml/delete.js +38 -0
  318. package/out-tsc/formatter/visitor/dml/delete.js.map +1 -0
  319. package/out-tsc/formatter/visitor/dml/index.d.ts +10 -0
  320. package/out-tsc/formatter/visitor/dml/index.d.ts.map +1 -0
  321. package/out-tsc/formatter/visitor/dml/index.js +26 -0
  322. package/out-tsc/formatter/visitor/dml/index.js.map +1 -0
  323. package/out-tsc/formatter/visitor/dml/insert.d.ts +42 -0
  324. package/out-tsc/formatter/visitor/dml/insert.d.ts.map +1 -0
  325. package/out-tsc/formatter/visitor/dml/insert.js +112 -0
  326. package/out-tsc/formatter/visitor/dml/insert.js.map +1 -0
  327. package/out-tsc/formatter/visitor/dml/merge.d.ts +40 -0
  328. package/out-tsc/formatter/visitor/dml/merge.d.ts.map +1 -0
  329. package/out-tsc/formatter/visitor/dml/merge.js +67 -0
  330. package/out-tsc/formatter/visitor/dml/merge.js.map +1 -0
  331. package/out-tsc/formatter/visitor/dml/update.d.ts +33 -0
  332. package/out-tsc/formatter/visitor/dml/update.d.ts.map +1 -0
  333. package/out-tsc/formatter/visitor/dml/update.js +49 -0
  334. package/out-tsc/formatter/visitor/dml/update.js.map +1 -0
  335. package/out-tsc/formatter/visitor/expression/arithmetic.d.ts +20 -0
  336. package/out-tsc/formatter/visitor/expression/arithmetic.d.ts.map +1 -0
  337. package/out-tsc/formatter/visitor/expression/arithmetic.js +44 -0
  338. package/out-tsc/formatter/visitor/expression/arithmetic.js.map +1 -0
  339. package/out-tsc/formatter/visitor/expression/case-when.d.ts +41 -0
  340. package/out-tsc/formatter/visitor/expression/case-when.d.ts.map +1 -0
  341. package/out-tsc/formatter/visitor/expression/case-when.js +94 -0
  342. package/out-tsc/formatter/visitor/expression/case-when.js.map +1 -0
  343. package/out-tsc/formatter/visitor/expression/comparison.d.ts +20 -0
  344. package/out-tsc/formatter/visitor/expression/comparison.d.ts.map +1 -0
  345. package/out-tsc/formatter/visitor/expression/comparison.js +26 -0
  346. package/out-tsc/formatter/visitor/expression/comparison.js.map +1 -0
  347. package/out-tsc/formatter/visitor/expression/function-call.d.ts +20 -0
  348. package/out-tsc/formatter/visitor/expression/function-call.d.ts.map +1 -0
  349. package/out-tsc/formatter/visitor/expression/function-call.js +33 -0
  350. package/out-tsc/formatter/visitor/expression/function-call.js.map +1 -0
  351. package/out-tsc/formatter/visitor/expression/index.d.ts +11 -0
  352. package/out-tsc/formatter/visitor/expression/index.d.ts.map +1 -0
  353. package/out-tsc/formatter/visitor/expression/index.js +27 -0
  354. package/out-tsc/formatter/visitor/expression/index.js.map +1 -0
  355. package/out-tsc/formatter/visitor/expression/logical.d.ts +26 -0
  356. package/out-tsc/formatter/visitor/expression/logical.d.ts.map +1 -0
  357. package/out-tsc/formatter/visitor/expression/logical.js +46 -0
  358. package/out-tsc/formatter/visitor/expression/logical.js.map +1 -0
  359. package/out-tsc/formatter/visitor/formatter-core.d.ts +79 -0
  360. package/out-tsc/formatter/visitor/formatter-core.d.ts.map +1 -0
  361. package/out-tsc/formatter/visitor/formatter-core.js +211 -0
  362. package/out-tsc/formatter/visitor/formatter-core.js.map +1 -0
  363. package/out-tsc/formatter/visitor/index.d.ts +21 -0
  364. package/out-tsc/formatter/visitor/index.d.ts.map +1 -0
  365. package/out-tsc/formatter/visitor/index.js +26 -0
  366. package/out-tsc/formatter/visitor/index.js.map +1 -0
  367. package/out-tsc/formatter/visitor/management/cache.d.ts +26 -0
  368. package/out-tsc/formatter/visitor/management/cache.d.ts.map +1 -0
  369. package/out-tsc/formatter/visitor/management/cache.js +58 -0
  370. package/out-tsc/formatter/visitor/management/cache.js.map +1 -0
  371. package/out-tsc/formatter/visitor/management/index.d.ts +8 -0
  372. package/out-tsc/formatter/visitor/management/index.d.ts.map +1 -0
  373. package/out-tsc/formatter/visitor/management/index.js +24 -0
  374. package/out-tsc/formatter/visitor/management/index.js.map +1 -0
  375. package/out-tsc/formatter/visitor/management/refresh.d.ts +26 -0
  376. package/out-tsc/formatter/visitor/management/refresh.d.ts.map +1 -0
  377. package/out-tsc/formatter/visitor/management/refresh.js +55 -0
  378. package/out-tsc/formatter/visitor/management/refresh.js.map +1 -0
  379. package/out-tsc/formatter/visitor/pipeline/delta-live-tables.d.ts +31 -0
  380. package/out-tsc/formatter/visitor/pipeline/delta-live-tables.d.ts.map +1 -0
  381. package/out-tsc/formatter/visitor/pipeline/delta-live-tables.js +46 -0
  382. package/out-tsc/formatter/visitor/pipeline/delta-live-tables.js.map +1 -0
  383. package/out-tsc/formatter/visitor/pipeline/index.d.ts +7 -0
  384. package/out-tsc/formatter/visitor/pipeline/index.d.ts.map +1 -0
  385. package/out-tsc/formatter/visitor/pipeline/index.js +23 -0
  386. package/out-tsc/formatter/visitor/pipeline/index.js.map +1 -0
  387. package/out-tsc/formatter/visitor/query/cte.d.ts +34 -0
  388. package/out-tsc/formatter/visitor/query/cte.d.ts.map +1 -0
  389. package/out-tsc/formatter/visitor/query/cte.js +54 -0
  390. package/out-tsc/formatter/visitor/query/cte.js.map +1 -0
  391. package/out-tsc/formatter/visitor/query/index.d.ts +11 -0
  392. package/out-tsc/formatter/visitor/query/index.d.ts.map +1 -0
  393. package/out-tsc/formatter/visitor/query/index.js +27 -0
  394. package/out-tsc/formatter/visitor/query/index.js.map +1 -0
  395. package/out-tsc/formatter/visitor/query/query-organization.d.ts +25 -0
  396. package/out-tsc/formatter/visitor/query/query-organization.d.ts.map +1 -0
  397. package/out-tsc/formatter/visitor/query/query-organization.js +75 -0
  398. package/out-tsc/formatter/visitor/query/query-organization.js.map +1 -0
  399. package/out-tsc/formatter/visitor/query/query.d.ts +22 -0
  400. package/out-tsc/formatter/visitor/query/query.d.ts.map +1 -0
  401. package/out-tsc/formatter/visitor/query/query.js +30 -0
  402. package/out-tsc/formatter/visitor/query/query.js.map +1 -0
  403. package/out-tsc/formatter/visitor/query/select-clause.d.ts +17 -0
  404. package/out-tsc/formatter/visitor/query/select-clause.d.ts.map +1 -0
  405. package/out-tsc/formatter/visitor/query/select-clause.js +35 -0
  406. package/out-tsc/formatter/visitor/query/select-clause.js.map +1 -0
  407. package/out-tsc/formatter/visitor/query/set-operation.d.ts +25 -0
  408. package/out-tsc/formatter/visitor/query/set-operation.d.ts.map +1 -0
  409. package/out-tsc/formatter/visitor/query/set-operation.js +52 -0
  410. package/out-tsc/formatter/visitor/query/set-operation.js.map +1 -0
  411. package/out-tsc/formatter/visitor/statements/index.d.ts +7 -0
  412. package/out-tsc/formatter/visitor/statements/index.d.ts.map +1 -0
  413. package/out-tsc/formatter/visitor/statements/index.js +23 -0
  414. package/out-tsc/formatter/visitor/statements/index.js.map +1 -0
  415. package/out-tsc/formatter/visitor/statements/program.d.ts +33 -0
  416. package/out-tsc/formatter/visitor/statements/program.d.ts.map +1 -0
  417. package/out-tsc/formatter/visitor/statements/program.js +69 -0
  418. package/out-tsc/formatter/visitor/statements/program.js.map +1 -0
  419. package/out-tsc/formatter/visitor/types/complex-types.d.ts +24 -0
  420. package/out-tsc/formatter/visitor/types/complex-types.d.ts.map +1 -0
  421. package/out-tsc/formatter/visitor/types/complex-types.js +47 -0
  422. package/out-tsc/formatter/visitor/types/complex-types.js.map +1 -0
  423. package/out-tsc/formatter/visitor/types/index.d.ts +8 -0
  424. package/out-tsc/formatter/visitor/types/index.d.ts.map +1 -0
  425. package/out-tsc/formatter/visitor/types/index.js +24 -0
  426. package/out-tsc/formatter/visitor/types/index.js.map +1 -0
  427. package/out-tsc/formatter/visitor/types/primitive-types.d.ts +22 -0
  428. package/out-tsc/formatter/visitor/types/primitive-types.d.ts.map +1 -0
  429. package/out-tsc/formatter/visitor/types/primitive-types.js +37 -0
  430. package/out-tsc/formatter/visitor/types/primitive-types.js.map +1 -0
  431. package/out-tsc/formatter/visitor/utils/context-helpers.d.ts +32 -0
  432. package/out-tsc/formatter/visitor/utils/context-helpers.d.ts.map +1 -0
  433. package/out-tsc/formatter/visitor/utils/context-helpers.js +98 -0
  434. package/out-tsc/formatter/visitor/utils/context-helpers.js.map +1 -0
  435. package/out-tsc/formatter/visitor/utils/index.d.ts +11 -0
  436. package/out-tsc/formatter/visitor/utils/index.d.ts.map +1 -0
  437. package/out-tsc/formatter/visitor/utils/index.js +45 -0
  438. package/out-tsc/formatter/visitor/utils/index.js.map +1 -0
  439. package/out-tsc/formatter/visitor/utils/keyword-formatting.d.ts +57 -0
  440. package/out-tsc/formatter/visitor/utils/keyword-formatting.d.ts.map +1 -0
  441. package/out-tsc/formatter/visitor/utils/keyword-formatting.js +87 -0
  442. package/out-tsc/formatter/visitor/utils/keyword-formatting.js.map +1 -0
  443. package/out-tsc/formatter/visitor/utils/parenthesis-formatting.d.ts +53 -0
  444. package/out-tsc/formatter/visitor/utils/parenthesis-formatting.d.ts.map +1 -0
  445. package/out-tsc/formatter/visitor/utils/parenthesis-formatting.js +88 -0
  446. package/out-tsc/formatter/visitor/utils/parenthesis-formatting.js.map +1 -0
  447. package/out-tsc/formatter/visitor/utils/space-compression.d.ts +55 -0
  448. package/out-tsc/formatter/visitor/utils/space-compression.d.ts.map +1 -0
  449. package/out-tsc/formatter/visitor/utils/space-compression.js +71 -0
  450. package/out-tsc/formatter/visitor/utils/space-compression.js.map +1 -0
  451. package/out-tsc/formatter/visitor/utils/token-helpers.d.ts +64 -0
  452. package/out-tsc/formatter/visitor/utils/token-helpers.d.ts.map +1 -0
  453. package/out-tsc/formatter/visitor/utils/token-helpers.js +249 -0
  454. package/out-tsc/formatter/visitor/utils/token-helpers.js.map +1 -0
  455. package/out-tsc/index.d.ts +2 -1
  456. package/out-tsc/index.d.ts.map +1 -0
  457. package/out-tsc/index.js +3 -1
  458. package/out-tsc/index.js.map +1 -1
  459. package/out-tsc/lib/SparkSQLLexer.d.ts +557 -0
  460. package/out-tsc/lib/SparkSQLLexer.d.ts.map +1 -0
  461. package/out-tsc/lib/SparkSQLLexer.js +3676 -0
  462. package/out-tsc/lib/SparkSQLLexer.js.map +1 -0
  463. package/out-tsc/lib/SparkSQLParser.d.ts +7884 -0
  464. package/out-tsc/lib/SparkSQLParser.d.ts.map +1 -0
  465. package/out-tsc/lib/SparkSQLParser.js +45848 -0
  466. package/out-tsc/lib/SparkSQLParser.js.map +1 -0
  467. package/out-tsc/lib/SparkSQLParserListener.d.ts +5855 -0
  468. package/out-tsc/lib/SparkSQLParserListener.d.ts.map +1 -0
  469. package/out-tsc/lib/SparkSQLParserListener.js +4 -0
  470. package/out-tsc/lib/SparkSQLParserListener.js.map +1 -0
  471. package/out-tsc/lib/SparkSQLParserVisitor.d.ts +3674 -0
  472. package/out-tsc/lib/SparkSQLParserVisitor.d.ts.map +1 -0
  473. package/out-tsc/lib/SparkSQLParserVisitor.js +4 -0
  474. package/out-tsc/lib/SparkSQLParserVisitor.js.map +1 -0
  475. package/out-tsc/lineage.typing.d.ts +64 -0
  476. package/out-tsc/lineage.typing.d.ts.map +1 -0
  477. package/out-tsc/lineage.typing.js +3 -0
  478. package/out-tsc/lineage.typing.js.map +1 -0
  479. package/out-tsc/listeners/parse-error.listener.d.ts +3 -2
  480. package/out-tsc/listeners/parse-error.listener.d.ts.map +1 -0
  481. package/out-tsc/listeners/parse-error.listener.js +4 -4
  482. package/out-tsc/listeners/parse-error.listener.js.map +1 -1
  483. package/out-tsc/listeners/schema.listener.d.ts +32 -39
  484. package/out-tsc/listeners/schema.listener.d.ts.map +1 -0
  485. package/out-tsc/listeners/schema.listener.js +58 -100
  486. package/out-tsc/listeners/schema.listener.js.map +1 -1
  487. package/out-tsc/listeners/statement.listener.d.ts +263 -5
  488. package/out-tsc/listeners/statement.listener.d.ts.map +1 -0
  489. package/out-tsc/listeners/statement.listener.js +836 -11
  490. package/out-tsc/listeners/statement.listener.js.map +1 -1
  491. package/out-tsc/listeners/structure.listener.d.ts +70 -0
  492. package/out-tsc/listeners/structure.listener.d.ts.map +1 -0
  493. package/out-tsc/listeners/structure.listener.js +211 -0
  494. package/out-tsc/listeners/structure.listener.js.map +1 -0
  495. package/out-tsc/listeners/tokens-collector.listener.d.ts +27 -0
  496. package/out-tsc/listeners/tokens-collector.listener.d.ts.map +1 -0
  497. package/out-tsc/listeners/tokens-collector.listener.js +102 -0
  498. package/out-tsc/listeners/tokens-collector.listener.js.map +1 -0
  499. package/out-tsc/lsp-server.d.ts +79 -8
  500. package/out-tsc/lsp-server.d.ts.map +1 -0
  501. package/out-tsc/lsp-server.js +672 -237
  502. package/out-tsc/lsp-server.js.map +1 -1
  503. package/out-tsc/metadata.typing.d.ts +1 -0
  504. package/out-tsc/metadata.typing.d.ts.map +1 -0
  505. package/out-tsc/monaco-config.d.ts +219 -0
  506. package/out-tsc/monaco-config.d.ts.map +1 -0
  507. package/out-tsc/monaco-config.js +1032 -0
  508. package/out-tsc/monaco-config.js.map +1 -0
  509. package/out-tsc/parsing-warehouse.d.ts +8 -3
  510. package/out-tsc/parsing-warehouse.d.ts.map +1 -0
  511. package/out-tsc/parsing-warehouse.js +62 -6
  512. package/out-tsc/parsing-warehouse.js.map +1 -1
  513. package/out-tsc/protocol-translation.d.ts +12 -5
  514. package/out-tsc/protocol-translation.d.ts.map +1 -0
  515. package/out-tsc/protocol-translation.js +72 -19
  516. package/out-tsc/protocol-translation.js.map +1 -1
  517. package/out-tsc/public-apis.d.ts +1 -0
  518. package/out-tsc/public-apis.d.ts.map +1 -0
  519. package/out-tsc/schema-registry.d.ts +10 -7
  520. package/out-tsc/schema-registry.d.ts.map +1 -0
  521. package/out-tsc/schema-registry.js +87 -106
  522. package/out-tsc/schema-registry.js.map +1 -1
  523. package/out-tsc/server-worker.d.ts +1 -0
  524. package/out-tsc/server-worker.d.ts.map +1 -0
  525. package/out-tsc/server-worker.js +159 -44
  526. package/out-tsc/server-worker.js.map +1 -1
  527. package/out-tsc/tests/folding/block-comment-folding.test.d.ts +7 -0
  528. package/out-tsc/tests/folding/block-comment-folding.test.d.ts.map +1 -0
  529. package/out-tsc/tests/folding/block-comment-folding.test.js +268 -0
  530. package/out-tsc/tests/folding/block-comment-folding.test.js.map +1 -0
  531. package/out-tsc/tests/folding/caching.test.d.ts +11 -0
  532. package/out-tsc/tests/folding/caching.test.d.ts.map +1 -0
  533. package/out-tsc/tests/folding/caching.test.js +141 -0
  534. package/out-tsc/tests/folding/caching.test.js.map +1 -0
  535. package/out-tsc/tests/folding/cte-dependency-chain.test.d.ts +15 -0
  536. package/out-tsc/tests/folding/cte-dependency-chain.test.d.ts.map +1 -0
  537. package/out-tsc/tests/folding/cte-dependency-chain.test.js +323 -0
  538. package/out-tsc/tests/folding/cte-dependency-chain.test.js.map +1 -0
  539. package/out-tsc/tests/folding/debug-format-flow.test.d.ts +2 -0
  540. package/out-tsc/tests/folding/debug-format-flow.test.d.ts.map +1 -0
  541. package/out-tsc/tests/folding/debug-format-flow.test.js +114 -0
  542. package/out-tsc/tests/folding/debug-format-flow.test.js.map +1 -0
  543. package/out-tsc/tests/folding/debug-formatted.test.d.ts +2 -0
  544. package/out-tsc/tests/folding/debug-formatted.test.d.ts.map +1 -0
  545. package/out-tsc/tests/folding/debug-formatted.test.js +175 -0
  546. package/out-tsc/tests/folding/debug-formatted.test.js.map +1 -0
  547. package/out-tsc/tests/folding/deduplication.test.d.ts +10 -0
  548. package/out-tsc/tests/folding/deduplication.test.d.ts.map +1 -0
  549. package/out-tsc/tests/folding/deduplication.test.js +206 -0
  550. package/out-tsc/tests/folding/deduplication.test.js.map +1 -0
  551. package/out-tsc/tests/folding/edge-cases.test.d.ts +8 -0
  552. package/out-tsc/tests/folding/edge-cases.test.d.ts.map +1 -0
  553. package/out-tsc/tests/folding/edge-cases.test.js +319 -0
  554. package/out-tsc/tests/folding/edge-cases.test.js.map +1 -0
  555. package/out-tsc/tests/folding/folding-level-config.test.d.ts +11 -0
  556. package/out-tsc/tests/folding/folding-level-config.test.d.ts.map +1 -0
  557. package/out-tsc/tests/folding/folding-level-config.test.js +313 -0
  558. package/out-tsc/tests/folding/folding-level-config.test.js.map +1 -0
  559. package/out-tsc/tests/folding/folding-statistics.test.d.ts +13 -0
  560. package/out-tsc/tests/folding/folding-statistics.test.d.ts.map +1 -0
  561. package/out-tsc/tests/folding/folding-statistics.test.js +144 -0
  562. package/out-tsc/tests/folding/folding-statistics.test.js.map +1 -0
  563. package/out-tsc/tests/folding/index.d.ts +8 -0
  564. package/out-tsc/tests/folding/index.d.ts.map +1 -0
  565. package/out-tsc/tests/folding/index.js +24 -0
  566. package/out-tsc/tests/folding/index.js.map +1 -0
  567. package/out-tsc/tests/folding/join-folding.test.d.ts +11 -0
  568. package/out-tsc/tests/folding/join-folding.test.d.ts.map +1 -0
  569. package/out-tsc/tests/folding/join-folding.test.js +167 -0
  570. package/out-tsc/tests/folding/join-folding.test.js.map +1 -0
  571. package/out-tsc/tests/folding/kind-classification.test.d.ts +11 -0
  572. package/out-tsc/tests/folding/kind-classification.test.d.ts.map +1 -0
  573. package/out-tsc/tests/folding/kind-classification.test.js +270 -0
  574. package/out-tsc/tests/folding/kind-classification.test.js.map +1 -0
  575. package/out-tsc/tests/folding/level1-statement.test.d.ts +8 -0
  576. package/out-tsc/tests/folding/level1-statement.test.d.ts.map +1 -0
  577. package/out-tsc/tests/folding/level1-statement.test.js +278 -0
  578. package/out-tsc/tests/folding/level1-statement.test.js.map +1 -0
  579. package/out-tsc/tests/folding/level2-query-block.test.d.ts +8 -0
  580. package/out-tsc/tests/folding/level2-query-block.test.d.ts.map +1 -0
  581. package/out-tsc/tests/folding/level2-query-block.test.js +374 -0
  582. package/out-tsc/tests/folding/level2-query-block.test.js.map +1 -0
  583. package/out-tsc/tests/folding/level3-expression.test.d.ts +8 -0
  584. package/out-tsc/tests/folding/level3-expression.test.d.ts.map +1 -0
  585. package/out-tsc/tests/folding/level3-expression.test.js +361 -0
  586. package/out-tsc/tests/folding/level3-expression.test.js.map +1 -0
  587. package/out-tsc/tests/folding/level4-structure.test.d.ts +8 -0
  588. package/out-tsc/tests/folding/level4-structure.test.d.ts.map +1 -0
  589. package/out-tsc/tests/folding/level4-structure.test.js +270 -0
  590. package/out-tsc/tests/folding/level4-structure.test.js.map +1 -0
  591. package/out-tsc/tests/folding/line-comment-folding.test.d.ts +13 -0
  592. package/out-tsc/tests/folding/line-comment-folding.test.d.ts.map +1 -0
  593. package/out-tsc/tests/folding/line-comment-folding.test.js +215 -0
  594. package/out-tsc/tests/folding/line-comment-folding.test.js.map +1 -0
  595. package/out-tsc/tests/folding/nested-folding.test.d.ts +8 -0
  596. package/out-tsc/tests/folding/nested-folding.test.d.ts.map +1 -0
  597. package/out-tsc/tests/folding/nested-folding.test.js +386 -0
  598. package/out-tsc/tests/folding/nested-folding.test.js.map +1 -0
  599. package/out-tsc/tests/folding/performance-benchmark.test.d.ts +11 -0
  600. package/out-tsc/tests/folding/performance-benchmark.test.d.ts.map +1 -0
  601. package/out-tsc/tests/folding/performance-benchmark.test.js +256 -0
  602. package/out-tsc/tests/folding/performance-benchmark.test.js.map +1 -0
  603. package/out-tsc/tests/folding/region-marker-folding.test.d.ts +11 -0
  604. package/out-tsc/tests/folding/region-marker-folding.test.d.ts.map +1 -0
  605. package/out-tsc/tests/folding/region-marker-folding.test.js +245 -0
  606. package/out-tsc/tests/folding/region-marker-folding.test.js.map +1 -0
  607. package/out-tsc/tests/folding/select-columns-folding.test.d.ts +10 -0
  608. package/out-tsc/tests/folding/select-columns-folding.test.d.ts.map +1 -0
  609. package/out-tsc/tests/folding/select-columns-folding.test.js +139 -0
  610. package/out-tsc/tests/folding/select-columns-folding.test.js.map +1 -0
  611. package/out-tsc/tests/folding/test-utils.d.ts +73 -0
  612. package/out-tsc/tests/folding/test-utils.d.ts.map +1 -0
  613. package/out-tsc/tests/folding/test-utils.js +98 -0
  614. package/out-tsc/tests/folding/test-utils.js.map +1 -0
  615. package/out-tsc/tests/folding/values-folding.test.d.ts +10 -0
  616. package/out-tsc/tests/folding/values-folding.test.d.ts.map +1 -0
  617. package/out-tsc/tests/folding/values-folding.test.js +102 -0
  618. package/out-tsc/tests/folding/values-folding.test.js.map +1 -0
  619. package/out-tsc/tests/format/ddl/datatype-constraint.test.d.ts +5 -0
  620. package/out-tsc/tests/format/ddl/datatype-constraint.test.d.ts.map +1 -0
  621. package/out-tsc/tests/format/ddl/datatype-constraint.test.js +132 -0
  622. package/out-tsc/tests/format/ddl/datatype-constraint.test.js.map +1 -0
  623. package/out-tsc/tests/format/ddl/index.test.d.ts +5 -0
  624. package/out-tsc/tests/format/ddl/index.test.d.ts.map +1 -0
  625. package/out-tsc/tests/format/ddl/index.test.js +74 -0
  626. package/out-tsc/tests/format/ddl/index.test.js.map +1 -0
  627. package/out-tsc/tests/format/ddl/materialized-view.test.d.ts +5 -0
  628. package/out-tsc/tests/format/ddl/materialized-view.test.d.ts.map +1 -0
  629. package/out-tsc/tests/format/ddl/materialized-view.test.js +92 -0
  630. package/out-tsc/tests/format/ddl/materialized-view.test.js.map +1 -0
  631. package/out-tsc/tests/format/ddl/partition.test.d.ts +5 -0
  632. package/out-tsc/tests/format/ddl/partition.test.d.ts.map +1 -0
  633. package/out-tsc/tests/format/ddl/partition.test.js +109 -0
  634. package/out-tsc/tests/format/ddl/partition.test.js.map +1 -0
  635. package/out-tsc/tests/format/ddl/variable.test.d.ts +5 -0
  636. package/out-tsc/tests/format/ddl/variable.test.d.ts.map +1 -0
  637. package/out-tsc/tests/format/ddl/variable.test.js +58 -0
  638. package/out-tsc/tests/format/ddl/variable.test.js.map +1 -0
  639. package/out-tsc/tests/format/dml/select.test.d.ts +5 -0
  640. package/out-tsc/tests/format/dml/select.test.d.ts.map +1 -0
  641. package/out-tsc/tests/format/dml/select.test.js +114 -0
  642. package/out-tsc/tests/format/dml/select.test.js.map +1 -0
  643. package/out-tsc/tests/format/dml/subquery.test.d.ts +5 -0
  644. package/out-tsc/tests/format/dml/subquery.test.d.ts.map +1 -0
  645. package/out-tsc/tests/format/dml/subquery.test.js +221 -0
  646. package/out-tsc/tests/format/dml/subquery.test.js.map +1 -0
  647. package/out-tsc/tests/format/dql/comment.test.d.ts +7 -0
  648. package/out-tsc/tests/format/dql/comment.test.d.ts.map +1 -0
  649. package/out-tsc/tests/format/dql/comment.test.js +279 -0
  650. package/out-tsc/tests/format/dql/comment.test.js.map +1 -0
  651. package/out-tsc/tests/format/dql/cte.test.d.ts +7 -0
  652. package/out-tsc/tests/format/dql/cte.test.d.ts.map +1 -0
  653. package/out-tsc/tests/format/dql/cte.test.js +31 -0
  654. package/out-tsc/tests/format/dql/cte.test.js.map +1 -0
  655. package/out-tsc/tests/format/dql/dql-detail.test.d.ts +5 -0
  656. package/out-tsc/tests/format/dql/dql-detail.test.d.ts.map +1 -0
  657. package/out-tsc/tests/format/dql/dql-detail.test.js +191 -0
  658. package/out-tsc/tests/format/dql/dql-detail.test.js.map +1 -0
  659. package/out-tsc/tests/format/dql/lateral-view.test.d.ts +7 -0
  660. package/out-tsc/tests/format/dql/lateral-view.test.d.ts.map +1 -0
  661. package/out-tsc/tests/format/dql/lateral-view.test.js +34 -0
  662. package/out-tsc/tests/format/dql/lateral-view.test.js.map +1 -0
  663. package/out-tsc/tests/format/dql/pivot.test.d.ts +7 -0
  664. package/out-tsc/tests/format/dql/pivot.test.d.ts.map +1 -0
  665. package/out-tsc/tests/format/dql/pivot.test.js +56 -0
  666. package/out-tsc/tests/format/dql/pivot.test.js.map +1 -0
  667. package/out-tsc/tests/format/dql/window.test.d.ts +7 -0
  668. package/out-tsc/tests/format/dql/window.test.d.ts.map +1 -0
  669. package/out-tsc/tests/format/dql/window.test.js +89 -0
  670. package/out-tsc/tests/format/dql/window.test.js.map +1 -0
  671. package/out-tsc/tests/format/expression/expression.test.d.ts +5 -0
  672. package/out-tsc/tests/format/expression/expression.test.d.ts.map +1 -0
  673. package/out-tsc/tests/format/expression/expression.test.js +203 -0
  674. package/out-tsc/tests/format/expression/expression.test.js.map +1 -0
  675. package/out-tsc/tests/format/pipe/pipe-operator.test.d.ts +5 -0
  676. package/out-tsc/tests/format/pipe/pipe-operator.test.d.ts.map +1 -0
  677. package/out-tsc/tests/format/pipe/pipe-operator.test.js +290 -0
  678. package/out-tsc/tests/format/pipe/pipe-operator.test.js.map +1 -0
  679. package/out-tsc/tests/format/procedure/compound-statement.test.d.ts +16 -0
  680. package/out-tsc/tests/format/procedure/compound-statement.test.d.ts.map +1 -0
  681. package/out-tsc/tests/format/procedure/compound-statement.test.js +254 -0
  682. package/out-tsc/tests/format/procedure/compound-statement.test.js.map +1 -0
  683. package/out-tsc/tests/format/resource/resource.test.d.ts +5 -0
  684. package/out-tsc/tests/format/resource/resource.test.d.ts.map +1 -0
  685. package/out-tsc/tests/format/resource/resource.test.js +69 -0
  686. package/out-tsc/tests/format/resource/resource.test.js.map +1 -0
  687. package/out-tsc/tests/format/test-utils.d.ts +40 -0
  688. package/out-tsc/tests/format/test-utils.d.ts.map +1 -0
  689. package/out-tsc/tests/format/test-utils.js +53 -0
  690. package/out-tsc/tests/format/test-utils.js.map +1 -0
  691. package/out-tsc/tests/lsp-server.test.d.ts +2 -0
  692. package/out-tsc/tests/lsp-server.test.d.ts.map +1 -0
  693. package/out-tsc/tests/lsp-server.test.js +1525 -0
  694. package/out-tsc/tests/lsp-server.test.js.map +1 -0
  695. package/out-tsc/tests/spark-sql-inputs.test.d.ts +17 -0
  696. package/out-tsc/tests/spark-sql-inputs.test.d.ts.map +1 -0
  697. package/out-tsc/tests/spark-sql-inputs.test.js +570 -0
  698. package/out-tsc/tests/spark-sql-inputs.test.js.map +1 -0
  699. package/out-tsc/tests/validation.test.d.ts +2 -0
  700. package/out-tsc/tests/validation.test.d.ts.map +1 -0
  701. package/out-tsc/tests/validation.test.js +115 -0
  702. package/out-tsc/tests/validation.test.js.map +1 -0
  703. package/out-tsc/typings.d.ts +115 -1
  704. package/out-tsc/typings.d.ts.map +1 -0
  705. package/out-tsc/typings.js +28 -0
  706. package/out-tsc/typings.js.map +1 -1
  707. package/out-tsc/utils.d.ts +1 -0
  708. package/out-tsc/utils.d.ts.map +1 -0
  709. package/out-tsc/utils.js +4 -5
  710. package/out-tsc/utils.js.map +1 -1
  711. package/out-tsc/visitors/completion.visitor.d.ts +85 -0
  712. package/out-tsc/visitors/completion.visitor.d.ts.map +1 -0
  713. package/out-tsc/visitors/completion.visitor.js +379 -0
  714. package/out-tsc/visitors/completion.visitor.js.map +1 -0
  715. package/out-tsc/visitors/lineage.visitor.d.ts +34 -0
  716. package/out-tsc/visitors/lineage.visitor.d.ts.map +1 -0
  717. package/out-tsc/visitors/lineage.visitor.js +181 -0
  718. package/out-tsc/visitors/lineage.visitor.js.map +1 -0
  719. package/out-tsc/visitors/space-replacer-format.visitor.d.ts +1641 -0
  720. package/out-tsc/visitors/space-replacer-format.visitor.d.ts.map +1 -0
  721. package/out-tsc/visitors/space-replacer-format.visitor.js +7529 -0
  722. package/out-tsc/visitors/space-replacer-format.visitor.js.map +1 -0
  723. package/out-tsc/visitors/sparksql-relation.visitor.d.ts +154 -0
  724. package/out-tsc/visitors/sparksql-relation.visitor.d.ts.map +1 -0
  725. package/out-tsc/visitors/sparksql-relation.visitor.js +749 -0
  726. package/out-tsc/visitors/sparksql-relation.visitor.js.map +1 -0
  727. package/package.json +36 -9
  728. package/out-tsc/constant.d.ts +0 -3
  729. package/out-tsc/constant.js +0 -7
  730. package/out-tsc/constant.js.map +0 -1
  731. package/out-tsc/lib/SparkSqlLexer.d.ts +0 -421
  732. package/out-tsc/lib/SparkSqlLexer.js +0 -2750
  733. package/out-tsc/lib/SparkSqlLexer.js.map +0 -1
  734. package/out-tsc/lib/SparkSqlParser.d.ts +0 -6203
  735. package/out-tsc/lib/SparkSqlParser.js +0 -34733
  736. package/out-tsc/lib/SparkSqlParser.js.map +0 -1
  737. package/out-tsc/lib/SparkSqlParserListener.d.ts +0 -1158
  738. package/out-tsc/lib/SparkSqlParserListener.js.map +0 -1
  739. package/out-tsc/lib/SparkSqlParserVisitor.d.ts +0 -773
  740. package/out-tsc/lib/SparkSqlParserVisitor.js.map +0 -1
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RangeHelper = exports.EditCollector = void 0;
4
+ class EditCollector {
5
+ constructor() {
6
+ this.edits = [];
7
+ this.editKeys = new Set();
8
+ }
9
+ /**
10
+ * Add a text edit with optional priority
11
+ * Later edits with same range can override earlier ones based on priority
12
+ */
13
+ addEdit(edit, priority) {
14
+ const key = `${edit.range.start.line}:${edit.range.start.character}-${edit.range.end.line}:${edit.range.end.character}`;
15
+ // Deep clone the edit to avoid reference issues
16
+ const prioritizedEdit = {
17
+ range: {
18
+ start: { line: edit.range.start.line, character: edit.range.start.character },
19
+ end: { line: edit.range.end.line, character: edit.range.end.character }
20
+ },
21
+ newText: edit.newText,
22
+ priority
23
+ };
24
+ if (this.editKeys.has(key)) {
25
+ // Find and potentially replace existing edit
26
+ const existingIndex = this.edits.findIndex(e => e.range.start.line === edit.range.start.line &&
27
+ e.range.start.character === edit.range.start.character &&
28
+ e.range.end.line === edit.range.end.line &&
29
+ e.range.end.character === edit.range.end.character);
30
+ if (existingIndex !== -1) {
31
+ const existing = this.edits[existingIndex];
32
+ // Replace if new edit has higher or equal priority
33
+ if (!priority || !existing.priority || priority.level >= existing.priority.level) {
34
+ this.edits[existingIndex] = prioritizedEdit;
35
+ }
36
+ }
37
+ }
38
+ else {
39
+ this.editKeys.add(key);
40
+ this.edits.push(prioritizedEdit);
41
+ }
42
+ }
43
+ /**
44
+ * Get all collected edits
45
+ */
46
+ getEdits() {
47
+ return this.edits.map(({ range, newText }) => ({ range, newText }));
48
+ }
49
+ /**
50
+ * Get all collected edits with priority info
51
+ */
52
+ getPrioritizedEdits() {
53
+ return [...this.edits];
54
+ }
55
+ /**
56
+ * Check if there's an edit for a specific range
57
+ */
58
+ hasEditForRange(startLine, startChar, endLine, endChar) {
59
+ const key = `${startLine}:${startChar}-${endLine}:${endChar}`;
60
+ return this.editKeys.has(key);
61
+ }
62
+ /**
63
+ * Check if a range overlaps with any existing edit
64
+ */
65
+ hasOverlappingEdit(startLine, startChar, endLine, endChar) {
66
+ for (const edit of this.edits) {
67
+ const editStart = edit.range.start;
68
+ const editEnd = edit.range.end;
69
+ // Check if ranges overlap
70
+ const rangesBefore = endLine < editStart.line || (endLine === editStart.line && endChar <= editStart.character);
71
+ const rangesAfter = startLine > editEnd.line || (startLine === editEnd.line && startChar >= editEnd.character);
72
+ if (!rangesBefore && !rangesAfter) {
73
+ return true;
74
+ }
75
+ }
76
+ return false;
77
+ }
78
+ /**
79
+ * Clear all edits
80
+ */
81
+ clear() {
82
+ this.edits = [];
83
+ this.editKeys.clear();
84
+ }
85
+ /**
86
+ * Get edit count
87
+ */
88
+ get size() {
89
+ return this.edits.length;
90
+ }
91
+ }
92
+ exports.EditCollector = EditCollector;
93
+ /**
94
+ * Range helper functions for creating edit ranges
95
+ */
96
+ class RangeHelper {
97
+ /**
98
+ * Calculate the end position of a token, handling multi-line tokens
99
+ */
100
+ static getTokenEndPosition(token) {
101
+ const text = token.text || '';
102
+ const lines = text.split('\n');
103
+ if (lines.length === 1) {
104
+ return {
105
+ line: token.line - 1,
106
+ character: token.charPositionInLine + text.length
107
+ };
108
+ }
109
+ else {
110
+ return {
111
+ line: token.line - 1 + lines.length - 1,
112
+ character: lines[lines.length - 1].length
113
+ };
114
+ }
115
+ }
116
+ /**
117
+ * Create range from a context
118
+ */
119
+ static fromContext(ctx) {
120
+ const start = ctx.start;
121
+ const stop = ctx.stop;
122
+ return {
123
+ start: {
124
+ line: start.line - 1,
125
+ character: start.charPositionInLine
126
+ },
127
+ end: stop
128
+ ? RangeHelper.getTokenEndPosition(stop)
129
+ : {
130
+ line: start.line - 1,
131
+ character: start.charPositionInLine + (start.text?.length || 0)
132
+ }
133
+ };
134
+ }
135
+ /**
136
+ * Create range from a terminal node
137
+ */
138
+ static fromTerminalNode(node) {
139
+ const token = node.symbol;
140
+ return {
141
+ start: {
142
+ line: token.line - 1,
143
+ character: token.charPositionInLine
144
+ },
145
+ end: RangeHelper.getTokenEndPosition(token)
146
+ };
147
+ }
148
+ /**
149
+ * Create range between two positions
150
+ */
151
+ static between(start, end) {
152
+ return {
153
+ start: { line: start.line, character: start.character },
154
+ end: { line: end.line, character: end.character }
155
+ };
156
+ }
157
+ }
158
+ exports.RangeHelper = RangeHelper;
159
+ //# sourceMappingURL=edit-collector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-collector.js","sourceRoot":"","sources":["../../../src/formatter/core/edit-collector.ts"],"names":[],"mappings":";;;AAsBA,MAAa,aAAa;IAA1B;QACU,UAAK,GAAsB,EAAE,CAAC;QAC9B,aAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAiGvC,CAAC;IA/FC;;;OAGG;IACH,OAAO,CAAC,IAAc,EAAE,QAAuB;QAC7C,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QAExH,gDAAgD;QAChD,MAAM,eAAe,GAAoB;YACvC,KAAK,EAAE;gBACL,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE;gBAC7E,GAAG,EAAE,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mB,CAAC,IAAI,CAAC;gBACvC,CAAC,CAAC;oBACE,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,CAAC;oBACpB,SAAS,EAAE,KAAK,CAAC,kBAAkB,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;iBAChE;SACN,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,IAAkB;QAIxC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,OAAO;YACL,KAAK,EAAE;gBACL,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,CAAC;gBACpB,SAAS,EAAE,KAAK,CAAC,kBAAkB;aACpC;YACD,GAAG,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC;SAC5C,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAO,CACZ,KAA0C,EAC1C,GAAwC;QAExC,OAAO;YACL,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE;YACvD,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE;SAClD,CAAC;IACJ,CAAC;CACF;AA1ED,kCA0EC"}
@@ -0,0 +1,183 @@
1
+ /**
2
+ * Formatting Context - Manages state during formatting traversal
3
+ *
4
+ * This class centralizes all formatting state management, replacing
5
+ * scattered flag variables in the original visitor implementation.
6
+ */
7
+ import { PipeStepKind } from '../types';
8
+ export interface FormattingScope {
9
+ type: 'pipe' | 'pipeSubquery' | 'function' | 'parenthesis' | 'caseWhen' | 'windowClause';
10
+ savedIndentLevel: number;
11
+ savedIndentString: string;
12
+ }
13
+ export declare class FormattingContext {
14
+ private indentLevel;
15
+ private indentString;
16
+ private readonly baseIndentString;
17
+ private readonly tabSize;
18
+ private scopeStack;
19
+ private currentPipeStepKind;
20
+ constructor(tabSize?: number);
21
+ /**
22
+ * Get current indent string based on level
23
+ */
24
+ get indent(): string;
25
+ /**
26
+ * Get newline + current indent
27
+ */
28
+ get newlineIndent(): string;
29
+ /**
30
+ * Get current indent level
31
+ */
32
+ get currentIndentLevel(): number;
33
+ /**
34
+ * Increase indent level
35
+ */
36
+ addIndent(): void;
37
+ /**
38
+ * Decrease indent level
39
+ */
40
+ minusIndent(): void;
41
+ /**
42
+ * Save current indent state
43
+ */
44
+ saveIndentState(): {
45
+ level: number;
46
+ string: string;
47
+ };
48
+ /**
49
+ * Restore indent state
50
+ */
51
+ restoreIndentState(state: {
52
+ level: number;
53
+ string: string;
54
+ }): void;
55
+ /**
56
+ * Set indent directly (level and string)
57
+ * Used for special cases like pipe context subqueries
58
+ */
59
+ setIndent(level: number, indentString: string): void;
60
+ /**
61
+ * Enter a new formatting scope
62
+ */
63
+ enterScope(type: FormattingScope['type']): FormattingScope;
64
+ /**
65
+ * Exit current scope and restore state
66
+ */
67
+ exitScope(): FormattingScope | undefined;
68
+ /**
69
+ * Check if currently in a specific scope type
70
+ */
71
+ isInScope(type: FormattingScope['type']): boolean;
72
+ /**
73
+ * Get current scope depth for a specific type
74
+ */
75
+ getScopeDepth(type: FormattingScope['type']): number;
76
+ /**
77
+ * Check if in pipe operator context
78
+ */
79
+ get inPipeOperatorRightSide(): boolean;
80
+ /**
81
+ * Check if in pipe subquery context
82
+ */
83
+ get inPipeSubquery(): boolean;
84
+ /**
85
+ * Get current pipe step kind
86
+ */
87
+ get pipeStepKind(): PipeStepKind | undefined;
88
+ /**
89
+ * Set current pipe step kind
90
+ */
91
+ setPipeStepKind(kind: PipeStepKind | undefined): void;
92
+ /**
93
+ * Enter pipe operator context
94
+ */
95
+ enterPipeContext(): void;
96
+ /**
97
+ * Exit pipe operator context
98
+ */
99
+ exitPipeContext(): void;
100
+ /**
101
+ * Enter pipe subquery context
102
+ */
103
+ enterPipeSubqueryContext(): void;
104
+ /**
105
+ * Exit pipe subquery context
106
+ */
107
+ exitPipeSubqueryContext(): void;
108
+ /**
109
+ * Check if in WINDOW clause (vs OVER clause in expressions)
110
+ */
111
+ get inWindowClause(): boolean;
112
+ /**
113
+ * Enter window clause context
114
+ */
115
+ enterWindowClauseContext(): void;
116
+ /**
117
+ * Exit window clause context
118
+ */
119
+ exitWindowClauseContext(): void;
120
+ /**
121
+ * Check if inside CASE WHEN expression
122
+ */
123
+ get inCaseWhen(): boolean;
124
+ /**
125
+ * Enter CASE WHEN context
126
+ */
127
+ enterCaseWhenContext(): void;
128
+ /**
129
+ * Exit CASE WHEN context
130
+ */
131
+ exitCaseWhenContext(): void;
132
+ /**
133
+ * Check if inside function call
134
+ */
135
+ get inFunctionCall(): boolean;
136
+ /**
137
+ * Enter function call context
138
+ */
139
+ enterFunctionCallContext(): void;
140
+ /**
141
+ * Exit function call context
142
+ */
143
+ exitFunctionCallContext(): void;
144
+ /**
145
+ * Check if inside parenthesis that needs special handling
146
+ */
147
+ get inParenthesis(): boolean;
148
+ /**
149
+ * Enter parenthesis context
150
+ */
151
+ enterParenthesisContext(): void;
152
+ /**
153
+ * Exit parenthesis context
154
+ */
155
+ exitParenthesisContext(): void;
156
+ /**
157
+ * Create a fixed indent string (for pipe subquery etc.)
158
+ */
159
+ createFixedIndent(spaceCount: number): string;
160
+ /**
161
+ * Get pipe content indent
162
+ * Uses FixedIndents configuration for consistent indent values
163
+ * Returns newline + spaces for use in comma-separated lists
164
+ */
165
+ getPipeContentIndent(): string;
166
+ /**
167
+ * Get pipe subquery content indent (fixed 7 spaces)
168
+ */
169
+ getPipeSubqueryIndent(): string;
170
+ /**
171
+ * Get pipe subquery nested indent (fixed 9 spaces)
172
+ */
173
+ getPipeSubqueryNestedIndent(): string;
174
+ /**
175
+ * Get pipe subquery closing paren indent (fixed 5 spaces)
176
+ */
177
+ getPipeSubqueryCloseIndent(): string;
178
+ /**
179
+ * Clone the context for nested operations
180
+ */
181
+ clone(): FormattingContext;
182
+ }
183
+ //# sourceMappingURL=formatting-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-context.d.ts","sourceRoot":"","sources":["../../../src/formatter/core/formatting-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,GAAG,cAAc,CAAC;IACzF,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IAGjC,OAAO,CAAC,UAAU,CAAyB;IAG3C,OAAO,CAAC,mBAAmB,CAA2B;gBAE1C,OAAO,GAAE,MAAU;IAQ/B;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;OAEG;IACH,IAAI,kBAAkB,IAAI,MAAM,CAE/B;IAED;;OAEG;IACH,SAAS,IAAI,IAAI;IAIjB;;OAEG;IACH,WAAW,IAAI,IAAI;IAMnB;;OAEG;IACH,eAAe,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAOpD;;OAEG;IACH,kBAAkB,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAKlE;;;OAGG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;IAOpD;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,eAAe,CAAC,MAAM,CA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AS9B;;OAEG;IACH,qBAAqB,IAAI,MAAM;IAI/B;;OAEG;IACH,2BAA2B,IAAI,MAAM;IAIrC;;OAEG;IACH,0BAA0B,IAAI,MAAM;IAIpC;;OAEG;IACH,KAAK,IAAI,iBAAiB;CAQ3B"}
@@ -0,0 +1,294 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormattingContext = void 0;
4
+ class FormattingContext {
5
+ constructor(tabSize = 2) {
6
+ this.indentLevel = 0;
7
+ // Scope stack for nested contexts
8
+ this.scopeStack = [];
9
+ this.tabSize = tabSize;
10
+ this.indentString = ' '.repeat(tabSize);
11
+ this.baseIndentString = this.indentString;
12
+ }
13
+ // ==================== Indent Management ====================
14
+ /**
15
+ * Get current indent string based on level
16
+ */
17
+ get indent() {
18
+ return this.indentString.repeat(this.indentLevel);
19
+ }
20
+ /**
21
+ * Get newline + current indent
22
+ */
23
+ get newlineIndent() {
24
+ return `\n${this.indent}`;
25
+ }
26
+ /**
27
+ * Get current indent level
28
+ */
29
+ get currentIndentLevel() {
30
+ return this.indentLevel;
31
+ }
32
+ /**
33
+ * Increase indent level
34
+ */
35
+ addIndent() {
36
+ this.indentLevel++;
37
+ }
38
+ /**
39
+ * Decrease indent level
40
+ */
41
+ minusIndent() {
42
+ if (this.indentLevel > 0) {
43
+ this.indentLevel--;
44
+ }
45
+ }
46
+ /**
47
+ * Save current indent state
48
+ */
49
+ saveIndentState() {
50
+ return {
51
+ level: this.indentLevel,
52
+ string: this.indentString
53
+ };
54
+ }
55
+ /**
56
+ * Restore indent state
57
+ */
58
+ restoreIndentState(state) {
59
+ this.indentLevel = state.level;
60
+ this.indentString = state.string;
61
+ }
62
+ /**
63
+ * Set indent directly (level and string)
64
+ * Used for special cases like pipe context subqueries
65
+ */
66
+ setIndent(level, indentString) {
67
+ this.indentLevel = level;
68
+ this.indentString = indentString;
69
+ }
70
+ // ==================== Scope Management ====================
71
+ /**
72
+ * Enter a new formatting scope
73
+ */
74
+ enterScope(type) {
75
+ const scope = {
76
+ type,
77
+ savedIndentLevel: this.indentLevel,
78
+ savedIndentString: this.indentString
79
+ };
80
+ this.scopeStack.push(scope);
81
+ return scope;
82
+ }
83
+ /**
84
+ * Exit current scope and restore state
85
+ */
86
+ exitScope() {
87
+ const scope = this.scopeStack.pop();
88
+ if (scope) {
89
+ this.indentLevel = scope.savedIndentLevel;
90
+ this.indentString = scope.savedIndentString;
91
+ }
92
+ return scope;
93
+ }
94
+ /**
95
+ * Check if currently in a specific scope type
96
+ */
97
+ isInScope(type) {
98
+ return this.scopeStack.some(scope => scope.type === type);
99
+ }
100
+ /**
101
+ * Get current scope depth for a specific type
102
+ */
103
+ getScopeDepth(type) {
104
+ return this.scopeStack.filter(scope => scope.type === type).length;
105
+ }
106
+ // ==================== Pipe Context ====================
107
+ /**
108
+ * Check if in pipe operator context
109
+ */
110
+ get inPipeOperatorRightSide() {
111
+ return this.isInScope('pipe');
112
+ }
113
+ /**
114
+ * Check if in pipe subquery context
115
+ */
116
+ get inPipeSubquery() {
117
+ return this.isInScope('pipeSubquery');
118
+ }
119
+ /**
120
+ * Get current pipe step kind
121
+ */
122
+ get pipeStepKind() {
123
+ return this.currentPipeStepKind;
124
+ }
125
+ /**
126
+ * Set current pipe step kind
127
+ */
128
+ setPipeStepKind(kind) {
129
+ this.currentPipeStepKind = kind;
130
+ }
131
+ /**
132
+ * Enter pipe operator context
133
+ */
134
+ enterPipeContext() {
135
+ this.enterScope('pipe');
136
+ }
137
+ /**
138
+ * Exit pipe operator context
139
+ */
140
+ exitPipeContext() {
141
+ if (this.scopeStack.length > 0 && this.scopeStack[this.scopeStack.length - 1].type === 'pipe') {
142
+ this.exitScope();
143
+ }
144
+ }
145
+ /**
146
+ * Enter pipe subquery context
147
+ */
148
+ enterPipeSubqueryContext() {
149
+ this.enterScope('pipeSubquery');
150
+ }
151
+ /**
152
+ * Exit pipe subquery context
153
+ */
154
+ exitPipeSubqueryContext() {
155
+ if (this.scopeStack.length > 0 && this.scopeStack[this.scopeStack.length - 1].type === 'pipeSubquery') {
156
+ this.exitScope();
157
+ }
158
+ }
159
+ // ==================== Window Clause Context ====================
160
+ /**
161
+ * Check if in WINDOW clause (vs OVER clause in expressions)
162
+ */
163
+ get inWindowClause() {
164
+ return this.isInScope('windowClause');
165
+ }
166
+ /**
167
+ * Enter window clause context
168
+ */
169
+ enterWindowClauseContext() {
170
+ this.enterScope('windowClause');
171
+ }
172
+ /**
173
+ * Exit window clause context
174
+ */
175
+ exitWindowClauseContext() {
176
+ if (this.scopeStack.length > 0 && this.scopeStack[this.scopeStack.length - 1].type === 'windowClause') {
177
+ this.exitScope();
178
+ }
179
+ }
180
+ // ==================== CASE WHEN Context ====================
181
+ /**
182
+ * Check if inside CASE WHEN expression
183
+ */
184
+ get inCaseWhen() {
185
+ return this.isInScope('caseWhen');
186
+ }
187
+ /**
188
+ * Enter CASE WHEN context
189
+ */
190
+ enterCaseWhenContext() {
191
+ this.enterScope('caseWhen');
192
+ }
193
+ /**
194
+ * Exit CASE WHEN context
195
+ */
196
+ exitCaseWhenContext() {
197
+ if (this.scopeStack.length > 0 && this.scopeStack[this.scopeStack.length - 1].type === 'caseWhen') {
198
+ this.exitScope();
199
+ }
200
+ }
201
+ // ==================== Function Call Context ====================
202
+ /**
203
+ * Check if inside function call
204
+ */
205
+ get inFunctionCall() {
206
+ return this.isInScope('function');
207
+ }
208
+ /**
209
+ * Enter function call context
210
+ */
211
+ enterFunctionCallContext() {
212
+ this.enterScope('function');
213
+ }
214
+ /**
215
+ * Exit function call context
216
+ */
217
+ exitFunctionCallContext() {
218
+ if (this.scopeStack.length > 0 && this.scopeStack[this.scopeStack.length - 1].type === 'function') {
219
+ this.exitScope();
220
+ }
221
+ }
222
+ // ==================== Parenthesis Context ====================
223
+ /**
224
+ * Check if inside parenthesis that needs special handling
225
+ */
226
+ get inParenthesis() {
227
+ return this.isInScope('parenthesis');
228
+ }
229
+ /**
230
+ * Enter parenthesis context
231
+ */
232
+ enterParenthesisContext() {
233
+ this.enterScope('parenthesis');
234
+ }
235
+ /**
236
+ * Exit parenthesis context
237
+ */
238
+ exitParenthesisContext() {
239
+ if (this.scopeStack.length > 0 && this.scopeStack[this.scopeStack.length - 1].type === 'parenthesis') {
240
+ this.exitScope();
241
+ }
242
+ }
243
+ // ==================== Utility Methods ====================
244
+ /**
245
+ * Create a fixed indent string (for pipe subquery etc.)
246
+ */
247
+ createFixedIndent(spaceCount) {
248
+ return ' '.repeat(spaceCount);
249
+ }
250
+ /**
251
+ * Get pipe content indent
252
+ * Uses FixedIndents configuration for consistent indent values
253
+ * Returns newline + spaces for use in comma-separated lists
254
+ */
255
+ getPipeContentIndent() {
256
+ if (this.inPipeSubquery) {
257
+ // For pipe subquery: base indent + 12 spaces (7 for subquery + 5 for pipe content)
258
+ return `\n${this.indent}${' '.repeat(7 + 5)}`;
259
+ }
260
+ // For normal pipe: base indent + 5 spaces
261
+ return `\n${this.indent}${' '.repeat(5)}`;
262
+ }
263
+ /**
264
+ * Get pipe subquery content indent (fixed 7 spaces)
265
+ */
266
+ getPipeSubqueryIndent() {
267
+ return ' '.repeat(7);
268
+ }
269
+ /**
270
+ * Get pipe subquery nested indent (fixed 9 spaces)
271
+ */
272
+ getPipeSubqueryNestedIndent() {
273
+ return ' '.repeat(9);
274
+ }
275
+ /**
276
+ * Get pipe subquery closing paren indent (fixed 5 spaces)
277
+ */
278
+ getPipeSubqueryCloseIndent() {
279
+ return ' '.repeat(5);
280
+ }
281
+ /**
282
+ * Clone the context for nested operations
283
+ */
284
+ clone() {
285
+ const cloned = new FormattingContext(this.tabSize);
286
+ cloned.indentLevel = this.indentLevel;
287
+ cloned.indentString = this.indentString;
288
+ cloned.scopeStack = [...this.scopeStack];
289
+ cloned.currentPipeStepKind = this.currentPipeStepKind;
290
+ return cloned;
291
+ }
292
+ }
293
+ exports.FormattingContext = FormattingContext;
294
+ //# sourceMappingURL=formatting-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-context.js","sourceRoot":"","sources":["../../../src/formatter/core/formatting-context.ts"],"names":[],"mappings":";;;AAcA,MAAa,iBAAiB;IAY5B,YAAY,UAAkB,CAAC;QAXvB,gBAAW,GAAG,CAAC,CAAC;QAKxB,kCAAkC;QAC1B,eAAU,GAAsB,EAAE,CAAC;QAMzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC;IAC5C,CAAC;IAED,8DAA8D;IAE9D;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACf,OAAO,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAI,kBAAkB;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,SAAS;QACP,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,WAAW;QACT,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,WAAW;YACvB,MAAM,EAAE,IAAI,CAAC,YAAY;SAC1B,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,kBAAkB,CAAC,KAAwC;QACzD,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC;IACnC,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,KAAa,EAAE,YAAoB;QAC3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AsVC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Formatter Core Module
3
+ *
4
+ * Provides core infrastructure for the formatting system:
5
+ * - FormattingContext: State management during formatting
6
+ * - EditCollector: TextEdit collection and conflict resolution
7
+ * - Strategy interfaces: Base interfaces for formatting strategies
8
+ * - Rules: Centralized spacing and newline configuration
9
+ * - Pipeline: Three-phase processing pipeline
10
+ */
11
+ export { FormattingContext } from './formatting-context';
12
+ export type { FormattingScope } from './formatting-context';
13
+ export { EditCollector, RangeHelper } from './edit-collector';
14
+ export type { EditPriority, PrioritizedEdit } from './edit-collector';
15
+ export { BaseFormattingStrategy, DefaultStrategyRegistry } from './strategy-interface';
16
+ export type { FormattingBridge, FormattingStrategy, TypedFormattingStrategy, StrategyRegistry } from './strategy-interface';
17
+ export { StrategyFormattingBridge } from './strategy-bridge';
18
+ export type { FormattingBridgeConfig } from './strategy-bridge';
19
+ export { WhitespaceWriter } from './whitespace-writer';
20
+ export type { WhitespaceWriterConfig } from './whitespace-writer';
21
+ export { getPreviousNonHiddenToken, getNextNonHiddenToken, findTokenIndexByStartIndex, getPreviousNonHiddenTokenByStartIndex, getNextNonHiddenTokenByStopIndex, getTokenEndPosition } from './token-helper';
22
+ export { isCommentToken, findCommentTokensBetween, findTokensBetween, hasNewlineBeforeComment, buildTextWithPreservedComments } from './comment-helper';
23
+ export * from './rules';
24
+ export * from './pipeline';
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/formatter/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACvF,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,qCAAqC,EACrC,gCAAgC,EAChC,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,uBAAuB,EACvB,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAG1B,cAAc,SAAS,CAAC;AAGxB,cAAc,YAAY,CAAC"}