@shd101wyy/yo 0.0.2

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 (339) hide show
  1. package/LICENSE.md +17 -0
  2. package/README.md +80 -0
  3. package/out/cjs/index.cjs +51 -0
  4. package/out/cjs/yo-cli.cjs +2158 -0
  5. package/out/esm/index.mjs +51 -0
  6. package/out/types/src/codegen/async/runtime.d.ts +2 -0
  7. package/out/types/src/codegen/async/state-code-gen.d.ts +10 -0
  8. package/out/types/src/codegen/async/state-machine.d.ts +13 -0
  9. package/out/types/src/codegen/c/collection.d.ts +3 -0
  10. package/out/types/src/codegen/codegen-c.d.ts +12 -0
  11. package/out/types/src/codegen/constants.d.ts +3 -0
  12. package/out/types/src/codegen/expressions/array.d.ts +4 -0
  13. package/out/types/src/codegen/expressions/generation.d.ts +11 -0
  14. package/out/types/src/codegen/expressions/index.d.ts +2 -0
  15. package/out/types/src/codegen/functions/collection.d.ts +5 -0
  16. package/out/types/src/codegen/functions/context.d.ts +57 -0
  17. package/out/types/src/codegen/functions/generation.d.ts +25 -0
  18. package/out/types/src/codegen/functions/index.d.ts +2 -0
  19. package/out/types/src/codegen/index.d.ts +20 -0
  20. package/out/types/src/codegen/parallelism/runtime.d.ts +2 -0
  21. package/out/types/src/codegen/types/collection.d.ts +8 -0
  22. package/out/types/src/codegen/types/generation.d.ts +13 -0
  23. package/out/types/src/codegen/types/index.d.ts +2 -0
  24. package/out/types/src/codegen/utils/fixup.d.ts +2 -0
  25. package/out/types/src/codegen/utils/index.d.ts +77 -0
  26. package/out/types/src/codegen/values/index.d.ts +1 -0
  27. package/out/types/src/emitter.d.ts +11 -0
  28. package/out/types/src/env.d.ts +85 -0
  29. package/out/types/src/error.d.ts +45 -0
  30. package/out/types/src/evaluator/async/await-analysis-types.d.ts +23 -0
  31. package/out/types/src/evaluator/async/await-analysis.d.ts +5 -0
  32. package/out/types/src/evaluator/builtins/alignof.d.ts +8 -0
  33. package/out/types/src/evaluator/builtins/and_or.d.ts +8 -0
  34. package/out/types/src/evaluator/builtins/arc_fns.d.ts +58 -0
  35. package/out/types/src/evaluator/builtins/array_fns.d.ts +0 -0
  36. package/out/types/src/evaluator/builtins/as.d.ts +8 -0
  37. package/out/types/src/evaluator/builtins/async_fns.d.ts +8 -0
  38. package/out/types/src/evaluator/builtins/compt_assert.d.ts +8 -0
  39. package/out/types/src/evaluator/builtins/compt_boolean_fns.d.ts +8 -0
  40. package/out/types/src/evaluator/builtins/compt_expect_error.d.ts +8 -0
  41. package/out/types/src/evaluator/builtins/compt_list_fns.d.ts +33 -0
  42. package/out/types/src/evaluator/builtins/compt_print.d.ts +8 -0
  43. package/out/types/src/evaluator/builtins/compt_string_fns.d.ts +8 -0
  44. package/out/types/src/evaluator/builtins/consume.d.ts +8 -0
  45. package/out/types/src/evaluator/builtins/drop.d.ts +8 -0
  46. package/out/types/src/evaluator/builtins/dup.d.ts +8 -0
  47. package/out/types/src/evaluator/builtins/expr_fns.d.ts +33 -0
  48. package/out/types/src/evaluator/builtins/future_fns.d.ts +8 -0
  49. package/out/types/src/evaluator/builtins/gc.d.ts +8 -0
  50. package/out/types/src/evaluator/builtins/gensym.d.ts +8 -0
  51. package/out/types/src/evaluator/builtins/impl_constraint.d.ts +8 -0
  52. package/out/types/src/evaluator/builtins/macro_expand.d.ts +8 -0
  53. package/out/types/src/evaluator/builtins/numeric_fns.d.ts +8 -0
  54. package/out/types/src/evaluator/builtins/panic.d.ts +8 -0
  55. package/out/types/src/evaluator/builtins/ptr_fns.d.ts +8 -0
  56. package/out/types/src/evaluator/builtins/quote.d.ts +13 -0
  57. package/out/types/src/evaluator/builtins/rc.d.ts +8 -0
  58. package/out/types/src/evaluator/builtins/sizeof.d.ts +8 -0
  59. package/out/types/src/evaluator/builtins/the.d.ts +8 -0
  60. package/out/types/src/evaluator/builtins/type_fns.d.ts +28 -0
  61. package/out/types/src/evaluator/builtins/va_start.d.ts +8 -0
  62. package/out/types/src/evaluator/builtins/var_fns.d.ts +18 -0
  63. package/out/types/src/evaluator/calls/array.d.ts +13 -0
  64. package/out/types/src/evaluator/calls/array_type.d.ts +11 -0
  65. package/out/types/src/evaluator/calls/closure_type.d.ts +11 -0
  66. package/out/types/src/evaluator/calls/compt_function.d.ts +19 -0
  67. package/out/types/src/evaluator/calls/compt_list_type.d.ts +11 -0
  68. package/out/types/src/evaluator/calls/function.d.ts +16 -0
  69. package/out/types/src/evaluator/calls/function_type.d.ts +15 -0
  70. package/out/types/src/evaluator/calls/helper.d.ts +42 -0
  71. package/out/types/src/evaluator/calls/iso.d.ts +15 -0
  72. package/out/types/src/evaluator/calls/module_type.d.ts +11 -0
  73. package/out/types/src/evaluator/calls/numeric_type.d.ts +15 -0
  74. package/out/types/src/evaluator/calls/pointer.d.ts +8 -0
  75. package/out/types/src/evaluator/calls/pointer_type.d.ts +14 -0
  76. package/out/types/src/evaluator/calls/type.d.ts +12 -0
  77. package/out/types/src/evaluator/context.d.ts +169 -0
  78. package/out/types/src/evaluator/exprs/_expr.d.ts +8 -0
  79. package/out/types/src/evaluator/exprs/assignment.d.ts +9 -0
  80. package/out/types/src/evaluator/exprs/begin.d.ts +10 -0
  81. package/out/types/src/evaluator/exprs/binding.d.ts +12 -0
  82. package/out/types/src/evaluator/exprs/c_include.d.ts +8 -0
  83. package/out/types/src/evaluator/exprs/cond.d.ts +8 -0
  84. package/out/types/src/evaluator/exprs/destructuring_assignment.d.ts +33 -0
  85. package/out/types/src/evaluator/exprs/exists.d.ts +0 -0
  86. package/out/types/src/evaluator/exprs/expr.d.ts +9 -0
  87. package/out/types/src/evaluator/exprs/extern.d.ts +8 -0
  88. package/out/types/src/evaluator/exprs/identifer_and_operator.d.ts +9 -0
  89. package/out/types/src/evaluator/exprs/import.d.ts +9 -0
  90. package/out/types/src/evaluator/exprs/initialization_assignment.d.ts +8 -0
  91. package/out/types/src/evaluator/exprs/match.d.ts +8 -0
  92. package/out/types/src/evaluator/exprs/open.d.ts +8 -0
  93. package/out/types/src/evaluator/exprs/property_access.d.ts +8 -0
  94. package/out/types/src/evaluator/exprs/recur.d.ts +8 -0
  95. package/out/types/src/evaluator/exprs/subtype_of.d.ts +21 -0
  96. package/out/types/src/evaluator/exprs/test.d.ts +8 -0
  97. package/out/types/src/evaluator/exprs/typeof.d.ts +8 -0
  98. package/out/types/src/evaluator/exprs/while.d.ts +8 -0
  99. package/out/types/src/evaluator/index.d.ts +26 -0
  100. package/out/types/src/evaluator/types/array.d.ts +8 -0
  101. package/out/types/src/evaluator/types/closure.d.ts +8 -0
  102. package/out/types/src/evaluator/types/compt_list.d.ts +8 -0
  103. package/out/types/src/evaluator/types/concrete_module.d.ts +8 -0
  104. package/out/types/src/evaluator/types/dyn.d.ts +8 -0
  105. package/out/types/src/evaluator/types/enum.d.ts +8 -0
  106. package/out/types/src/evaluator/types/expr_synthesizer.d.ts +14 -0
  107. package/out/types/src/evaluator/types/field.d.ts +14 -0
  108. package/out/types/src/evaluator/types/fn_module.d.ts +8 -0
  109. package/out/types/src/evaluator/types/function.d.ts +58 -0
  110. package/out/types/src/evaluator/types/future_module.d.ts +8 -0
  111. package/out/types/src/evaluator/types/module.d.ts +19 -0
  112. package/out/types/src/evaluator/types/newtype.d.ts +8 -0
  113. package/out/types/src/evaluator/types/object.d.ts +8 -0
  114. package/out/types/src/evaluator/types/proofs.d.ts +0 -0
  115. package/out/types/src/evaluator/types/slice.d.ts +8 -0
  116. package/out/types/src/evaluator/types/struct.d.ts +8 -0
  117. package/out/types/src/evaluator/types/synthesizer.d.ts +16 -0
  118. package/out/types/src/evaluator/types/tuple.d.ts +18 -0
  119. package/out/types/src/evaluator/types/union.d.ts +8 -0
  120. package/out/types/src/evaluator/types/utils.d.ts +71 -0
  121. package/out/types/src/evaluator/types/validation.d.ts +3 -0
  122. package/out/types/src/evaluator/utils/array-utils.d.ts +15 -0
  123. package/out/types/src/evaluator/utils/closure.d.ts +35 -0
  124. package/out/types/src/evaluator/utils.d.ts +4 -0
  125. package/out/types/src/evaluator/values/anonymous_function.d.ts +8 -0
  126. package/out/types/src/evaluator/values/anonymous_module.d.ts +17 -0
  127. package/out/types/src/evaluator/values/anonymous_struct.d.ts +8 -0
  128. package/out/types/src/evaluator/values/array.d.ts +8 -0
  129. package/out/types/src/evaluator/values/boolean.d.ts +3 -0
  130. package/out/types/src/evaluator/values/char.d.ts +3 -0
  131. package/out/types/src/evaluator/values/compt_list.d.ts +8 -0
  132. package/out/types/src/evaluator/values/dyn.d.ts +8 -0
  133. package/out/types/src/evaluator/values/float.d.ts +4 -0
  134. package/out/types/src/evaluator/values/integer.d.ts +4 -0
  135. package/out/types/src/evaluator/values/module.d.ts +58 -0
  136. package/out/types/src/evaluator/values/string.d.ts +3 -0
  137. package/out/types/src/evaluator/values/tuple.d.ts +32 -0
  138. package/out/types/src/expr.d.ts +456 -0
  139. package/out/types/src/function-value.d.ts +42 -0
  140. package/out/types/src/index.d.ts +4 -0
  141. package/out/types/src/lexer.d.ts +2 -0
  142. package/out/types/src/logger.d.ts +1 -0
  143. package/out/types/src/module-manager.d.ts +30 -0
  144. package/out/types/src/naming-checker.d.ts +4 -0
  145. package/out/types/src/parser.d.ts +33 -0
  146. package/out/types/src/test-runner.d.ts +30 -0
  147. package/out/types/src/tests/codegen.test.d.ts +1 -0
  148. package/out/types/src/tests/fixme.test.d.ts +1 -0
  149. package/out/types/src/tests/module-manager.test.d.ts +1 -0
  150. package/out/types/src/tests/parser.test.d.ts +1 -0
  151. package/out/types/src/tests/sample.test.d.ts +0 -0
  152. package/out/types/src/tests/std.test.d.ts +1 -0
  153. package/out/types/src/token.d.ts +40 -0
  154. package/out/types/src/type-value.d.ts +7 -0
  155. package/out/types/src/types/compatibility.d.ts +16 -0
  156. package/out/types/src/types/creators.d.ts +73 -0
  157. package/out/types/src/types/definitions.d.ts +218 -0
  158. package/out/types/src/types/guards.d.ts +70 -0
  159. package/out/types/src/types/hierarchy.d.ts +4 -0
  160. package/out/types/src/types/index.d.ts +7 -0
  161. package/out/types/src/types/module_field.d.ts +2 -0
  162. package/out/types/src/types/tags.d.ts +45 -0
  163. package/out/types/src/types/utils.d.ts +50 -0
  164. package/out/types/src/unit-value.d.ts +7 -0
  165. package/out/types/src/utils.d.ts +6 -0
  166. package/out/types/src/value-tag.d.ts +29 -0
  167. package/out/types/src/value.d.ts +110 -0
  168. package/out/types/src/yo-cli.d.ts +1 -0
  169. package/out/types/tsconfig.tsbuildinfo +1 -0
  170. package/package.json +57 -0
  171. package/scripts/check-liburing.js +76 -0
  172. package/std/alg/hash.yo +50 -0
  173. package/std/allocator.yo +113 -0
  174. package/std/allocators/c_allocator.yo +118 -0
  175. package/std/async.yo +13 -0
  176. package/std/collections/array_list.yo +415 -0
  177. package/std/collections/hash_map.yo +482 -0
  178. package/std/collections/hash_set.yo +706 -0
  179. package/std/collections/index.yo +11 -0
  180. package/std/collections/linked_list.yo +439 -0
  181. package/std/error.yo +0 -0
  182. package/std/gc.yo +10 -0
  183. package/std/index.yo +12 -0
  184. package/std/io/file.yo +191 -0
  185. package/std/io/index.yo +5 -0
  186. package/std/libc/assert.yo +39 -0
  187. package/std/libc/ctype.yo +57 -0
  188. package/std/libc/errno.yo +182 -0
  189. package/std/libc/float.yo +87 -0
  190. package/std/libc/index.yo +29 -0
  191. package/std/libc/limits.yo +65 -0
  192. package/std/libc/math.yo +679 -0
  193. package/std/libc/signal.yo +101 -0
  194. package/std/libc/stdatomic.yo +213 -0
  195. package/std/libc/stdint.yo +214 -0
  196. package/std/libc/stdio.yo +225 -0
  197. package/std/libc/stdlib.yo +204 -0
  198. package/std/libc/string.yo +151 -0
  199. package/std/libc/time.yo +92 -0
  200. package/std/libc/unistd.yo +130 -0
  201. package/std/monad.yo +152 -0
  202. package/std/prelude.yo +3094 -0
  203. package/std/string/index.yo +8 -0
  204. package/std/string/rune.yo +82 -0
  205. package/std/string/string.yo +288 -0
  206. package/std/sync.yo +95 -0
  207. package/std/thread.yo +36 -0
  208. package/std/time.yo +13 -0
  209. package/std/worker.yo +36 -0
  210. package/vendor/mimalloc/.gitattributes +12 -0
  211. package/vendor/mimalloc/CMakeLists.txt +763 -0
  212. package/vendor/mimalloc/LICENSE +21 -0
  213. package/vendor/mimalloc/SECURITY.md +41 -0
  214. package/vendor/mimalloc/azure-pipelines.yml +251 -0
  215. package/vendor/mimalloc/bin/mimalloc-redirect-arm64.dll +0 -0
  216. package/vendor/mimalloc/bin/mimalloc-redirect-arm64.lib +0 -0
  217. package/vendor/mimalloc/bin/mimalloc-redirect-arm64ec.dll +0 -0
  218. package/vendor/mimalloc/bin/mimalloc-redirect-arm64ec.lib +0 -0
  219. package/vendor/mimalloc/bin/mimalloc-redirect.dll +0 -0
  220. package/vendor/mimalloc/bin/mimalloc-redirect.lib +0 -0
  221. package/vendor/mimalloc/bin/mimalloc-redirect32.dll +0 -0
  222. package/vendor/mimalloc/bin/mimalloc-redirect32.lib +0 -0
  223. package/vendor/mimalloc/bin/minject-arm64.exe +0 -0
  224. package/vendor/mimalloc/bin/minject.exe +0 -0
  225. package/vendor/mimalloc/bin/minject32.exe +0 -0
  226. package/vendor/mimalloc/bin/readme.md +118 -0
  227. package/vendor/mimalloc/cmake/JoinPaths.cmake +23 -0
  228. package/vendor/mimalloc/cmake/mimalloc-config-version.cmake +19 -0
  229. package/vendor/mimalloc/cmake/mimalloc-config.cmake +14 -0
  230. package/vendor/mimalloc/contrib/docker/alpine/Dockerfile +23 -0
  231. package/vendor/mimalloc/contrib/docker/alpine-arm32v7/Dockerfile +28 -0
  232. package/vendor/mimalloc/contrib/docker/alpine-x86/Dockerfile +28 -0
  233. package/vendor/mimalloc/contrib/docker/manylinux-x64/Dockerfile +23 -0
  234. package/vendor/mimalloc/contrib/docker/readme.md +10 -0
  235. package/vendor/mimalloc/contrib/vcpkg/portfile.cmake +64 -0
  236. package/vendor/mimalloc/contrib/vcpkg/readme.md +40 -0
  237. package/vendor/mimalloc/contrib/vcpkg/usage +20 -0
  238. package/vendor/mimalloc/contrib/vcpkg/vcpkg-cmake-wrapper.cmake +20 -0
  239. package/vendor/mimalloc/contrib/vcpkg/vcpkg.json +48 -0
  240. package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg +887 -0
  241. package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg +1185 -0
  242. package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg +757 -0
  243. package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg +1028 -0
  244. package/vendor/mimalloc/doc/bench-2020/bench-r5a-1.svg +769 -0
  245. package/vendor/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg +868 -0
  246. package/vendor/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg +1157 -0
  247. package/vendor/mimalloc/doc/bench-2020/bench-r5a-2.svg +983 -0
  248. package/vendor/mimalloc/doc/bench-2020/bench-r5a-rss-1.svg +683 -0
  249. package/vendor/mimalloc/doc/bench-2020/bench-r5a-rss-2.svg +854 -0
  250. package/vendor/mimalloc/doc/bench-2020/bench-spec-rss.svg +713 -0
  251. package/vendor/mimalloc/doc/bench-2020/bench-spec.svg +713 -0
  252. package/vendor/mimalloc/doc/bench-2020/bench-z4-1.svg +890 -0
  253. package/vendor/mimalloc/doc/bench-2020/bench-z4-2.svg +1146 -0
  254. package/vendor/mimalloc/doc/bench-2020/bench-z4-rss-1.svg +796 -0
  255. package/vendor/mimalloc/doc/bench-2020/bench-z4-rss-2.svg +974 -0
  256. package/vendor/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg +952 -0
  257. package/vendor/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg +1255 -0
  258. package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg +955 -0
  259. package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg +1269 -0
  260. package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg +836 -0
  261. package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg +1131 -0
  262. package/vendor/mimalloc/doc/bench-2021/bench-macmini-2021-01-30.svg +766 -0
  263. package/vendor/mimalloc/doc/doxyfile +2895 -0
  264. package/vendor/mimalloc/doc/ds-logo.jpg +0 -0
  265. package/vendor/mimalloc/doc/ds-logo.png +0 -0
  266. package/vendor/mimalloc/doc/mimalloc-doc.h +1452 -0
  267. package/vendor/mimalloc/doc/mimalloc-doxygen.css +60 -0
  268. package/vendor/mimalloc/doc/mimalloc-logo-100.png +0 -0
  269. package/vendor/mimalloc/doc/mimalloc-logo.png +0 -0
  270. package/vendor/mimalloc/doc/mimalloc-logo.svg +161 -0
  271. package/vendor/mimalloc/doc/spades-logo.png +0 -0
  272. package/vendor/mimalloc/doc/unreal-logo.svg +43 -0
  273. package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj +500 -0
  274. package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj.filters +108 -0
  275. package/vendor/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj +508 -0
  276. package/vendor/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj.filters +111 -0
  277. package/vendor/mimalloc/ide/vs2022/mimalloc-override-test-dep.vcxproj +355 -0
  278. package/vendor/mimalloc/ide/vs2022/mimalloc-override-test.vcxproj +360 -0
  279. package/vendor/mimalloc/ide/vs2022/mimalloc-test-api.vcxproj +295 -0
  280. package/vendor/mimalloc/ide/vs2022/mimalloc-test-stress.vcxproj +292 -0
  281. package/vendor/mimalloc/ide/vs2022/mimalloc-test.vcxproj +289 -0
  282. package/vendor/mimalloc/ide/vs2022/mimalloc.sln +151 -0
  283. package/vendor/mimalloc/include/mimalloc/atomic.h +557 -0
  284. package/vendor/mimalloc/include/mimalloc/internal.h +1153 -0
  285. package/vendor/mimalloc/include/mimalloc/prim.h +421 -0
  286. package/vendor/mimalloc/include/mimalloc/track.h +145 -0
  287. package/vendor/mimalloc/include/mimalloc/types.h +685 -0
  288. package/vendor/mimalloc/include/mimalloc-new-delete.h +66 -0
  289. package/vendor/mimalloc/include/mimalloc-override.h +68 -0
  290. package/vendor/mimalloc/include/mimalloc-stats.h +103 -0
  291. package/vendor/mimalloc/include/mimalloc.h +612 -0
  292. package/vendor/mimalloc/mimalloc.pc.in +11 -0
  293. package/vendor/mimalloc/readme.md +946 -0
  294. package/vendor/mimalloc/src/alloc-aligned.c +360 -0
  295. package/vendor/mimalloc/src/alloc-override.c +316 -0
  296. package/vendor/mimalloc/src/alloc-posix.c +185 -0
  297. package/vendor/mimalloc/src/alloc.c +692 -0
  298. package/vendor/mimalloc/src/arena-abandon.c +346 -0
  299. package/vendor/mimalloc/src/arena.c +1043 -0
  300. package/vendor/mimalloc/src/bitmap.c +441 -0
  301. package/vendor/mimalloc/src/bitmap.h +119 -0
  302. package/vendor/mimalloc/src/free.c +572 -0
  303. package/vendor/mimalloc/src/heap.c +733 -0
  304. package/vendor/mimalloc/src/init.c +714 -0
  305. package/vendor/mimalloc/src/libc.c +334 -0
  306. package/vendor/mimalloc/src/options.c +663 -0
  307. package/vendor/mimalloc/src/os.c +770 -0
  308. package/vendor/mimalloc/src/page-queue.c +390 -0
  309. package/vendor/mimalloc/src/page.c +1049 -0
  310. package/vendor/mimalloc/src/prim/emscripten/prim.c +249 -0
  311. package/vendor/mimalloc/src/prim/osx/alloc-override-zone.c +461 -0
  312. package/vendor/mimalloc/src/prim/osx/prim.c +9 -0
  313. package/vendor/mimalloc/src/prim/prim.c +76 -0
  314. package/vendor/mimalloc/src/prim/readme.md +9 -0
  315. package/vendor/mimalloc/src/prim/unix/prim.c +934 -0
  316. package/vendor/mimalloc/src/prim/wasi/prim.c +284 -0
  317. package/vendor/mimalloc/src/prim/windows/etw-mimalloc.wprp +61 -0
  318. package/vendor/mimalloc/src/prim/windows/etw.h +905 -0
  319. package/vendor/mimalloc/src/prim/windows/etw.man +0 -0
  320. package/vendor/mimalloc/src/prim/windows/prim.c +878 -0
  321. package/vendor/mimalloc/src/prim/windows/readme.md +17 -0
  322. package/vendor/mimalloc/src/random.c +258 -0
  323. package/vendor/mimalloc/src/segment-map.c +142 -0
  324. package/vendor/mimalloc/src/segment.c +1702 -0
  325. package/vendor/mimalloc/src/static.c +41 -0
  326. package/vendor/mimalloc/src/stats.c +635 -0
  327. package/vendor/mimalloc/test/CMakeLists.txt +56 -0
  328. package/vendor/mimalloc/test/main-override-dep.cpp +51 -0
  329. package/vendor/mimalloc/test/main-override-dep.h +11 -0
  330. package/vendor/mimalloc/test/main-override-static.c +539 -0
  331. package/vendor/mimalloc/test/main-override.c +36 -0
  332. package/vendor/mimalloc/test/main-override.cpp +497 -0
  333. package/vendor/mimalloc/test/main.c +46 -0
  334. package/vendor/mimalloc/test/readme.md +16 -0
  335. package/vendor/mimalloc/test/test-api-fill.c +343 -0
  336. package/vendor/mimalloc/test/test-api.c +466 -0
  337. package/vendor/mimalloc/test/test-stress.c +428 -0
  338. package/vendor/mimalloc/test/test-wrong.c +92 -0
  339. package/vendor/mimalloc/test/testhelper.h +49 -0
