@lpc-lang/core 1.1.2-5.1

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 (317) hide show
  1. package/README.md +255 -0
  2. package/bin/lpc +4 -0
  3. package/bin/lpcserver +4 -0
  4. package/cancellationToken/cancellationToken.d.ts +8 -0
  5. package/cancellationToken/cancellationToken.d.ts.map +1 -0
  6. package/cancellationToken/serverCancellationToken.d.ts +21 -0
  7. package/cancellationToken/serverCancellationToken.d.ts.map +1 -0
  8. package/cli/_namespaces/lpc.d.ts +2 -0
  9. package/cli/_namespaces/lpc.d.ts.map +1 -0
  10. package/cli/lpc.d.ts +2 -0
  11. package/cli/lpc.d.ts.map +1 -0
  12. package/compiler/LpcConfig.d.ts +17 -0
  13. package/compiler/LpcConfig.d.ts.map +1 -0
  14. package/compiler/_namespaces/lpc.d.ts +49 -0
  15. package/compiler/_namespaces/lpc.d.ts.map +1 -0
  16. package/compiler/_namespaces/lpc.moduleSpecifiers.d.ts +2 -0
  17. package/compiler/_namespaces/lpc.moduleSpecifiers.d.ts.map +1 -0
  18. package/compiler/_namespaces/lpc.performance.d.ts +2 -0
  19. package/compiler/_namespaces/lpc.performance.d.ts.map +1 -0
  20. package/compiler/binder.d.ts +2 -0
  21. package/compiler/binder.d.ts.map +1 -0
  22. package/compiler/builderPublic.d.ts +76 -0
  23. package/compiler/builderPublic.d.ts.map +1 -0
  24. package/compiler/checker.d.ts +2 -0
  25. package/compiler/checker.d.ts.map +1 -0
  26. package/compiler/commandLineParser.d.ts +47 -0
  27. package/compiler/commandLineParser.d.ts.map +1 -0
  28. package/compiler/core.d.ts +3 -0
  29. package/compiler/core.d.ts.map +1 -0
  30. package/compiler/corePublic.d.ts +19 -0
  31. package/compiler/corePublic.d.ts.map +1 -0
  32. package/compiler/debug.d.ts +71 -0
  33. package/compiler/debug.d.ts.map +1 -0
  34. package/compiler/diagnosticInformation.d.ts +518 -0
  35. package/compiler/diagnosticInformation.d.ts.map +1 -0
  36. package/compiler/emitter.d.ts +11 -0
  37. package/compiler/emitter.d.ts.map +1 -0
  38. package/compiler/executeCommandLine.d.ts +15 -0
  39. package/compiler/executeCommandLine.d.ts.map +1 -0
  40. package/compiler/expressionToTypeNode.d.ts +2 -0
  41. package/compiler/expressionToTypeNode.d.ts.map +1 -0
  42. package/compiler/factory/baseNodeFactory.d.ts +2 -0
  43. package/compiler/factory/baseNodeFactory.d.ts.map +1 -0
  44. package/compiler/factory/emitHelper.d.ts +2 -0
  45. package/compiler/factory/emitHelper.d.ts.map +1 -0
  46. package/compiler/factory/emitNode.d.ts +22 -0
  47. package/compiler/factory/emitNode.d.ts.map +1 -0
  48. package/compiler/factory/nodeChildren.d.ts +2 -0
  49. package/compiler/factory/nodeChildren.d.ts.map +1 -0
  50. package/compiler/factory/nodeConverters.d.ts +2 -0
  51. package/compiler/factory/nodeConverters.d.ts.map +1 -0
  52. package/compiler/factory/nodeFactory.d.ts +4 -0
  53. package/compiler/factory/nodeFactory.d.ts.map +1 -0
  54. package/compiler/factory/parenthesizerRules.d.ts +2 -0
  55. package/compiler/factory/parenthesizerRules.d.ts.map +1 -0
  56. package/compiler/factory/utilities.d.ts +2 -0
  57. package/compiler/factory/utilities.d.ts.map +1 -0
  58. package/compiler/factory/utilitiesPublic.d.ts +4 -0
  59. package/compiler/factory/utilitiesPublic.d.ts.map +1 -0
  60. package/compiler/lpcFileHandler.d.ts +10 -0
  61. package/compiler/lpcFileHandler.d.ts.map +1 -0
  62. package/compiler/lpcJsHelpers.d.ts +17 -0
  63. package/compiler/lpcJsHelpers.d.ts.map +1 -0
  64. package/compiler/lpcbuild.d.ts +2 -0
  65. package/compiler/lpcbuild.d.ts.map +1 -0
  66. package/compiler/lpcbuildPublic.d.ts +26 -0
  67. package/compiler/lpcbuildPublic.d.ts.map +1 -0
  68. package/compiler/moduleNameResolver.d.ts +55 -0
  69. package/compiler/moduleNameResolver.d.ts.map +1 -0
  70. package/compiler/moduleSpecifiers.d.ts +2 -0
  71. package/compiler/moduleSpecifiers.d.ts.map +1 -0
  72. package/compiler/nodeTests.d.ts +115 -0
  73. package/compiler/nodeTests.d.ts.map +1 -0
  74. package/compiler/parser.d.ts +65 -0
  75. package/compiler/parser.d.ts.map +1 -0
  76. package/compiler/path.d.ts +2 -0
  77. package/compiler/path.d.ts.map +1 -0
  78. package/compiler/perfLoger.d.ts +2 -0
  79. package/compiler/perfLoger.d.ts.map +1 -0
  80. package/compiler/performance.d.ts +2 -0
  81. package/compiler/performance.d.ts.map +1 -0
  82. package/compiler/performanceCore.d.ts +2 -0
  83. package/compiler/performanceCore.d.ts.map +1 -0
  84. package/compiler/program.d.ts +72 -0
  85. package/compiler/program.d.ts.map +1 -0
  86. package/compiler/resolutionCache.d.ts +6 -0
  87. package/compiler/resolutionCache.d.ts.map +1 -0
  88. package/compiler/resolver.d.ts +1 -0
  89. package/compiler/resolver.d.ts.map +1 -0
  90. package/compiler/scanner.d.ts +85 -0
  91. package/compiler/scanner.d.ts.map +1 -0
  92. package/compiler/sourcemap.d.ts +2 -0
  93. package/compiler/sourcemap.d.ts.map +1 -0
  94. package/compiler/sys.d.ts +56 -0
  95. package/compiler/sys.d.ts.map +1 -0
  96. package/compiler/tracing.d.ts +31 -0
  97. package/compiler/tracing.d.ts.map +1 -0
  98. package/compiler/transformers/declarations.d.ts +2 -0
  99. package/compiler/transformers/declarations.d.ts.map +1 -0
  100. package/compiler/transformers.d.ts +2 -0
  101. package/compiler/transformers.d.ts.map +1 -0
  102. package/compiler/types.d.ts +3284 -0
  103. package/compiler/types.d.ts.map +1 -0
  104. package/compiler/utilities.d.ts +57 -0
  105. package/compiler/utilities.d.ts.map +1 -0
  106. package/compiler/utilitiesPublic.d.ts +213 -0
  107. package/compiler/utilitiesPublic.d.ts.map +1 -0
  108. package/compiler/visitorPublic.d.ts +72 -0
  109. package/compiler/visitorPublic.d.ts.map +1 -0
  110. package/compiler/watch.d.ts +2 -0
  111. package/compiler/watch.d.ts.map +1 -0
  112. package/compiler/watchPublic.d.ts +44 -0
  113. package/compiler/watchPublic.d.ts.map +1 -0
  114. package/compiler/watchUtilities.d.ts +14 -0
  115. package/compiler/watchUtilities.d.ts.map +1 -0
  116. package/config-types.d.ts +33 -0
  117. package/config-types.d.ts.map +1 -0
  118. package/harness/harnessIO.d.ts +4 -0
  119. package/harness/harnessIO.d.ts.map +1 -0
  120. package/lpc/_namespaces/lpc.d.ts +6 -0
  121. package/lpc/_namespaces/lpc.d.ts.map +1 -0
  122. package/lpc/_namespaces/lpc.server.d.ts +2 -0
  123. package/lpc/_namespaces/lpc.server.d.ts.map +1 -0
  124. package/lpc/lpc.d.ts +2 -0
  125. package/lpc/lpc.d.ts.map +1 -0
  126. package/lpcserver/document.d.ts +1 -0
  127. package/lpcserver/document.d.ts.map +1 -0
  128. package/lpcserver/nodeServer.d.ts +25 -0
  129. package/lpcserver/nodeServer.d.ts.map +1 -0
  130. package/lpcserver/protocol.const.d.ts +46 -0
  131. package/lpcserver/protocol.const.d.ts.map +1 -0
  132. package/lpcserver/server.d.ts +3 -0
  133. package/lpcserver/server.d.ts.map +1 -0
  134. package/lpcserver/textRendering.d.ts +14 -0
  135. package/lpcserver/textRendering.d.ts.map +1 -0
  136. package/lpcserver/typeConverters.d.ts +44 -0
  137. package/lpcserver/typeConverters.d.ts.map +1 -0
  138. package/lpcserver/utils.d.ts +14 -0
  139. package/lpcserver/utils.d.ts.map +1 -0
  140. package/package.json +48 -0
  141. package/parse-fluff-docs.d.ts +2 -0
  142. package/parse-fluff-docs.d.ts.map +1 -0
  143. package/parse-ld-docs.d.ts +2 -0
  144. package/parse-ld-docs.d.ts.map +1 -0
  145. package/server/_namespaces/lpc.d.ts +5 -0
  146. package/server/_namespaces/lpc.d.ts.map +1 -0
  147. package/server/_namespaces/lpc.server.d.ts +11 -0
  148. package/server/_namespaces/lpc.server.d.ts.map +1 -0
  149. package/server/_namespaces/lpc.server.protocol.d.ts +2 -0
  150. package/server/_namespaces/lpc.server.protocol.d.ts.map +1 -0
  151. package/server/editorServices.d.ts +261 -0
  152. package/server/editorServices.d.ts.map +1 -0
  153. package/server/project.d.ts +143 -0
  154. package/server/project.d.ts.map +1 -0
  155. package/server/protocol.d.ts +962 -0
  156. package/server/protocol.d.ts.map +1 -0
  157. package/server/scriptInfo.d.ts +53 -0
  158. package/server/scriptInfo.d.ts.map +1 -0
  159. package/server/scriptVersionCache.d.ts +2 -0
  160. package/server/scriptVersionCache.d.ts.map +1 -0
  161. package/server/session.d.ts +150 -0
  162. package/server/session.d.ts.map +1 -0
  163. package/server/types.d.ts +24 -0
  164. package/server/types.d.ts.map +1 -0
  165. package/server/utilities.d.ts +2 -0
  166. package/server/utilities.d.ts.map +1 -0
  167. package/server/utilitiesPublic.d.ts +37 -0
  168. package/server/utilitiesPublic.d.ts.map +1 -0
  169. package/server.d.ts +2 -0
  170. package/server.d.ts.map +1 -0
  171. package/services/_namespaces/lpc.Completions.StringCompletions.d.ts +2 -0
  172. package/services/_namespaces/lpc.Completions.StringCompletions.d.ts.map +1 -0
  173. package/services/_namespaces/lpc.Completions.d.ts +4 -0
  174. package/services/_namespaces/lpc.Completions.d.ts.map +1 -0
  175. package/services/_namespaces/lpc.FindAllReferences.d.ts +3 -0
  176. package/services/_namespaces/lpc.FindAllReferences.d.ts.map +1 -0
  177. package/services/_namespaces/lpc.GoToDefinition.d.ts +2 -0
  178. package/services/_namespaces/lpc.GoToDefinition.d.ts.map +1 -0
  179. package/services/_namespaces/lpc.JsDoc.d.ts +2 -0
  180. package/services/_namespaces/lpc.JsDoc.d.ts.map +1 -0
  181. package/services/_namespaces/lpc.NavigationBar.d.ts +2 -0
  182. package/services/_namespaces/lpc.NavigationBar.d.ts.map +1 -0
  183. package/services/_namespaces/lpc.Rename.d.ts +2 -0
  184. package/services/_namespaces/lpc.Rename.d.ts.map +1 -0
  185. package/services/_namespaces/lpc.SignatureHelp.d.ts +2 -0
  186. package/services/_namespaces/lpc.SignatureHelp.d.ts.map +1 -0
  187. package/services/_namespaces/lpc.SymbolDisplay.d.ts +2 -0
  188. package/services/_namespaces/lpc.SymbolDisplay.d.ts.map +1 -0
  189. package/services/_namespaces/lpc.codefix.d.ts +3 -0
  190. package/services/_namespaces/lpc.codefix.d.ts.map +1 -0
  191. package/services/_namespaces/lpc.d.ts +30 -0
  192. package/services/_namespaces/lpc.d.ts.map +1 -0
  193. package/services/_namespaces/lpc.formatting.d.ts +7 -0
  194. package/services/_namespaces/lpc.formatting.d.ts.map +1 -0
  195. package/services/_namespaces/lpc.textChanges.d.ts +2 -0
  196. package/services/_namespaces/lpc.textChanges.d.ts.map +1 -0
  197. package/services/classifier2020.d.ts +2 -0
  198. package/services/classifier2020.d.ts.map +1 -0
  199. package/services/codefixes/helpers.d.ts +2 -0
  200. package/services/codefixes/helpers.d.ts.map +1 -0
  201. package/services/codefixes/importFixes.d.ts +2 -0
  202. package/services/codefixes/importFixes.d.ts.map +1 -0
  203. package/services/completions.d.ts +2 -0
  204. package/services/completions.d.ts.map +1 -0
  205. package/services/documentRegistry.d.ts +90 -0
  206. package/services/documentRegistry.d.ts.map +1 -0
  207. package/services/exportInfoMap.d.ts +5 -0
  208. package/services/exportInfoMap.d.ts.map +1 -0
  209. package/services/findAllReferences.d.ts +2 -0
  210. package/services/findAllReferences.d.ts.map +1 -0
  211. package/services/formatting/formatting.d.ts +2 -0
  212. package/services/formatting/formatting.d.ts.map +1 -0
  213. package/services/formatting/formattingContext.d.ts +2 -0
  214. package/services/formatting/formattingContext.d.ts.map +1 -0
  215. package/services/formatting/rule.d.ts +2 -0
  216. package/services/formatting/rule.d.ts.map +1 -0
  217. package/services/formatting/rules.d.ts +2 -0
  218. package/services/formatting/rules.d.ts.map +1 -0
  219. package/services/formatting/rulesMap.d.ts +2 -0
  220. package/services/formatting/rulesMap.d.ts.map +1 -0
  221. package/services/formatting/smartIndenter.d.ts +2 -0
  222. package/services/formatting/smartIndenter.d.ts.map +1 -0
  223. package/services/goToDefinition.d.ts +2 -0
  224. package/services/goToDefinition.d.ts.map +1 -0
  225. package/services/importTracker.d.ts +2 -0
  226. package/services/importTracker.d.ts.map +1 -0
  227. package/services/jsDoc.d.ts +2 -0
  228. package/services/jsDoc.d.ts.map +1 -0
  229. package/services/navigationBar.d.ts +2 -0
  230. package/services/navigationBar.d.ts.map +1 -0
  231. package/services/rename.d.ts +2 -0
  232. package/services/rename.d.ts.map +1 -0
  233. package/services/services.d.ts +54 -0
  234. package/services/services.d.ts.map +1 -0
  235. package/services/signatureHelp.d.ts +2 -0
  236. package/services/signatureHelp.d.ts.map +1 -0
  237. package/services/sourcemaps.d.ts +2 -0
  238. package/services/sourcemaps.d.ts.map +1 -0
  239. package/services/stringCompletions.d.ts +2 -0
  240. package/services/stringCompletions.d.ts.map +1 -0
  241. package/services/suggestionDiagnostics.d.ts +2 -0
  242. package/services/suggestionDiagnostics.d.ts.map +1 -0
  243. package/services/symbolDisplay.d.ts +2 -0
  244. package/services/symbolDisplay.d.ts.map +1 -0
  245. package/services/textChanges.d.ts +2 -0
  246. package/services/textChanges.d.ts.map +1 -0
  247. package/services/types.d.ts +901 -0
  248. package/services/types.d.ts.map +1 -0
  249. package/services/utilities.d.ts +3 -0
  250. package/services/utilities.d.ts.map +1 -0
  251. package/src/cli.js +58 -0
  252. package/src/cli.js.map +7 -0
  253. package/src/efuns/fluffos/arrays.h +205 -0
  254. package/src/efuns/fluffos/async.h +84 -0
  255. package/src/efuns/fluffos/buffers.h +80 -0
  256. package/src/efuns/fluffos/calls.h +275 -0
  257. package/src/efuns/fluffos/contrib.h +805 -0
  258. package/src/efuns/fluffos/db.h +125 -0
  259. package/src/efuns/fluffos/driver.h +107 -0
  260. package/src/efuns/fluffos/ed.h +48 -0
  261. package/src/efuns/fluffos/efuns.fluffos.h +75 -0
  262. package/src/efuns/fluffos/external.h +30 -0
  263. package/src/efuns/fluffos/filesystem.h +154 -0
  264. package/src/efuns/fluffos/floats.h +136 -0
  265. package/src/efuns/fluffos/functions.h +104 -0
  266. package/src/efuns/fluffos/general.h +548 -0
  267. package/src/efuns/fluffos/interactive.h +777 -0
  268. package/src/efuns/fluffos/internals.h +455 -0
  269. package/src/efuns/fluffos/lpc-config.json +10 -0
  270. package/src/efuns/fluffos/mappings.h +205 -0
  271. package/src/efuns/fluffos/misc.h +43 -0
  272. package/src/efuns/fluffos/mudlib.h +228 -0
  273. package/src/efuns/fluffos/numbers.h +41 -0
  274. package/src/efuns/fluffos/objects.h +365 -0
  275. package/src/efuns/fluffos/parsing.h +220 -0
  276. package/src/efuns/fluffos/pcre.h +75 -0
  277. package/src/efuns/fluffos/sockets.h +276 -0
  278. package/src/efuns/fluffos/strings.h +542 -0
  279. package/src/efuns/fluffos/system.h +408 -0
  280. package/src/efuns/fluffos/zh-cn/arrays.zh-cn.h +167 -0
  281. package/src/efuns/fluffos/zh-cn/async.zh-cn.h +81 -0
  282. package/src/efuns/fluffos/zh-cn/buffers.zh-cn.h +69 -0
  283. package/src/efuns/fluffos/zh-cn/calls.zh-cn.h +242 -0
  284. package/src/efuns/fluffos/zh-cn/contrib.zh-cn.h +767 -0
  285. package/src/efuns/fluffos/zh-cn/db.zh-cn.h +113 -0
  286. package/src/efuns/fluffos/zh-cn/ed.zh-cn.h +42 -0
  287. package/src/efuns/fluffos/zh-cn/efuns.fluffos.h +76 -0
  288. package/src/efuns/fluffos/zh-cn/external.zh-cn.h +25 -0
  289. package/src/efuns/fluffos/zh-cn/filesystem.zh-cn.h +140 -0
  290. package/src/efuns/fluffos/zh-cn/floats.zh-cn.h +129 -0
  291. package/src/efuns/fluffos/zh-cn/functions.zh-cn.h +87 -0
  292. package/src/efuns/fluffos/zh-cn/general.zh-cn.h +506 -0
  293. package/src/efuns/fluffos/zh-cn/interactive.zh-cn.h +659 -0
  294. package/src/efuns/fluffos/zh-cn/internals.zh-cn.h +356 -0
  295. package/src/efuns/fluffos/zh-cn/mappings.zh-cn.h +188 -0
  296. package/src/efuns/fluffos/zh-cn/misc.zh-cn.h +43 -0
  297. package/src/efuns/fluffos/zh-cn/mudlib.zh-cn.h +190 -0
  298. package/src/efuns/fluffos/zh-cn/numbers.zh-cn.h +36 -0
  299. package/src/efuns/fluffos/zh-cn/objects.zh-cn.h +280 -0
  300. package/src/efuns/fluffos/zh-cn/parsing.zh-cn.h +212 -0
  301. package/src/efuns/fluffos/zh-cn/pcre.zh-cn.h +67 -0
  302. package/src/efuns/fluffos/zh-cn/sockets.zh-cn.h +230 -0
  303. package/src/efuns/fluffos/zh-cn/strings.zh-cn.h +484 -0
  304. package/src/efuns/fluffos/zh-cn/system.zh-cn.h +366 -0
  305. package/src/efuns/ldmud/defines.h +69 -0
  306. package/src/efuns/ldmud/efun.h +10449 -0
  307. package/src/efuns/ldmud/efuns.ldmud.h +87 -0
  308. package/src/efuns/ldmud/lpc-config.json +9 -0
  309. package/src/efuns/ldmud/obsolete.h +2168 -0
  310. package/src/lpc.js +82486 -0
  311. package/src/lpc.js.map +6 -0
  312. package/src/server.js +129 -0
  313. package/src/server.js.map +7 -0
  314. package/types.d.ts +23 -0
  315. package/types.d.ts.map +1 -0
  316. package/utils.d.ts +21 -0
  317. package/utils.d.ts.map +1 -0