@@ -0,0 +1,456 @@
1
+ import { Environment, Frame, Variable } from "./env";
2
+ import type { AwaitAnalysisResult } from "./evaluator/async/await-analysis-types";
3
+ import { EvaluatorContext } from "./evaluator/context";
4
+ import { Token } from "./token";
5
+ import { StructType, Type } from "./types";
6
+ import { ModuleValue, Value } from "./value";
7
+ import { ValueTag } from "./value-tag";
8
+ export type Path = string[];
9
+ export type PathCollection = Path[];
10
+ export declare function pathContainsPath(path1: Path, path2: Path): boolean;
11
+ export declare function pathCollectionConflictsWithPathCollection(collection1: PathCollection, collection2: PathCollection): boolean;
12
+ export declare function pathConflictsWithPath(path1: Path, path2: Path): boolean;
13
+ export declare enum ExprTag {
14
+ Atom = "Atom",
15
+ FuncCall = "FuncCall"
16
+ }
17
+ export interface RuntimeDestructuring {
18
+ label: string;
19
+ type: Type;
20
+ variableName: string;
21
+ }
22
+ export type ControlFlowKind = "return" | "break" | "continue";
23
+ export interface EvaluatedExprData {
24
+ env: Environment;
25
+ type: Type;
26
+ value?: Value;
27
+ convertedRuntimeType?: Type;
28
+ variableName?: string;
29
+ originType?: Type;
30
+ isAccessingProperty?: boolean;
31
+ pathCollection: PathCollection;
32
+ runtimeArgExprsInOrder?: Expr[];
33
+ runtimeDestructurings?: RuntimeDestructuring[];
34
+ controlFlow?: ControlFlowKind;
35
+ dynCallModuleValues?: ModuleValue[];
36
+ caseExecuted?: boolean;
37
+ comment?: string;
38
+ deferredDupExpressions?: Expr[];
39
+ deferredDropExpressions?: Expr[];
40
+ asyncStackSize?: Expr;
41
+ asyncStateMachineStructName?: string;
42
+ captureType?: StructType;
43
+ awaitAnalysis?: AwaitAnalysisResult;
44
+ closureFunctionValue?: Value & {
45
+ tag: ValueTag.Function;
46
+ };
47
+ macroExpansion?: Expr;
48
+ poppedEnvFrame?: Frame;
49
+ originalExpr?: Expr;
50
+ }
51
+ export type AtomExpr = {
52
+ tag: ExprTag.Atom;
53
+ token: Token;
54
+ $?: EvaluatedExprData | undefined;
55
+ };
56
+ export type FuncCallExpr = {
57
+ tag: ExprTag.FuncCall;
58
+ func: Expr;
59
+ args: Expr[];
60
+ isInfix?: boolean;
61
+ token: Token;
62
+ $?: EvaluatedExprData | undefined;
63
+ };
64
+ export declare function cloneExpr(expr: Expr): Expr;
65
+ export type Expr = AtomExpr | FuncCallExpr;
66
+ export declare function exprIsFunctionCall(expr: Expr | undefined): expr is FuncCallExpr;
67
+ export declare function exprIsAtom(expr: Expr | undefined): expr is AtomExpr;
68
+ export declare function exprIsAtomOf(expr: Expr, values: string | string[]): boolean;
69
+ export declare function exprIsAtomAndOperator(expr: Expr): boolean;
70
+ export declare function exprIsFunctionCallOf(expr: Expr, funcNames: string | string[], argumentCount?: number): boolean;
71
+ export declare function expectExprToBeFunctionCallOf(expr: Expr, expectedFunctionName: string | string[], expectedArgCount?: number): void;
72
+ export declare function expectExprToHaveBeenEvaluated(expr: Expr, errorMessage?: string): EvaluatedExprData;
73
+ export declare function exprsAreEqual(expr1: Expr, expr2: Expr): boolean;
74
+ export declare const BuiltinKeywords: {
75
+ compt: string[];
76
+ ref: string[];
77
+ forall: string[];
78
+ where: string[];
79
+ quote: string[];
80
+ unquote: string[];
81
+ unquote_splicing: string[];
82
+ return: string[];
83
+ recur: string[];
84
+ fn: string[];
85
+ unsafe_fn: string[];
86
+ extern: string[];
87
+ cond: string[];
88
+ type: string[];
89
+ match: string[];
90
+ test: string[];
91
+ struct: string[];
92
+ object: string[];
93
+ newtype: string[];
94
+ enum: string[];
95
+ union: string[];
96
+ module: string[];
97
+ impl: string[];
98
+ Impl: string[];
99
+ begin: string[];
100
+ module_begin: string[];
101
+ import: string[];
102
+ export: string[];
103
+ open: string[];
104
+ clone: string[];
105
+ break: string[];
106
+ continue: string[];
107
+ while: string[];
108
+ if: string[];
109
+ op_and: string[];
110
+ op_or: string[];
111
+ not: string[];
112
+ gensym: string[];
113
+ dyn: string[];
114
+ Dyn: string[];
115
+ Fn: string[];
116
+ c_include: string[];
117
+ undefined: string[];
118
+ null: string[];
119
+ true: string[];
120
+ false: string[];
121
+ unique: string[];
122
+ Ptr: string[];
123
+ Iso: string[];
124
+ Tuple: string[];
125
+ Array: string[];
126
+ Slice: string[];
127
+ Future: string[];
128
+ Concrete: string[];
129
+ Type: string[];
130
+ Module: string[];
131
+ ComptList: string[];
132
+ tuple: string;
133
+ array: string;
134
+ compt_list: string;
135
+ };
136
+ export declare const BuiltinFunctions: {
137
+ compt_expect_error: string[];
138
+ compt_assert: string[];
139
+ compt_print: string[];
140
+ va_start: string[];
141
+ typeof: string[];
142
+ sizeof: string[];
143
+ alignof: string[];
144
+ consume: string[];
145
+ macro_expand: string[];
146
+ as: string[];
147
+ the: string[];
148
+ do: string[];
149
+ rc: string;
150
+ async: string[];
151
+ await: string[];
152
+ __yo_thread_set_maximum_threads: string[];
153
+ __yo_ptr_add: string[];
154
+ __yo_ptr_sub: string[];
155
+ __yo_ptr_diff: string[];
156
+ __yo_ptr_eq: string[];
157
+ __yo_ptr_neq: string[];
158
+ __yo_ptr_lt: string[];
159
+ __yo_ptr_lte: string[];
160
+ __yo_ptr_gt: string[];
161
+ __yo_ptr_gte: string[];
162
+ __yo_address_of: string[];
163
+ __yo_ptr_deref: string[];
164
+ __yo_ptr_set: string[];
165
+ __yo_slice_len: string[];
166
+ __yo_as: string[];
167
+ __yo_expr_is_atom: string[];
168
+ __yo_expr_is_fn_call: string[];
169
+ __yo_expr_get_callee: string[];
170
+ __yo_expr_get_args: string[];
171
+ __yo_expr_to_string: string[];
172
+ __yo_expr_eq: string[];
173
+ __yo_compt_list_car: string[];
174
+ __yo_compt_list_cdr: string[];
175
+ __yo_compt_list_cons: string[];
176
+ __yo_compt_list_append: string[];
177
+ __yo_compt_list_length: string[];
178
+ __yo_compt_list_element_type: string[];
179
+ __yo_compt_int_add: string[];
180
+ __yo_compt_int_sub: string[];
181
+ __yo_compt_int_mul: string[];
182
+ __yo_compt_int_div: string[];
183
+ __yo_compt_int_mod: string[];
184
+ __yo_compt_int_eq: string[];
185
+ __yo_compt_int_neq: string[];
186
+ __yo_compt_int_lt: string[];
187
+ __yo_compt_int_lte: string[];
188
+ __yo_compt_int_gt: string[];
189
+ __yo_compt_int_gte: string[];
190
+ __yo_compt_int_as: string[];
191
+ __yo_compt_int_neg: string[];
192
+ __yo_compt_int_to_float: string[];
193
+ __yo_compt_int_to_string: string[];
194
+ __yo_compt_float_add: string[];
195
+ __yo_compt_float_sub: string[];
196
+ __yo_compt_float_mul: string[];
197
+ __yo_compt_float_div: string[];
198
+ __yo_compt_float_eq: string[];
199
+ __yo_compt_float_neq: string[];
200
+ __yo_compt_float_lt: string[];
201
+ __yo_compt_float_lte: string[];
202
+ __yo_compt_float_gt: string[];
203
+ __yo_compt_float_gte: string[];
204
+ __yo_compt_float_as: string[];
205
+ __yo_compt_float_neg: string[];
206
+ __yo_compt_float_to_int: string[];
207
+ __yo_compt_float_to_string: string[];
208
+ __yo_u8_add: string[];
209
+ __yo_u8_sub: string[];
210
+ __yo_u8_mul: string[];
211
+ __yo_u8_div: string[];
212
+ __yo_u8_mod: string[];
213
+ __yo_u8_eq: string[];
214
+ __yo_u8_neq: string[];
215
+ __yo_u8_lt: string[];
216
+ __yo_u8_lte: string[];
217
+ __yo_u8_gt: string[];
218
+ __yo_u8_gte: string[];
219
+ __yo_u8_neg: string[];
220
+ __yo_u8_to_string: string[];
221
+ __yo_u8_as: string[];
222
+ __yo_i8_add: string[];
223
+ __yo_i8_sub: string[];
224
+ __yo_i8_mul: string[];
225
+ __yo_i8_div: string[];
226
+ __yo_i8_mod: string[];
227
+ __yo_i8_eq: string[];
228
+ __yo_i8_neq: string[];
229
+ __yo_i8_lt: string[];
230
+ __yo_i8_lte: string[];
231
+ __yo_i8_gt: string[];
232
+ __yo_i8_gte: string[];
233
+ __yo_i8_neg: string[];
234
+ __yo_i8_to_string: string[];
235
+ __yo_i8_as: string[];
236
+ __yo_u16_add: string[];
237
+ __yo_u16_sub: string[];
238
+ __yo_u16_mul: string[];
239
+ __yo_u16_div: string[];
240
+ __yo_u16_mod: string[];
241
+ __yo_u16_eq: string[];
242
+ __yo_u16_neq: string[];
243
+ __yo_u16_lt: string[];
244
+ __yo_u16_lte: string[];
245
+ __yo_u16_gt: string[];
246
+ __yo_u16_gte: string[];
247
+ __yo_u16_neg: string[];
248
+ __yo_u16_to_string: string[];
249
+ __yo_u16_as: string[];
250
+ __yo_i16_add: string[];
251
+ __yo_i16_sub: string[];
252
+ __yo_i16_mul: string[];
253
+ __yo_i16_div: string[];
254
+ __yo_i16_mod: string[];
255
+ __yo_i16_eq: string[];
256
+ __yo_i16_neq: string[];
257
+ __yo_i16_lt: string[];
258
+ __yo_i16_lte: string[];
259
+ __yo_i16_gt: string[];
260
+ __yo_i16_gte: string[];
261
+ __yo_i16_neg: string[];
262
+ __yo_i16_to_string: string[];
263
+ __yo_i16_as: string[];
264
+ __yo_u32_add: string[];
265
+ __yo_u32_sub: string[];
266
+ __yo_u32_mul: string[];
267
+ __yo_u32_div: string[];
268
+ __yo_u32_mod: string[];
269
+ __yo_u32_eq: string[];
270
+ __yo_u32_neq: string[];
271
+ __yo_u32_lt: string[];
272
+ __yo_u32_lte: string[];
273
+ __yo_u32_gt: string[];
274
+ __yo_u32_gte: string[];
275
+ __yo_u32_neg: string[];
276
+ __yo_u32_to_string: string[];
277
+ __yo_u32_as: string[];
278
+ __yo_i32_add: string[];
279
+ __yo_i32_sub: string[];
280
+ __yo_i32_mul: string[];
281
+ __yo_i32_div: string[];
282
+ __yo_i32_mod: string[];
283
+ __yo_i32_eq: string[];
284
+ __yo_i32_neq: string[];
285
+ __yo_i32_lt: string[];
286
+ __yo_i32_lte: string[];
287
+ __yo_i32_gt: string[];
288
+ __yo_i32_gte: string[];
289
+ __yo_i32_neg: string[];
290
+ __yo_i32_to_string: string[];
291
+ __yo_i32_as: string[];
292
+ __yo_u64_add: string[];
293
+ __yo_u64_sub: string[];
294
+ __yo_u64_mul: string[];
295
+ __yo_u64_div: string[];
296
+ __yo_u64_mod: string[];
297
+ __yo_u64_eq: string[];
298
+ __yo_u64_neq: string[];
299
+ __yo_u64_lt: string[];
300
+ __yo_u64_lte: string[];
301
+ __yo_u64_gt: string[];
302
+ __yo_u64_gte: string[];
303
+ __yo_u64_neg: string[];
304
+ __yo_u64_to_string: string[];
305
+ __yo_u64_as: string[];
306
+ __yo_i64_add: string[];
307
+ __yo_i64_sub: string[];
308
+ __yo_i64_mul: string[];
309
+ __yo_i64_div: string[];
310
+ __yo_i64_mod: string[];
311
+ __yo_i64_eq: string[];
312
+ __yo_i64_neq: string[];
313
+ __yo_i64_lt: string[];
314
+ __yo_i64_lte: string[];
315
+ __yo_i64_gt: string[];
316
+ __yo_i64_gte: string[];
317
+ __yo_i64_neg: string[];
318
+ __yo_i64_to_string: string[];
319
+ __yo_i64_as: string[];
320
+ __yo_usize_add: string[];
321
+ __yo_usize_sub: string[];
322
+ __yo_usize_mul: string[];
323
+ __yo_usize_div: string[];
324
+ __yo_usize_mod: string[];
325
+ __yo_usize_eq: string[];
326
+ __yo_usize_neq: string[];
327
+ __yo_usize_lt: string[];
328
+ __yo_usize_lte: string[];
329
+ __yo_usize_gt: string[];
330
+ __yo_usize_gte: string[];
331
+ __yo_usize_neg: string[];
332
+ __yo_usize_to_string: string[];
333
+ __yo_usize_as: string[];
334
+ __yo_isize_add: string[];
335
+ __yo_isize_sub: string[];
336
+ __yo_isize_mul: string[];
337
+ __yo_isize_div: string[];
338
+ __yo_isize_mod: string[];
339
+ __yo_isize_eq: string[];
340
+ __yo_isize_neq: string[];
341
+ __yo_isize_lt: string[];
342
+ __yo_isize_lte: string[];
343
+ __yo_isize_gt: string[];
344
+ __yo_isize_gte: string[];
345
+ __yo_isize_neg: string[];
346
+ __yo_isize_to_string: string[];
347
+ __yo_isize_as: string[];
348
+ __yo_f32_add: string[];
349
+ __yo_f32_sub: string[];
350
+ __yo_f32_mul: string[];
351
+ __yo_f32_div: string[];
352
+ __yo_f32_eq: string[];
353
+ __yo_f32_neq: string[];
354
+ __yo_f32_lt: string[];
355
+ __yo_f32_lte: string[];
356
+ __yo_f32_gt: string[];
357
+ __yo_f32_gte: string[];
358
+ __yo_f32_neg: string[];
359
+ __yo_f32_to_string: string[];
360
+ __yo_f32_as: string[];
361
+ __yo_f64_add: string[];
362
+ __yo_f64_sub: string[];
363
+ __yo_f64_mul: string[];
364
+ __yo_f64_div: string[];
365
+ __yo_f64_eq: string[];
366
+ __yo_f64_neq: string[];
367
+ __yo_f64_lt: string[];
368
+ __yo_f64_lte: string[];
369
+ __yo_f64_gt: string[];
370
+ __yo_f64_gte: string[];
371
+ __yo_f64_neg: string[];
372
+ __yo_f64_to_string: string[];
373
+ __yo_f64_as: string[];
374
+ __yo_compt_boolean_and: string[];
375
+ __yo_compt_boolean_or: string[];
376
+ __yo_compt_boolean_eq: string[];
377
+ __yo_compt_boolean_neq: string[];
378
+ __yo_compt_boolean_not: string[];
379
+ __yo_compt_boolean_to_string: string[];
380
+ __yo_compt_string_concat: string[];
381
+ __yo_compt_string_eq: string[];
382
+ __yo_compt_string_neq: string[];
383
+ __yo_compt_string_lt: string[];
384
+ __yo_compt_string_lte: string[];
385
+ __yo_compt_string_gt: string[];
386
+ __yo_compt_string_gte: string[];
387
+ __yo_compt_string_length: string[];
388
+ __yo_compt_string_to_upper: string[];
389
+ __yo_compt_string_to_lower: string[];
390
+ __yo_compt_string_slice: string[];
391
+ __yo_type_to_string: string[];
392
+ __yo_type_contains_gc_type: string[];
393
+ __yo_type_can_form_gc_cycle: string[];
394
+ __yo_are_types_compatible: string[];
395
+ __yo_type_impls: string[];
396
+ __yo_var_print_info: string[];
397
+ __yo_var_is_owning_the_gc_value: string[];
398
+ __yo_var_has_other_aliases: string[];
399
+ __yo_op_add: string[];
400
+ __yo_op_sub: string[];
401
+ __yo_op_mul: string[];
402
+ __yo_op_div: string[];
403
+ __yo_op_mod: string[];
404
+ __yo_op_neg: string[];
405
+ __yo_op_eq: string[];
406
+ __yo_op_neq: string[];
407
+ __yo_op_lt: string[];
408
+ __yo_op_lte: string[];
409
+ __yo_op_gt: string[];
410
+ __yo_op_gte: string[];
411
+ __yo_op_not: string[];
412
+ __yo_op_bit_and: string[];
413
+ __yo_op_bit_or: string[];
414
+ __yo_op_bit_xor: string[];
415
+ __yo_op_bit_complement: string[];
416
+ __yo_op_bit_left_shift: string[];
417
+ __yo_op_bit_right_shift: string[];
418
+ c_include: string[];
419
+ panic: string[];
420
+ __yo_decr_rc: string[];
421
+ __yo_incr_rc: string[];
422
+ __yo_decr_rc_atomic: string[];
423
+ __yo_incr_rc_atomic: string[];
424
+ __yo_rc_own: string[];
425
+ __yo_iso_extract: string[];
426
+ __yo_iso_dispose: string[];
427
+ __yo_gc_collect: string[];
428
+ __yo_dyn_drop: string[];
429
+ __yo_dyn_dup: string[];
430
+ __yo_sometype_drop: string[];
431
+ __yo_sometype_dup: string[];
432
+ ___drop: string[];
433
+ ___dispose: string[];
434
+ ___dup: string[];
435
+ dispose: string[];
436
+ __yo_noop: string[];
437
+ __yo_return_self: string[];
438
+ __yo_ms_sleep: string[];
439
+ };
440
+ export declare function exprIsInfixOperatorFunctionCall(expr: Expr): boolean;
441
+ export interface ExprToStringConfig {
442
+ prettyPrint?: boolean;
443
+ indentSize?: number;
444
+ maxLineLength?: number;
445
+ indentLevel?: number;
446
+ }
447
+ export declare function exprToString(expr: Expr, config?: ExprToStringConfig): string;
448
+ export declare function attachTempVariableToExpr(expr: Expr, isOwningTheGcValue: boolean, isOwningTheSameGcValueAs?: Variable): void;
449
+ export declare function mergeAndCheckEnvs(env: Environment, bodies: Expr[]): Environment;
450
+ export declare function replaceFuncCallExprWithFuncCallExpr(funcExpr: FuncCallExpr, newFuncExpr: FuncCallExpr): void;
451
+ export declare function replaceFuncCallExprWithAtomExpr(funcExpr: FuncCallExpr, newAtomExpr: AtomExpr): void;
452
+ export declare function replaceExprWithFuncCallExpr(expr: Expr, newFuncExpr: FuncCallExpr): void;
453
+ export declare function replaceExprWithAtomExpr(expr: Expr, newAtomExpr: AtomExpr): void;
454
+ export declare function setExprAsConsumed(expr: Expr, env: Environment, allowConsumeAgain?: boolean): Environment;
455
+ export declare function setExprAsNeedsToCallDup(expr: Expr, context: EvaluatorContext): void;
456
+ export declare function requireExprNotConsumed(expr: Expr, env: Environment): void;
@@ -0,0 +1,42 @@
1
+ import { Environment } from "./env";
2
+ import { CapturedVariableInfo } from "./evaluator/context";
3
+ import { Expr } from "./expr";
4
+ import { FnModuleType, FunctionType, Type } from "./types";
5
+ import type { Value } from "./value";
6
+ import { ValueTag } from "./value-tag";
7
+ export type FuncValueId = string;
8
+ export interface CalledComptFunctionCache {
9
+ funcId: FuncValueId;
10
+ argValues: Value[];
11
+ env: Environment;
12
+ value: Value;
13
+ body: Expr;
14
+ }
15
+ export interface SpecializedFunctionCache {
16
+ funcId: FuncValueId;
17
+ env: Environment;
18
+ compileTimeArgValues: Value[];
19
+ runtimeParameterTypes: Type[];
20
+ specializedFunction: FunctionValue;
21
+ }
22
+ export type FunctionValue = {
23
+ tag: ValueTag.Function;
24
+ type: FunctionType;
25
+ specializedType?: FunctionType;
26
+ frameLevel: number;
27
+ body: Expr;
28
+ cpsTransformedBody?: Expr;
29
+ funcName?: string;
30
+ funcId: FuncValueId;
31
+ calledComptFunctionCaches: CalledComptFunctionCache[];
32
+ specializedFunctionCaches: SpecializedFunctionCache[];
33
+ closureInfo?: ClosureInfo;
34
+ };
35
+ export interface FunctionCapturedVariableInfo extends CapturedVariableInfo {
36
+ value: Value | undefined;
37
+ type: Type;
38
+ }
39
+ export interface ClosureInfo {
40
+ closureType: FnModuleType;
41
+ captureType: Type | undefined;
42
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./evaluator";
2
+ export * from "./lexer";
3
+ export * from "./parser";
4
+ export * from "./token";
@@ -0,0 +1,2 @@
1
+ import { Token } from "./token";
2
+ export declare function tokenize(input: string, modulePath: string): Token[];
@@ -0,0 +1 @@
1
+ export declare function debug(...args: unknown[]): void;
@@ -0,0 +1,30 @@
1
+ import Evaluator from "./evaluator/index";
2
+ import { ModuleValue } from "./value";
3
+ export declare class ModuleManager {
4
+ modules: Map<string, {
5
+ moduleValue: ModuleValue;
6
+ moduleError: Error | undefined;
7
+ evaluator: Evaluator;
8
+ }>;
9
+ private dependencies;
10
+ private dependents;
11
+ stdPath: string;
12
+ private codeGenratorC;
13
+ constructor();
14
+ private addDependency;
15
+ private getDependentModules;
16
+ private clearDependencies;
17
+ loadModule(modulePath: string, inputString?: string, parentModule?: string): {
18
+ moduleValue: ModuleValue;
19
+ moduleError: Error | undefined;
20
+ };
21
+ deleteModule(modulePath: string): void;
22
+ compileModule(modulePath: string, { emitC, debugGc, debugParallelism, debugAsyncAwait, allocator, }?: {
23
+ emitC?: boolean;
24
+ debugGc?: boolean;
25
+ debugParallelism?: boolean;
26
+ debugAsyncAwait?: boolean;
27
+ allocator?: "mimalloc" | "libc";
28
+ }): void;
29
+ getGeneratedCode(): string;
30
+ }
@@ -0,0 +1,4 @@
1
+ export declare function isUpperCamelCase(name: string): boolean;
2
+ export declare function isLowerCamelCase(name: string): boolean;
3
+ export declare function isSnakeCase(name: string): boolean;
4
+ export declare function isScreamingSnakeCase(name: string): boolean;
@@ -0,0 +1,33 @@
1
+ import { Expr } from "./expr";
2
+ import { Token } from "./token";
3
+ export default class Parser {
4
+ private inputString;
5
+ private modulePath;
6
+ private tokens;
7
+ private program;
8
+ private parserError;
9
+ constructor({ modulePath, inputString, }: {
10
+ modulePath: string;
11
+ inputString: string;
12
+ });
13
+ private skipWhitespace;
14
+ private skipWhitespaceBackward;
15
+ private isParenthesizedExpression;
16
+ private parseParenExpr;
17
+ private parseArrayExpr;
18
+ private parseCurlyBracketExpr;
19
+ private parsePrimary;
20
+ private isOperatorAtLineStart;
21
+ private parseLeftAssociativeOperator;
22
+ private getExprMinimumColumnNumber;
23
+ private parsePrimaryEnd;
24
+ private parseFunctionArguments;
25
+ private parseFunctionCall;
26
+ private parseExpression;
27
+ programToString(): string;
28
+ private parse;
29
+ getProgram(): Expr[];
30
+ getParserError(): Error | undefined;
31
+ getTokens(): Token[];
32
+ }
33
+ export declare function generateExprFromCode(code: string): Expr;
@@ -0,0 +1,30 @@
1
+ import { Expr } from "./expr";
2
+ export interface TestDeclaration {
3
+ name: string;
4
+ bodyExpr: Expr;
5
+ filePath: string;
6
+ lineNumber: number;
7
+ }
8
+ export interface TestResult {
9
+ testName: string;
10
+ filePath: string;
11
+ passed: boolean;
12
+ errorMessage?: string;
13
+ duration: number;
14
+ }
15
+ export interface TestRunSummary {
16
+ totalTests: number;
17
+ passed: number;
18
+ failed: number;
19
+ results: TestResult[];
20
+ duration: number;
21
+ }
22
+ export declare function findTestFiles(targetPath: string): string[];
23
+ export declare function extractTests(filePath: string): TestDeclaration[];
24
+ export declare function runTests(testFiles: string[], options?: {
25
+ cCompiler?: string;
26
+ verbose?: boolean;
27
+ bail?: boolean;
28
+ testNamePattern?: string;
29
+ parallel?: number;
30
+ }): Promise<TestRunSummary>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
File without changes
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,40 @@
1
+ export declare enum TokenType {
2
+ Operator = "operator",
3
+ Dot = ".",
4
+ LParen = "(",
5
+ RParen = ")",
6
+ LBracket = "[",
7
+ RBracket = "]",
8
+ LCurlyBracket = "{",
9
+ RCurlyBracket = "}",
10
+ Char = "char",
11
+ String = "string",
12
+ Identifier = "identifier",
13
+ Integer = "integer",
14
+ Float = "float",
15
+ Bool = "bool",
16
+ Semicolon = ";",
17
+ Comma = ",",
18
+ SingleLineComment = "single_line_comment",
19
+ MultiLineComment = "multi_line_comment",
20
+ Whitespace = "whitespace",
21
+ BacktickIdentifier = "backtick_identifier"
22
+ }
23
+ export interface Token {
24
+ modulePath: string;
25
+ inputString: string;
26
+ type: TokenType;
27
+ value: string;
28
+ position: {
29
+ row: number;
30
+ column: number;
31
+ character: number;
32
+ };
33
+ }
34
+ export declare const PlaceholderToken: Token;
35
+ export declare const RAIIToken: Token;
36
+ export declare const Operators: string[];
37
+ export declare function charIsOperator(char: string): boolean;
38
+ export declare function stringIsOperator(str: string): boolean;
39
+ export declare const IdentifierRegex: RegExp;
40
+ export declare function findMatchingBracketTokenIndex(tokens: Token[], index: number): number;
@@ -0,0 +1,7 @@
1
+ import { Type } from "./types";
2
+ import { ValueTag } from "./value-tag";
3
+ export type TypeValue = {
4
+ tag: ValueTag.Type;
5
+ type: Type;
6
+ value: Type;
7
+ };
@@ -0,0 +1,16 @@
1
+ import { Environment } from "../env";
2
+ import { FunctionType, Type } from "./definitions";
3
+ export declare function areTypesCompatible(expected: {
4
+ type: Type;
5
+ env: Environment;
6
+ }, given: {
7
+ type: Type;
8
+ env: Environment;
9
+ }, requireExactMatch?: boolean, visitedPairs?: Set<string>): boolean;
10
+ export declare function areFunctionTypesCompatible(expected: {
11
+ type: FunctionType;
12
+ env: Environment;
13
+ }, given: {
14
+ type: FunctionType;
15
+ env: Environment;
16
+ }, requireExactMatch?: boolean): boolean;