package/README.md ADDED
@@ -0,0 +1,255 @@
1
+ # LPC Language Compiler Library
2
+
3
+ Parser and checker API for LPC (Lars Pensjö C) - an object-oriented programming language derived from C and developed originally by Lars Pensjö to facilitate MUD building on LPMuds.
4
+
5
+ Currently supports [LDMud](https://www.ldmud.eu/) and [FluffOS](https://www.fluffos.info/).
6
+
7
+ If you are lookin for the VS Code language server, please visit: https://marketplace.visualstudio.com/items?itemName=jlchmura.lpc
8
+
9
+ See [CHANGELOG.md](https://github.com/jlchmura/lpc-language-server/blob/main/CHANGELOG.md).
10
+
11
+ ## Example
12
+
13
+ For an example mudlib, pre-configured to work with LPC Language Services, see the [Nightmare Residuum mudlib](https://github.com/michaelprograms/nightmare-residuum).
14
+ This mudlib has been fully annotated with [LPCDoc](#lpcdoc-comments) and can been successfully validated by the LPC Language Service and build task without errors.
15
+
16
+ ## If you love this package, you could
17
+
18
+ [<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" >](https://www.buymeacoffee.com/jlchmura)
19
+
20
+ ## Semantic Analysis
21
+
22
+ Semantic analysis (sometimes refered to as the _type checker_) will perform many useful checks on your code, but you must opt-in to this feature.
23
+ To enable semantic code analysis, set the [diagnostics](#diagnostics---diagnostics) options to `"on"`.
24
+
25
+ ## LPCDoc Comments
26
+
27
+ LPC Language Services uses [JSDoc-style](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html) comments to provide additional context during hover and signature help.
28
+
29
+ Example:
30
+
31
+ ```c
32
+ /**
33
+ * Attempts to run a command
34
+ * @param {string} cmd - The command to run
35
+ * @returns 1 if successful, otherwise 0
36
+ */
37
+ int doCommand(string cmd) {
38
+ return 1;
39
+ }
40
+ ```
41
+ Similar to typed languages like TypeScript, the type annotations are optional but can provide valuable context to the language server. For more, see [Type Annotations](#type-annotations), below.
42
+
43
+
44
+ ### Disable Checks on Per-File Basis
45
+
46
+ Semantic checks can be disabled for a single file by placing a nocheck directive at the top of the file:
47
+ ```js
48
+ // @lpc-nocheck
49
+ ```
50
+
51
+ ### this_object()
52
+
53
+ By default, the type checker will assume `this_object()` refers to the file in which you are working. At runtime, that is
54
+ not always the case, in particular when the file is included in a larger object. If needed, the type checker can be instructed to override the object type of `this_object()` by using a comment directive placed at the top of the file:
55
+ ```js
56
+ // @this_object /std/living
57
+ ```
58
+
59
+ ### Ignoring a single line - `@lpc-ignore`
60
+ You can instruct the checker to ignore errors on a single line by adding the `@lpc-ignore` comment directive:
61
+
62
+ ```c
63
+ // @lpc-ignore - ignore int to string assignment error
64
+ string foo = 123;
65
+ ```
66
+
67
+ ### Disabling checks for a single file - `@lpc-nocheck`
68
+ Diagnostics can be disabled for an entire file by addding a `@lpc-nocheck` comment directive to the top of the file.
69
+
70
+ ```c
71
+ // @lpc-nocheck
72
+ ... statements
73
+ ```
74
+
75
+ ### Expect an error - `@lpc-expect-error`
76
+ Indiciates that the next line is expected to return an error. If it does not, the directive will be flagged as an error
77
+
78
+ ```c
79
+ // @lpc-expect-error: method does not exist
80
+ o->foo();
81
+ ```
82
+
83
+ ### Type Annotations
84
+
85
+ In many instance, the type checker can automatically infer the type of an object. For example:
86
+ ```c
87
+ object itm = clone_object("std/item");
88
+ ```
89
+ However, often times a parameter or variable gives the type checker no information as to its type (other than object). Consider this example in which `->query_name()` will report an error, because it cannot validate that the function exists on object player:
90
+ ```c
91
+ void welcomePlayer(object player) {
92
+ write("Hi " + player->query_name());
93
+ }
94
+ ```
95
+ This can be solved by using a type annotation in a doc comment:
96
+ ```c
97
+ /**
98
+ * @param {"/std/player.c"} player - The player to welcome
99
+ */
100
+ void welcomePlayer(object player) {
101
+ write("Hi " + player->query_name());
102
+ }
103
+ ```
104
+ Annotations can also be used on variables and return statements:
105
+ ```c
106
+ /**
107
+ * @returns {"/std/player.c"} The current player object
108
+ */
109
+ object getPlayer() {
110
+ return lookupPlayer();
111
+ }
112
+
113
+ void testWeapon() {
114
+ object player = getPlayer();
115
+ /** @type {"/std/weapon.c"} */
116
+ object weapon;
117
+
118
+ if (player) {
119
+ weapon = player->getWeapon();
120
+ weapon->runTest();
121
+ }
122
+ }
123
+ ```
124
+
125
+ ## Setting up your workspace
126
+
127
+ The VS Code LPC Language Services extension does not use your MUD driver to compile code. As such, several configuration options are available to help the language server understand the structure of your mudlib.
128
+
129
+ ### Workspace Root vs Lib Root
130
+
131
+ First create an `lpc-config.json` file that is used to store setting for the language server. This file must be located in your workspace root, or in your lib root.
132
+ If no config file is found, the language server will still work but won't be able to take advante of global include files, include search dirs, etc.
133
+
134
+ For example, see this [GLPU Fork](https://github.com/jlchmura/glpu) in which the config file is placed in the workspace root.
135
+
136
+ #### Driver Options - `driver`
137
+
138
+ | Setting | Description |
139
+ | --------- | ---------------------------------------------------- |
140
+ | `type` | Driver type. Valid options are `ldmud` or `fluffos`. |
141
+ | `version` | The driver version string, i.e. `"3.6.7"` |
142
+
143
+ #### Include - `include`
144
+ Specifies an array of filenames or patterns to include in the program. These filenames are resolved relative to the directory containing the lpc-config.json file.
145
+
146
+ Default: `**/*`
147
+
148
+ Example:
149
+ ```json
150
+ {
151
+ "include": ["lib/**/*"]
152
+ }
153
+ ```
154
+
155
+ #### Exclude - `exclude`
156
+
157
+ Specifies an array of filenames or patterns that should be skipped when resolving include.
158
+
159
+ Important: exclude only changes which files are included as a result of the include setting. A file specified by exclude can still become part of your codebase due to a statement in your code such as an include, a types inclusion, clone_object, etc.
160
+
161
+ It is not a mechanism that prevents a file from being included in the codebase - it simply changes what the include setting finds.
162
+
163
+ #### Lib File Locations - `libFiles`
164
+
165
+ | Setting | Description |
166
+ | ---------------- | ----------------------------------------------------------------------- |
167
+ | `master` | The location of your master object. Defaults to `"/obj/master.c"` |
168
+ | `simul_efun` | The location of your simul_efun file. Defaults to `"/obj/simul_efun.c"` |
169
+ | `global_include` | When provided, will add this file as an `#include` to each file. |
170
+ | `player` | The location of your player file. Defaults to `"/obj/player.c"` |
171
+
172
+ #### Lib Root Dir - `rootDir`
173
+ If your config file is located in a folder other than your lib's root directory, use this setting
174
+ to specify the location of the root folder.
175
+
176
+ #### Include Search Dirs - `libInclude`
177
+
178
+ An array of folders that are searched when including files via the `#include` directive.
179
+
180
+ Defaults to `["/sys", "/obj", "/room"]`
181
+
182
+ #### Predefined Macros - `defines`
183
+
184
+ Since your code is not being evaluated in the mud driver, you may need to simulate one or more defines that are normally provided by the driver's compiler. Values are an array of key value pairs. Example:
185
+
186
+ ```json
187
+ "defines": [
188
+ { "__HOST_NAME__": "\"localhost\"" },
189
+ { "TLS_PORT": "5555" }
190
+ ]
191
+ ```
192
+
193
+ In the example above, `__HOST_NAME__` will be defined as the _string_ value `"localhost"`. `TLS_PORT` on the other hand, will be defined as an _int_ value `5555`.
194
+
195
+ #### Diagnostics - `diagnostics`
196
+
197
+ Semantic analysis is always run, but diagnostics are only reported if you opt in to receiving them. (Syntax errors will always be reported.) Example:
198
+
199
+ ```json
200
+ "diagnostics": "on"
201
+ ```
202
+
203
+ ### Compiler Options - `compilerOptions`
204
+
205
+ Compiler options are specified under the `compilerOptions` object:
206
+ ```json
207
+ {
208
+ "compilerOptions": {
209
+ ...
210
+ }
211
+ }
212
+ ```
213
+
214
+ #### Strict Object Type Checking - `strictObjectTypes`
215
+
216
+ Defaults to `false` unless `strict` is on.
217
+
218
+ When enabled, strick object checking will report an error when an untyped object is being assigned to a typed object.
219
+ For example:
220
+ ```c
221
+ /**
222
+ * @param {"std/player.c"} p
223
+ */
224
+ void foo(object p) {
225
+ tell_object(p, "hi");
226
+ }
227
+ void bar(object p) {
228
+ tell_object(p, "hi");
229
+ }
230
+
231
+ object player;
232
+ foo(p); /* p will report an error when strictObjectTypes is true, because it is an untyped object. */
233
+ bar(p); /* this call is ok because both objects are untyped */
234
+ ```
235
+
236
+ ## Grammar ToDo's
237
+
238
+ Language services is a work in progress. Some major areas that have yet to be implemented are:
239
+
240
+ - LWObjects
241
+ - Named object validation
242
+ - Coroutines
243
+
244
+ ## Credits
245
+
246
+ Syntax highlighting is based on the [LPC Language](https://marketplace.visualstudio.com/items?itemName=undeadfish.vscode-lpc-lang) VS Code extension by Gwenn Reece, adjusted for LDMud.
247
+
248
+ The guts of this language server is a heavily modified version of the [TypeScript](https://github.com/microsoft/typescript) compiler/server. None of it would be possible without the work of the many brilliant people working on that team.
249
+
250
+ Many thanks for the fellow MUD admins, wizards, and LPC aficionados in the LPC Discord for their inspiration.
251
+
252
+ ## Contact / Feature Requests / Bugs
253
+
254
+ Feedback welcome. You can open an issue in the [lpc-language-server repo](https://github.com/jlchmura/lpc-language-server/issues).
255
+ Otherwise, you can usually find me on the [LPC Discord](https://discord.gg/wzUbBgs3AQ) or idling on [Infinity Mud](https://infinitymud.com/).
package/bin/lpc ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ require("../src/cli.js");
3
+
4
+
package/bin/lpcserver ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ require("../src/server.js");
3
+
4
+
@@ -0,0 +1,8 @@
1
+ interface ServerCancellationToken {
2
+ isCancellationRequested(): boolean;
3
+ setRequest(requestId: number): void;
4
+ resetRequest(requestId: number): void;
5
+ }
6
+ declare function createCancellationToken(args: string[]): ServerCancellationToken;
7
+ export default createCancellationToken;
8
+ //# sourceMappingURL=cancellationToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellationToken.d.ts","sourceRoot":"./src/","sources":["src/cancellationToken/cancellationToken.ts"],"names":[],"mappings":"AAEA,UAAU,uBAAuB;IAC7B,uBAAuB,IAAI,OAAO,CAAC;IACnC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAaD,iBAAS,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,uBAAuB,CAgDxE;AACD,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import * as lpc from "../lpc/lpc.js";
2
+ /**
3
+ * Test server cancellation token used to mock host token cancellation requests.
4
+ * The cancelAfterRequest constructor param specifies how many isCancellationRequested() calls
5
+ * should be made before canceling the token. The id of the request to cancel should be set with
6
+ * setRequestToCancel();
7
+ */
8
+ export declare class ServerCancellationToken implements lpc.server.ServerCancellationToken {
9
+ private logger;
10
+ private cancelAfterRequest;
11
+ private currentId;
12
+ private requestToCancel;
13
+ private isCancellationRequestedCount;
14
+ constructor(logger: lpc.server.Logger, cancelAfterRequest?: number);
15
+ setRequest(requestId: number): void;
16
+ setRequestToCancel(requestId: number): void;
17
+ resetRequest(requestId: number): void;
18
+ isCancellationRequested(): boolean;
19
+ resetToken(): void;
20
+ }
21
+ //# sourceMappingURL=serverCancellationToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverCancellationToken.d.ts","sourceRoot":"./src/","sources":["src/cancellationToken/serverCancellationToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AAErC;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,GAAG,CAAC,MAAM,CAAC,uBAAuB;IAKlE,OAAO,CAAC,MAAM;IAAqB,OAAO,CAAC,kBAAkB;IAJzE,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,4BAA4B,CAAK;gBAErB,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAU,kBAAkB,SAAI;IAG7E,UAAU,CAAC,SAAS,EAAE,MAAM;IAM5B,kBAAkB,CAAC,SAAS,EAAE,MAAM;IAMpC,YAAY,CAAC,SAAS,EAAE,MAAM;IAM9B,uBAAuB;IAUvB,UAAU;CAKb"}
@@ -0,0 +1,2 @@
1
+ export * from "../../compiler/_namespaces/lpc.js";
2
+ //# sourceMappingURL=lpc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lpc.d.ts","sourceRoot":"./src/","sources":["src/cli/_namespaces/lpc.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
package/cli/lpc.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lpc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lpc.d.ts","sourceRoot":"./src/","sources":["src/cli/lpc.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import { DiagnosticSeverity } from "vscode-languageserver";
2
+ import { DiagnosticsInfo, DriverInfo, FilesInfo, ILpcConfig } from "../config-types";
3
+ export declare class LpcConfig implements ILpcConfig {
4
+ defines: Map<string, string>;
5
+ include: string[];
6
+ exclude: string[];
7
+ driver: DriverInfo;
8
+ diagnostics: DiagnosticsInfo;
9
+ allDiagnosticsOff: boolean;
10
+ files: FilesInfo;
11
+ }
12
+ export declare function getDiagnosticLevelFromConfig(config: LpcConfig, code: string, defaultLevel: DiagnosticSeverity): DiagnosticSeverity;
13
+ export declare function ensureLpcConfig(): LpcConfig;
14
+ export declare function setLpcConfig(config: LpcConfig): void;
15
+ export declare function loadLpcConfig(filename: string): LpcConfig;
16
+ export declare function loadLpcConfigFromString(data: string): LpcConfig;
17
+ //# sourceMappingURL=LpcConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LpcConfig.d.ts","sourceRoot":"./src/","sources":["src/compiler/LpcConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAEH,eAAe,EACf,UAAU,EAEV,SAAS,EACT,UAAU,EACb,MAAM,iBAAiB,CAAC;AAoBzB,qBAAa,SAAU,YAAW,UAAU;IACjC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAQhC;IAKI,OAAO,EAAE,MAAM,EAAE,CAAuC;IACxD,OAAO,EAAE,MAAM,EAAE,CAAM;IAEvB,MAAM,EAAE,UAAU,CAGvB;IAEK,WAAW,EAAE,eAAe,CAAsB;IAClD,iBAAiB,EAAE,OAAO,CAAS;IAEnC,KAAK,EAAE,SAAS,CAMrB;CACL;AAED,wBAAgB,4BAA4B,CACxC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,kBAAkB,GACjC,kBAAkB,CAoBpB;AAGD,wBAAgB,eAAe,IAAI,SAAS,CAM3C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAEpD;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAIzD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CA4C/D"}
@@ -0,0 +1,49 @@
1
+ export * from "../corePublic.js";
2
+ export * from "../core.js";
3
+ export * from "../performanceCore.js";
4
+ export * from "../perfLoger.js";
5
+ export * from "../debug.js";
6
+ export * from "../tracing.js";
7
+ export * from "../types.js";
8
+ export * from "../diagnosticInformation.js";
9
+ export * from "../scanner.js";
10
+ export * from "../lpcJsHelpers.js";
11
+ export * from "../utilitiesPublic.js";
12
+ export * from "../utilities.js";
13
+ export * from "../factory/baseNodeFactory.js";
14
+ export * from "../factory/parenthesizerRules.js";
15
+ export * from "../factory/nodeFactory.js";
16
+ export * from "../factory/nodeChildren.js";
17
+ export * from "../factory/emitHelper.js";
18
+ export * from "../factory/emitNode.js";
19
+ export * from "../factory/utilitiesPublic.js";
20
+ export * from "../factory/utilities.js";
21
+ export * from "../lpcFileHandler.js";
22
+ export * from "../parser.js";
23
+ export * from "../commandLineParser.js";
24
+ export * from "../moduleNameResolver.js";
25
+ export * from "../nodeTests.js";
26
+ export * from "../binder.js";
27
+ export * from "../checker.js";
28
+ export * from "../path.js";
29
+ export * from "../builderPublic.js";
30
+ export * from "../visitorPublic.js";
31
+ export * from "../sourcemap.js";
32
+ export * from "../watchPublic.js";
33
+ export * from "../watch.js";
34
+ export * from "../watchUtilities.js";
35
+ export * from "../sys.js";
36
+ export * from "../program.js";
37
+ export * from "../transformers.js";
38
+ export * from "../transformers/declarations.js";
39
+ export * from "../emitter.js";
40
+ export * from "../resolutionCache.js";
41
+ export * from "../lpcbuild.js";
42
+ export * from "../lpcbuildPublic.js";
43
+ export * from "../executeCommandLine.js";
44
+ export * from "../expressionToTypeNode.js";
45
+ import * as moduleSpecifiers from "./lpc.moduleSpecifiers.js";
46
+ export { moduleSpecifiers };
47
+ import * as performance from "./lpc.performance.js";
48
+ export { performance };
49
+ //# sourceMappingURL=lpc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lpc.d.ts","sourceRoot":"./src/","sources":["src/compiler/_namespaces/lpc.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "../moduleSpecifiers.js";
2
+ //# sourceMappingURL=lpc.moduleSpecifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lpc.moduleSpecifiers.d.ts","sourceRoot":"./src/","sources":["src/compiler/_namespaces/lpc.moduleSpecifiers.ts"],"names":[],"mappings":"AAEA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "../performance.js";
2
+ //# sourceMappingURL=lpc.performance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lpc.performance.d.ts","sourceRoot":"./src/","sources":["src/compiler/_namespaces/lpc.performance.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=binder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binder.d.ts","sourceRoot":"./src/","sources":["src/compiler/binder.ts"],"names":[],"mappings":""}
@@ -0,0 +1,76 @@
1
+ import { CancellationToken, CompilerOptions, Diagnostic, DiagnosticWithLocation, EmitResult, Program, SourceFile, WriteFileCallback } from "./_namespaces/lpc.js";
2
+ /**
3
+ * Builder to manage the program state changes
4
+ */
5
+ export interface BuilderProgram {
6
+ /**
7
+ * Returns current program
8
+ */
9
+ getProgram(): Program;
10
+ /**
11
+ * Get compiler options of the program
12
+ */
13
+ getCompilerOptions(): CompilerOptions;
14
+ /**
15
+ * Get the source file in the program with file name
16
+ */
17
+ getSourceFile(fileName: string): SourceFile | undefined;
18
+ /**
19
+ * Get a list of files in the program
20
+ */
21
+ getSourceFiles(): readonly SourceFile[];
22
+ /**
23
+ * Get the diagnostics for compiler options
24
+ */
25
+ getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
26
+ /**
27
+ * Get the diagnostics that dont belong to any file
28
+ */
29
+ getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
30
+ /**
31
+ * Get the diagnostics from config file parsing
32
+ */
33
+ getConfigFileParsingDiagnostics(): readonly Diagnostic[];
34
+ /**
35
+ * Get the syntax diagnostics, for all source files if source file is not supplied
36
+ */
37
+ getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
38
+ /**
39
+ * Get the declaration diagnostics, for all source files if source file is not supplied
40
+ */
41
+ getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
42
+ /**
43
+ * Get all the dependencies of the file
44
+ */
45
+ getAllDependencies(sourceFile: SourceFile): readonly string[];
46
+ /**
47
+ * Get the diagnostics from config file parsing
48
+ */
49
+ getConfigFileParsingDiagnostics(): readonly Diagnostic[];
50
+ /**
51
+ * Gets the semantic diagnostics from the program corresponding to this state of file (if provided) or whole program
52
+ * The semantic diagnostics are cached and managed here
53
+ * Note that it is assumed that when asked about semantic diagnostics through this API,
54
+ * the file has been taken out of affected files so it is safe to use cache or get from program and cache the diagnostics
55
+ * In case of SemanticDiagnosticsBuilderProgram if the source file is not provided,
56
+ * it will iterate through all the affected files, to ensure that cache stays valid and yet provide a way to get all semantic diagnostics
57
+ */
58
+ getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
59
+ /**
60
+ * Emits the JavaScript and declaration files.
61
+ * When targetSource file is specified, emits the files corresponding to that source file,
62
+ * otherwise for the whole program.
63
+ * In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified,
64
+ * it is assumed that that file is handled from affected file list. If targetSourceFile is not specified,
65
+ * it will only emit all the affected files instead of whole program
66
+ *
67
+ * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host
68
+ * in that order would be used to write the files
69
+ */
70
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean): EmitResult;
71
+ /**
72
+ * Get the current directory of the program
73
+ */
74
+ getCurrentDirectory(): string;
75
+ }
76
+ //# sourceMappingURL=builderPublic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builderPublic.d.ts","sourceRoot":"./src/","sources":["src/compiler/builderPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,sBAAsB,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAElK;;GAEG;AACH,MAAM,WAAW,cAAc;IAO3B;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC;IAatB;;OAEG;IACH,kBAAkB,IAAI,eAAe,CAAC;IACtC;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IACxD;;OAEG;IACH,cAAc,IAAI,SAAS,UAAU,EAAE,CAAC;IACxC;;OAEG;IACH,qBAAqB,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,SAAS,UAAU,EAAE,CAAC;IACpF;;OAEG;IACH,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,SAAS,UAAU,EAAE,CAAC;IACnF;;OAEG;IACH,+BAA+B,IAAI,SAAS,UAAU,EAAE,CAAC;IACzD;;OAEG;IACH,uBAAuB,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,SAAS,UAAU,EAAE,CAAC;IAC/G;;OAEG;IACH,yBAAyB,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,SAAS,sBAAsB,EAAE,CAAC;IAC7H;;OAEG;IACH,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,MAAM,EAAE,CAAC;IAC9D;;OAEG;IACH,+BAA+B,IAAI,SAAS,UAAU,EAAE,CAAC;IACzD;;;;;;;OAOG;IACH,sBAAsB,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,SAAS,UAAU,EAAE,CAAC;IAC9G;;;;;;;;;;OAUG;IACH,IAAI,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAE,OAAO,GAAgD,UAAU,CAAC;IAG/L;;OAEG;IACH,mBAAmB,IAAI,MAAM,CAAC;CAGjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=checker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checker.d.ts","sourceRoot":"./src/","sources":["src/compiler/checker.ts"],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
1
+ import { CompilerOptions, Diagnostic, FileExtensionInfo, JsonSourceFile, LpcConfigSourceFile, ParseConfigHost, ParsedCommandLine, ParsedLpcConfig, Path, WatchOptions } from "./_namespaces/lpc";
2
+ export declare const libEntries: [string, string][];
3
+ /**
4
+ * Parse the contents of a config file (tsconfig.json).
5
+ * @param jsonNode The contents of the config file to parse
6
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
7
+ * @param basePath A root directory to resolve relative path entries in the config
8
+ * file to. e.g. outDir
9
+ */
10
+ export declare function parseLpcSourceFileConfigFileContent(sourceFile: LpcConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], /*extendedConfigCache?: Map<string, ExtendedConfigCacheEntry>, */ existingWatchOptions?: WatchOptions): ParsedCommandLine;
11
+ export type DiagnosticReporter = (diagnostic: Diagnostic) => void;
12
+ export interface ExtendedConfigCacheEntry {
13
+ extendedResult: LpcConfigSourceFile;
14
+ extendedConfig: ParsedLpcConfig | undefined;
15
+ }
16
+ /**
17
+ * Convert the json syntax tree into the json value
18
+ */
19
+ export declare function convertToObject(sourceFile: JsonSourceFile, errors: Diagnostic[]): any;
20
+ /**
21
+ * Parse the contents of a config file (tsconfig.json).
22
+ * @param jsonNode The contents of the config file to parse
23
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
24
+ * @param basePath A root directory to resolve relative path entries in the config
25
+ * file to. e.g. outDir
26
+ */
27
+ export declare function parseJsonSourceFileConfigFileContent(sourceFile: LpcConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<string, ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
28
+ /**
29
+ * Reports config file diagnostics
30
+ */
31
+ export interface ConfigFileDiagnosticsReporter {
32
+ /**
33
+ * Reports unrecoverable error when parsing config file
34
+ */
35
+ onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
36
+ }
37
+ /**
38
+ * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors
39
+ */
40
+ export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
41
+ getCurrentDirectory(): string;
42
+ }
43
+ /**
44
+ * Reads the config file, reports errors if any and exits if the config file cannot be found
45
+ */
46
+ export declare function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map<string, ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined;
47
+ //# sourceMappingURL=commandLineParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandLineParser.d.ts","sourceRoot":"./src/","sources":["src/compiler/commandLineParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8L,eAAe,EAAyJ,UAAU,EAAoO,iBAAiB,EAAke,cAAc,EAA+B,mBAAmB,EAA2H,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAiB,IAAI,EAAkO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG3lD,eAAO,MAAM,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAExC,CAAC;AAkKF;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CAAC,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,eAAe,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,mBAAmB,CAAC,EAAE,SAAS,iBAAiB,EAAE,EAAE,iEAAiE,CAAA,oBAAoB,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAK/X;AAojBD,MAAM,MAAM,kBAAkB,GAAG,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;AAElE,MAAM,WAAW,wBAAwB;IACrC,cAAc,EAAE,mBAAmB,CAAC;IACpC,cAAc,EAAE,eAAe,GAAG,SAAS,CAAC;CAC/C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAErF;AA6iCD;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAAC,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,eAAe,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,mBAAmB,CAAC,EAAE,SAAS,iBAAiB,EAAE,EAAE,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EAAE,oBAAoB,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAK5X;AAiND;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C;;OAEG;IACH,mCAAmC,EAAE,kBAAkB,CAAC;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe,EAAE,6BAA6B;IACvF,mBAAmB,IAAI,MAAM,CAAC;CACjC;AA6DD;;GAEG;AACH,wBAAgB,gCAAgC,CAC5C,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,eAAe,GAAG,SAAS,EAC5C,IAAI,EAAE,mBAAmB,EACzB,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EAC3D,oBAAoB,CAAC,EAAE,YAAY,EACnC,mBAAmB,CAAC,EAAE,SAAS,iBAAiB,EAAE,GACnD,iBAAiB,GAAG,SAAS,CAuB/B"}
@@ -0,0 +1,3 @@
1
+ import { SortedArray } from "./_namespaces/lpc";
2
+ export declare function createSortedArray<T>(): SortedArray<T>;
3
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"./src/","sources":["src/compiler/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiE,WAAW,EAAiC,MAAM,mBAAmB,CAAC;AAs3D9I,wBAAgB,iBAAiB,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAErD"}
@@ -0,0 +1,19 @@
1
+ export declare const versionMajorMinor = "1.1";
2
+ /** The version of the TypeScript compiler release */
3
+ export declare const version: string;
4
+ export declare const diagnosticPrefix: string;
5
+ /**
6
+ * Type of objects whose values are all of the same type.
7
+ * The `in` and `for-in` operators can *not* be safely used,
8
+ * since `Object.prototype` may be modified by outside code.
9
+ */
10
+ export interface MapLike<T> {
11
+ [index: string]: T;
12
+ }
13
+ export interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
14
+ " __sortedArrayBrand": any;
15
+ }
16
+ export interface SortedArray<T> extends Array<T> {
17
+ " __sortedArrayBrand": any;
18
+ }
19
+ //# sourceMappingURL=corePublic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corePublic.d.ts","sourceRoot":"./src/","sources":["src/compiler/corePublic.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC,qDAAqD;AACrD,eAAO,MAAM,OAAO,QAAqB,CAAC;AAE1C,eAAO,MAAM,gBAAgB,QAAkB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IAC5D,qBAAqB,EAAE,GAAG,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IAC5C,qBAAqB,EAAE,GAAG,CAAC;CAC9B"}