@engine262/engine262 0.0.1-01e9fa95a4e8a1c042efd00492309a2de4998fd0

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 (1271) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +149 -0
  3. package/bin/engine262.js +5 -0
  4. package/declaration/abstract-ops/all.d.mts +39 -0
  5. package/declaration/abstract-ops/all.d.mts.map +1 -0
  6. package/declaration/abstract-ops/arguments-operations.d.mts +14 -0
  7. package/declaration/abstract-ops/arguments-operations.d.mts.map +1 -0
  8. package/declaration/abstract-ops/array-objects.d.mts +20 -0
  9. package/declaration/abstract-ops/array-objects.d.mts.map +1 -0
  10. package/declaration/abstract-ops/arraybuffer-objects.d.mts +43 -0
  11. package/declaration/abstract-ops/arraybuffer-objects.d.mts.map +1 -0
  12. package/declaration/abstract-ops/async-function-operations.d.mts +7 -0
  13. package/declaration/abstract-ops/async-function-operations.d.mts.map +1 -0
  14. package/declaration/abstract-ops/async-generator-objects.d.mts +35 -0
  15. package/declaration/abstract-ops/async-generator-objects.d.mts.map +1 -0
  16. package/declaration/abstract-ops/data-types-and-values.d.mts +6 -0
  17. package/declaration/abstract-ops/data-types-and-values.d.mts.map +1 -0
  18. package/declaration/abstract-ops/dataview-objects.d.mts +20 -0
  19. package/declaration/abstract-ops/dataview-objects.d.mts.map +1 -0
  20. package/declaration/abstract-ops/date-objects.d.mts +57 -0
  21. package/declaration/abstract-ops/date-objects.d.mts.map +1 -0
  22. package/declaration/abstract-ops/disposable-operations.d.mts +19 -0
  23. package/declaration/abstract-ops/disposable-operations.d.mts.map +1 -0
  24. package/declaration/abstract-ops/error-objects.d.mts +8 -0
  25. package/declaration/abstract-ops/error-objects.d.mts.map +1 -0
  26. package/declaration/abstract-ops/execution-contexts.d.mts +3 -0
  27. package/declaration/abstract-ops/execution-contexts.d.mts.map +1 -0
  28. package/declaration/abstract-ops/function-operations.d.mts +101 -0
  29. package/declaration/abstract-ops/function-operations.d.mts.map +1 -0
  30. package/declaration/abstract-ops/generator-operations.d.mts +33 -0
  31. package/declaration/abstract-ops/generator-operations.d.mts.map +1 -0
  32. package/declaration/abstract-ops/global-object.d.mts +11 -0
  33. package/declaration/abstract-ops/global-object.d.mts.map +1 -0
  34. package/declaration/abstract-ops/immutable-prototype-objects.d.mts +7 -0
  35. package/declaration/abstract-ops/immutable-prototype-objects.d.mts.map +1 -0
  36. package/declaration/abstract-ops/import-calls.d.mts +5 -0
  37. package/declaration/abstract-ops/import-calls.d.mts.map +1 -0
  38. package/declaration/abstract-ops/iterator-operations.d.mts +53 -0
  39. package/declaration/abstract-ops/iterator-operations.d.mts.map +1 -0
  40. package/declaration/abstract-ops/keyed-collections.d.mts +4 -0
  41. package/declaration/abstract-ops/keyed-collections.d.mts.map +1 -0
  42. package/declaration/abstract-ops/math.d.mts +23 -0
  43. package/declaration/abstract-ops/math.d.mts.map +1 -0
  44. package/declaration/abstract-ops/module-namespace-exotic-objects.d.mts +13 -0
  45. package/declaration/abstract-ops/module-namespace-exotic-objects.d.mts.map +1 -0
  46. package/declaration/abstract-ops/module-records.d.mts +64 -0
  47. package/declaration/abstract-ops/module-records.d.mts.map +1 -0
  48. package/declaration/abstract-ops/notational-conventions.d.mts +19 -0
  49. package/declaration/abstract-ops/notational-conventions.d.mts.map +1 -0
  50. package/declaration/abstract-ops/object-operations.d.mts +79 -0
  51. package/declaration/abstract-ops/object-operations.d.mts.map +1 -0
  52. package/declaration/abstract-ops/objects.d.mts +32 -0
  53. package/declaration/abstract-ops/objects.d.mts.map +1 -0
  54. package/declaration/abstract-ops/private-names.d.mts +15 -0
  55. package/declaration/abstract-ops/private-names.d.mts.map +1 -0
  56. package/declaration/abstract-ops/promise-operations.d.mts +49 -0
  57. package/declaration/abstract-ops/promise-operations.d.mts.map +1 -0
  58. package/declaration/abstract-ops/proxy-objects.d.mts +6 -0
  59. package/declaration/abstract-ops/proxy-objects.d.mts.map +1 -0
  60. package/declaration/abstract-ops/realms.d.mts +181 -0
  61. package/declaration/abstract-ops/realms.d.mts.map +1 -0
  62. package/declaration/abstract-ops/reference-operations.d.mts +28 -0
  63. package/declaration/abstract-ops/reference-operations.d.mts.map +1 -0
  64. package/declaration/abstract-ops/regexp-objects.d.mts +28 -0
  65. package/declaration/abstract-ops/regexp-objects.d.mts.map +1 -0
  66. package/declaration/abstract-ops/shadow-realm.d.mts +26 -0
  67. package/declaration/abstract-ops/shadow-realm.d.mts.map +1 -0
  68. package/declaration/abstract-ops/shared-arraybuffer.d.mts +4 -0
  69. package/declaration/abstract-ops/shared-arraybuffer.d.mts.map +1 -0
  70. package/declaration/abstract-ops/spec-types.d.mts +53 -0
  71. package/declaration/abstract-ops/spec-types.d.mts.map +1 -0
  72. package/declaration/abstract-ops/string-objects.d.mts +8 -0
  73. package/declaration/abstract-ops/string-objects.d.mts.map +1 -0
  74. package/declaration/abstract-ops/symbol-objects.d.mts +11 -0
  75. package/declaration/abstract-ops/symbol-objects.d.mts.map +1 -0
  76. package/declaration/abstract-ops/temporal/addition.d.mts +62 -0
  77. package/declaration/abstract-ops/temporal/addition.d.mts.map +1 -0
  78. package/declaration/abstract-ops/temporal/all.d.mts +13 -0
  79. package/declaration/abstract-ops/temporal/all.d.mts.map +1 -0
  80. package/declaration/abstract-ops/temporal/calendar.d.mts +203 -0
  81. package/declaration/abstract-ops/temporal/calendar.d.mts.map +1 -0
  82. package/declaration/abstract-ops/temporal/duration.d.mts +126 -0
  83. package/declaration/abstract-ops/temporal/duration.d.mts.map +1 -0
  84. package/declaration/abstract-ops/temporal/instant.d.mts +25 -0
  85. package/declaration/abstract-ops/temporal/instant.d.mts.map +1 -0
  86. package/declaration/abstract-ops/temporal/not-implemented.d.mts +5 -0
  87. package/declaration/abstract-ops/temporal/not-implemented.d.mts.map +1 -0
  88. package/declaration/abstract-ops/temporal/now.d.mts +11 -0
  89. package/declaration/abstract-ops/temporal/now.d.mts.map +1 -0
  90. package/declaration/abstract-ops/temporal/plain-date-time.d.mts +36 -0
  91. package/declaration/abstract-ops/temporal/plain-date-time.d.mts.map +1 -0
  92. package/declaration/abstract-ops/temporal/plain-date.d.mts +32 -0
  93. package/declaration/abstract-ops/temporal/plain-date.d.mts.map +1 -0
  94. package/declaration/abstract-ops/temporal/plain-month-day.d.mts +10 -0
  95. package/declaration/abstract-ops/temporal/plain-month-day.d.mts.map +1 -0
  96. package/declaration/abstract-ops/temporal/plain-time.d.mts +58 -0
  97. package/declaration/abstract-ops/temporal/plain-time.d.mts.map +1 -0
  98. package/declaration/abstract-ops/temporal/plain-year-month.d.mts +19 -0
  99. package/declaration/abstract-ops/temporal/plain-year-month.d.mts.map +1 -0
  100. package/declaration/abstract-ops/temporal/temporal.d.mts +157 -0
  101. package/declaration/abstract-ops/temporal/temporal.d.mts.map +1 -0
  102. package/declaration/abstract-ops/temporal/time-zone.d.mts +26 -0
  103. package/declaration/abstract-ops/temporal/time-zone.d.mts.map +1 -0
  104. package/declaration/abstract-ops/temporal/zoned-datetime.d.mts +28 -0
  105. package/declaration/abstract-ops/temporal/zoned-datetime.d.mts.map +1 -0
  106. package/declaration/abstract-ops/testing-comparison.d.mts +35 -0
  107. package/declaration/abstract-ops/testing-comparison.d.mts.map +1 -0
  108. package/declaration/abstract-ops/type-conversion.d.mts +62 -0
  109. package/declaration/abstract-ops/type-conversion.d.mts.map +1 -0
  110. package/declaration/abstract-ops/typedarray-objects.d.mts +33 -0
  111. package/declaration/abstract-ops/typedarray-objects.d.mts.map +1 -0
  112. package/declaration/abstract-ops/weak-operations.d.mts +4 -0
  113. package/declaration/abstract-ops/weak-operations.d.mts.map +1 -0
  114. package/declaration/api.d.mts +76 -0
  115. package/declaration/api.d.mts.map +1 -0
  116. package/declaration/completion.d.mts +156 -0
  117. package/declaration/completion.d.mts.map +1 -0
  118. package/declaration/ecma402/not-implemented.d.mts +3 -0
  119. package/declaration/ecma402/not-implemented.d.mts.map +1 -0
  120. package/declaration/evaluator.d.mts +61 -0
  121. package/declaration/evaluator.d.mts.map +1 -0
  122. package/declaration/execution-context/Agent.d.mts +75 -0
  123. package/declaration/execution-context/Agent.d.mts.map +1 -0
  124. package/declaration/execution-context/Environment.d.mts +175 -0
  125. package/declaration/execution-context/Environment.d.mts.map +1 -0
  126. package/declaration/execution-context/ExecutionContext.d.mts +48 -0
  127. package/declaration/execution-context/ExecutionContext.d.mts.map +1 -0
  128. package/declaration/execution-context/Job.d.mts +23 -0
  129. package/declaration/execution-context/Job.d.mts.map +1 -0
  130. package/declaration/execution-context/PrivateEnvironment.d.mts +12 -0
  131. package/declaration/execution-context/PrivateEnvironment.d.mts.map +1 -0
  132. package/declaration/execution-context/Realm.d.mts +24 -0
  133. package/declaration/execution-context/Realm.d.mts.map +1 -0
  134. package/declaration/execution-context/WeakReference.d.mts +12 -0
  135. package/declaration/execution-context/WeakReference.d.mts.map +1 -0
  136. package/declaration/execution-context/all.d.mts +8 -0
  137. package/declaration/execution-context/all.d.mts.map +1 -0
  138. package/declaration/host-defined/base64.d.mts +10 -0
  139. package/declaration/host-defined/base64.d.mts.map +1 -0
  140. package/declaration/host-defined/debugger-util.d.mts +2 -0
  141. package/declaration/host-defined/debugger-util.d.mts.map +1 -0
  142. package/declaration/host-defined/decimal.d.mts +29 -0
  143. package/declaration/host-defined/decimal.d.mts.map +1 -0
  144. package/declaration/host-defined/devtoolsEval.d.mts +3 -0
  145. package/declaration/host-defined/devtoolsEval.d.mts.map +1 -0
  146. package/declaration/host-defined/engine.d.mts +133 -0
  147. package/declaration/host-defined/engine.d.mts.map +1 -0
  148. package/declaration/host-defined/error-messages.d.mts +45 -0
  149. package/declaration/host-defined/error-messages.d.mts.map +1 -0
  150. package/declaration/host-defined/event-loop.d.mts +92 -0
  151. package/declaration/host-defined/event-loop.d.mts.map +1 -0
  152. package/declaration/host-defined/ieee754.d.mts +7 -0
  153. package/declaration/host-defined/ieee754.d.mts.map +1 -0
  154. package/declaration/host-defined/inspect.d.mts +4 -0
  155. package/declaration/host-defined/inspect.d.mts.map +1 -0
  156. package/declaration/host-defined/job-queue.d.mts +42 -0
  157. package/declaration/host-defined/job-queue.d.mts.map +1 -0
  158. package/declaration/host-defined/sort.d.mts +14 -0
  159. package/declaration/host-defined/sort.d.mts.map +1 -0
  160. package/declaration/host-defined/test262-intrinsics.d.mts +8 -0
  161. package/declaration/host-defined/test262-intrinsics.d.mts.map +1 -0
  162. package/declaration/index.d.mts +56 -0
  163. package/declaration/index.d.mts.map +1 -0
  164. package/declaration/intrinsics/AbstractModuleSource.d.mts +5 -0
  165. package/declaration/intrinsics/AbstractModuleSource.d.mts.map +1 -0
  166. package/declaration/intrinsics/AggregateError.d.mts +3 -0
  167. package/declaration/intrinsics/AggregateError.d.mts.map +1 -0
  168. package/declaration/intrinsics/AggregateErrorPrototype.d.mts +3 -0
  169. package/declaration/intrinsics/AggregateErrorPrototype.d.mts.map +1 -0
  170. package/declaration/intrinsics/Array.d.mts +3 -0
  171. package/declaration/intrinsics/Array.d.mts.map +1 -0
  172. package/declaration/intrinsics/ArrayBuffer.d.mts +3 -0
  173. package/declaration/intrinsics/ArrayBuffer.d.mts.map +1 -0
  174. package/declaration/intrinsics/ArrayBufferPrototype.d.mts +3 -0
  175. package/declaration/intrinsics/ArrayBufferPrototype.d.mts.map +1 -0
  176. package/declaration/intrinsics/ArrayIteratorPrototype.d.mts +3 -0
  177. package/declaration/intrinsics/ArrayIteratorPrototype.d.mts.map +1 -0
  178. package/declaration/intrinsics/ArrayPrototype.d.mts +3 -0
  179. package/declaration/intrinsics/ArrayPrototype.d.mts.map +1 -0
  180. package/declaration/intrinsics/ArrayPrototypeShared.d.mts +8 -0
  181. package/declaration/intrinsics/ArrayPrototypeShared.d.mts.map +1 -0
  182. package/declaration/intrinsics/AsyncDisposableStack.d.mts +8 -0
  183. package/declaration/intrinsics/AsyncDisposableStack.d.mts.map +1 -0
  184. package/declaration/intrinsics/AsyncDisposableStackPrototype.d.mts +3 -0
  185. package/declaration/intrinsics/AsyncDisposableStackPrototype.d.mts.map +1 -0
  186. package/declaration/intrinsics/AsyncFromSyncIteratorPrototype.d.mts +6 -0
  187. package/declaration/intrinsics/AsyncFromSyncIteratorPrototype.d.mts.map +1 -0
  188. package/declaration/intrinsics/AsyncFunction.d.mts +3 -0
  189. package/declaration/intrinsics/AsyncFunction.d.mts.map +1 -0
  190. package/declaration/intrinsics/AsyncFunctionPrototype.d.mts +3 -0
  191. package/declaration/intrinsics/AsyncFunctionPrototype.d.mts.map +1 -0
  192. package/declaration/intrinsics/AsyncGeneratorFunction.d.mts +3 -0
  193. package/declaration/intrinsics/AsyncGeneratorFunction.d.mts.map +1 -0
  194. package/declaration/intrinsics/AsyncGeneratorFunctionPrototype.d.mts +3 -0
  195. package/declaration/intrinsics/AsyncGeneratorFunctionPrototype.d.mts.map +1 -0
  196. package/declaration/intrinsics/AsyncGeneratorFunctionPrototypePrototype.d.mts +3 -0
  197. package/declaration/intrinsics/AsyncGeneratorFunctionPrototypePrototype.d.mts.map +1 -0
  198. package/declaration/intrinsics/AsyncIteratorPrototype.d.mts +3 -0
  199. package/declaration/intrinsics/AsyncIteratorPrototype.d.mts.map +1 -0
  200. package/declaration/intrinsics/BigInt.d.mts +8 -0
  201. package/declaration/intrinsics/BigInt.d.mts.map +1 -0
  202. package/declaration/intrinsics/BigIntPrototype.d.mts +6 -0
  203. package/declaration/intrinsics/BigIntPrototype.d.mts.map +1 -0
  204. package/declaration/intrinsics/Boolean.d.mts +8 -0
  205. package/declaration/intrinsics/Boolean.d.mts.map +1 -0
  206. package/declaration/intrinsics/BooleanPrototype.d.mts +5 -0
  207. package/declaration/intrinsics/BooleanPrototype.d.mts.map +1 -0
  208. package/declaration/intrinsics/DataView.d.mts +12 -0
  209. package/declaration/intrinsics/DataView.d.mts.map +1 -0
  210. package/declaration/intrinsics/DataViewPrototype.d.mts +3 -0
  211. package/declaration/intrinsics/DataViewPrototype.d.mts.map +1 -0
  212. package/declaration/intrinsics/Date.d.mts +8 -0
  213. package/declaration/intrinsics/Date.d.mts.map +1 -0
  214. package/declaration/intrinsics/DatePrototype.d.mts +12 -0
  215. package/declaration/intrinsics/DatePrototype.d.mts.map +1 -0
  216. package/declaration/intrinsics/DisposableStack.d.mts +8 -0
  217. package/declaration/intrinsics/DisposableStack.d.mts.map +1 -0
  218. package/declaration/intrinsics/DisposableStackPrototype.d.mts +3 -0
  219. package/declaration/intrinsics/DisposableStackPrototype.d.mts.map +1 -0
  220. package/declaration/intrinsics/Error.d.mts +18 -0
  221. package/declaration/intrinsics/Error.d.mts.map +1 -0
  222. package/declaration/intrinsics/ErrorPrototype.d.mts +3 -0
  223. package/declaration/intrinsics/ErrorPrototype.d.mts.map +1 -0
  224. package/declaration/intrinsics/FinalizationRegistry.d.mts +16 -0
  225. package/declaration/intrinsics/FinalizationRegistry.d.mts.map +1 -0
  226. package/declaration/intrinsics/FinalizationRegistryPrototype.d.mts +3 -0
  227. package/declaration/intrinsics/FinalizationRegistryPrototype.d.mts.map +1 -0
  228. package/declaration/intrinsics/ForInIteratorPrototype.d.mts +13 -0
  229. package/declaration/intrinsics/ForInIteratorPrototype.d.mts.map +1 -0
  230. package/declaration/intrinsics/Function.d.mts +3 -0
  231. package/declaration/intrinsics/Function.d.mts.map +1 -0
  232. package/declaration/intrinsics/FunctionPrototype.d.mts +13 -0
  233. package/declaration/intrinsics/FunctionPrototype.d.mts.map +1 -0
  234. package/declaration/intrinsics/GeneratorFunction.d.mts +3 -0
  235. package/declaration/intrinsics/GeneratorFunction.d.mts.map +1 -0
  236. package/declaration/intrinsics/GeneratorFunctionPrototype.d.mts +3 -0
  237. package/declaration/intrinsics/GeneratorFunctionPrototype.d.mts.map +1 -0
  238. package/declaration/intrinsics/GeneratorFunctionPrototypePrototype.d.mts +3 -0
  239. package/declaration/intrinsics/GeneratorFunctionPrototypePrototype.d.mts.map +1 -0
  240. package/declaration/intrinsics/Iterator.d.mts +3 -0
  241. package/declaration/intrinsics/Iterator.d.mts.map +1 -0
  242. package/declaration/intrinsics/IteratorHelperPrototype.d.mts +3 -0
  243. package/declaration/intrinsics/IteratorHelperPrototype.d.mts.map +1 -0
  244. package/declaration/intrinsics/IteratorPrototype.d.mts +3 -0
  245. package/declaration/intrinsics/IteratorPrototype.d.mts.map +1 -0
  246. package/declaration/intrinsics/JSON.d.mts +9 -0
  247. package/declaration/intrinsics/JSON.d.mts.map +1 -0
  248. package/declaration/intrinsics/Map.d.mts +13 -0
  249. package/declaration/intrinsics/Map.d.mts.map +1 -0
  250. package/declaration/intrinsics/MapIteratorPrototype.d.mts +7 -0
  251. package/declaration/intrinsics/MapIteratorPrototype.d.mts.map +1 -0
  252. package/declaration/intrinsics/MapPrototype.d.mts +3 -0
  253. package/declaration/intrinsics/MapPrototype.d.mts.map +1 -0
  254. package/declaration/intrinsics/Math.d.mts +4 -0
  255. package/declaration/intrinsics/Math.d.mts.map +1 -0
  256. package/declaration/intrinsics/NativeError.d.mts +6 -0
  257. package/declaration/intrinsics/NativeError.d.mts.map +1 -0
  258. package/declaration/intrinsics/Number.d.mts +8 -0
  259. package/declaration/intrinsics/Number.d.mts.map +1 -0
  260. package/declaration/intrinsics/NumberPrototype.d.mts +5 -0
  261. package/declaration/intrinsics/NumberPrototype.d.mts.map +1 -0
  262. package/declaration/intrinsics/Object.d.mts +3 -0
  263. package/declaration/intrinsics/Object.d.mts.map +1 -0
  264. package/declaration/intrinsics/ObjectPrototype.d.mts +5 -0
  265. package/declaration/intrinsics/ObjectPrototype.d.mts.map +1 -0
  266. package/declaration/intrinsics/Promise.d.mts +18 -0
  267. package/declaration/intrinsics/Promise.d.mts.map +1 -0
  268. package/declaration/intrinsics/PromisePrototype.d.mts +3 -0
  269. package/declaration/intrinsics/PromisePrototype.d.mts.map +1 -0
  270. package/declaration/intrinsics/Proxy.d.mts +12 -0
  271. package/declaration/intrinsics/Proxy.d.mts.map +1 -0
  272. package/declaration/intrinsics/Reflect.d.mts +3 -0
  273. package/declaration/intrinsics/Reflect.d.mts.map +1 -0
  274. package/declaration/intrinsics/RegExp.d.mts +13 -0
  275. package/declaration/intrinsics/RegExp.d.mts.map +1 -0
  276. package/declaration/intrinsics/RegExpPrototype.d.mts +12 -0
  277. package/declaration/intrinsics/RegExpPrototype.d.mts.map +1 -0
  278. package/declaration/intrinsics/RegExpStringIteratorPrototype.d.mts +7 -0
  279. package/declaration/intrinsics/RegExpStringIteratorPrototype.d.mts.map +1 -0
  280. package/declaration/intrinsics/Set.d.mts +8 -0
  281. package/declaration/intrinsics/Set.d.mts.map +1 -0
  282. package/declaration/intrinsics/SetIteratorPrototype.d.mts +7 -0
  283. package/declaration/intrinsics/SetIteratorPrototype.d.mts.map +1 -0
  284. package/declaration/intrinsics/SetPrototype.d.mts +3 -0
  285. package/declaration/intrinsics/SetPrototype.d.mts.map +1 -0
  286. package/declaration/intrinsics/ShadowRealm.d.mts +8 -0
  287. package/declaration/intrinsics/ShadowRealm.d.mts.map +1 -0
  288. package/declaration/intrinsics/ShadowRealmPrototype.d.mts +3 -0
  289. package/declaration/intrinsics/ShadowRealmPrototype.d.mts.map +1 -0
  290. package/declaration/intrinsics/String.d.mts +10 -0
  291. package/declaration/intrinsics/String.d.mts.map +1 -0
  292. package/declaration/intrinsics/StringIteratorPrototype.d.mts +3 -0
  293. package/declaration/intrinsics/StringIteratorPrototype.d.mts.map +1 -0
  294. package/declaration/intrinsics/StringPrototype.d.mts +6 -0
  295. package/declaration/intrinsics/StringPrototype.d.mts.map +1 -0
  296. package/declaration/intrinsics/SuppressedError.d.mts +3 -0
  297. package/declaration/intrinsics/SuppressedError.d.mts.map +1 -0
  298. package/declaration/intrinsics/SuppressedErrorPrototype.d.mts +3 -0
  299. package/declaration/intrinsics/SuppressedErrorPrototype.d.mts.map +1 -0
  300. package/declaration/intrinsics/Symbol.d.mts +8 -0
  301. package/declaration/intrinsics/Symbol.d.mts.map +1 -0
  302. package/declaration/intrinsics/SymbolPrototype.d.mts +6 -0
  303. package/declaration/intrinsics/SymbolPrototype.d.mts.map +1 -0
  304. package/declaration/intrinsics/Temporal/Duration.d.mts +18 -0
  305. package/declaration/intrinsics/Temporal/Duration.d.mts.map +1 -0
  306. package/declaration/intrinsics/Temporal/DurationPrototype.d.mts +3 -0
  307. package/declaration/intrinsics/Temporal/DurationPrototype.d.mts.map +1 -0
  308. package/declaration/intrinsics/Temporal/Instant.d.mts +9 -0
  309. package/declaration/intrinsics/Temporal/Instant.d.mts.map +1 -0
  310. package/declaration/intrinsics/Temporal/InstantPrototype.d.mts +3 -0
  311. package/declaration/intrinsics/Temporal/InstantPrototype.d.mts.map +1 -0
  312. package/declaration/intrinsics/Temporal/Now.d.mts +3 -0
  313. package/declaration/intrinsics/Temporal/Now.d.mts.map +1 -0
  314. package/declaration/intrinsics/Temporal/PlainDate.d.mts +16 -0
  315. package/declaration/intrinsics/Temporal/PlainDate.d.mts.map +1 -0
  316. package/declaration/intrinsics/Temporal/PlainDatePrototype.d.mts +3 -0
  317. package/declaration/intrinsics/Temporal/PlainDatePrototype.d.mts.map +1 -0
  318. package/declaration/intrinsics/Temporal/PlainDateTime.d.mts +17 -0
  319. package/declaration/intrinsics/Temporal/PlainDateTime.d.mts.map +1 -0
  320. package/declaration/intrinsics/Temporal/PlainDateTimePrototype.d.mts +3 -0
  321. package/declaration/intrinsics/Temporal/PlainDateTimePrototype.d.mts.map +1 -0
  322. package/declaration/intrinsics/Temporal/PlainMonthDay.d.mts +12 -0
  323. package/declaration/intrinsics/Temporal/PlainMonthDay.d.mts.map +1 -0
  324. package/declaration/intrinsics/Temporal/PlainMonthDayPrototype.d.mts +3 -0
  325. package/declaration/intrinsics/Temporal/PlainMonthDayPrototype.d.mts.map +1 -0
  326. package/declaration/intrinsics/Temporal/PlainTime.d.mts +9 -0
  327. package/declaration/intrinsics/Temporal/PlainTime.d.mts.map +1 -0
  328. package/declaration/intrinsics/Temporal/PlainTimePrototype.d.mts +3 -0
  329. package/declaration/intrinsics/Temporal/PlainTimePrototype.d.mts.map +1 -0
  330. package/declaration/intrinsics/Temporal/PlainYearMonth.d.mts +17 -0
  331. package/declaration/intrinsics/Temporal/PlainYearMonth.d.mts.map +1 -0
  332. package/declaration/intrinsics/Temporal/PlainYearMonthPrototype.d.mts +3 -0
  333. package/declaration/intrinsics/Temporal/PlainYearMonthPrototype.d.mts.map +1 -0
  334. package/declaration/intrinsics/Temporal/Temporal.d.mts +3 -0
  335. package/declaration/intrinsics/Temporal/Temporal.d.mts.map +1 -0
  336. package/declaration/intrinsics/Temporal/ZonedDateTime.d.mts +13 -0
  337. package/declaration/intrinsics/Temporal/ZonedDateTime.d.mts.map +1 -0
  338. package/declaration/intrinsics/Temporal/ZonedDateTimePrototype.d.mts +3 -0
  339. package/declaration/intrinsics/Temporal/ZonedDateTimePrototype.d.mts.map +1 -0
  340. package/declaration/intrinsics/ThrowTypeError.d.mts +3 -0
  341. package/declaration/intrinsics/ThrowTypeError.d.mts.map +1 -0
  342. package/declaration/intrinsics/TypedArray.d.mts +196 -0
  343. package/declaration/intrinsics/TypedArray.d.mts.map +1 -0
  344. package/declaration/intrinsics/TypedArrayConstructors.d.mts +3 -0
  345. package/declaration/intrinsics/TypedArrayConstructors.d.mts.map +1 -0
  346. package/declaration/intrinsics/TypedArrayPrototype.d.mts +3 -0
  347. package/declaration/intrinsics/TypedArrayPrototype.d.mts.map +1 -0
  348. package/declaration/intrinsics/TypedArrayPrototypes.d.mts +4 -0
  349. package/declaration/intrinsics/TypedArrayPrototypes.d.mts.map +1 -0
  350. package/declaration/intrinsics/TypedArray_Uint8Array.d.mts +3 -0
  351. package/declaration/intrinsics/TypedArray_Uint8Array.d.mts.map +1 -0
  352. package/declaration/intrinsics/URIHandling.d.mts +3 -0
  353. package/declaration/intrinsics/URIHandling.d.mts.map +1 -0
  354. package/declaration/intrinsics/WeakMap.d.mts +11 -0
  355. package/declaration/intrinsics/WeakMap.d.mts.map +1 -0
  356. package/declaration/intrinsics/WeakMapPrototype.d.mts +3 -0
  357. package/declaration/intrinsics/WeakMapPrototype.d.mts.map +1 -0
  358. package/declaration/intrinsics/WeakRef.d.mts +8 -0
  359. package/declaration/intrinsics/WeakRef.d.mts.map +1 -0
  360. package/declaration/intrinsics/WeakRefPrototype.d.mts +3 -0
  361. package/declaration/intrinsics/WeakRefPrototype.d.mts.map +1 -0
  362. package/declaration/intrinsics/WeakSet.d.mts +8 -0
  363. package/declaration/intrinsics/WeakSet.d.mts.map +1 -0
  364. package/declaration/intrinsics/WeakSetPrototype.d.mts +3 -0
  365. package/declaration/intrinsics/WeakSetPrototype.d.mts.map +1 -0
  366. package/declaration/intrinsics/WrapForValidIteratorPrototype.d.mts +3 -0
  367. package/declaration/intrinsics/WrapForValidIteratorPrototype.d.mts.map +1 -0
  368. package/declaration/intrinsics/bootstrap.d.mts +19 -0
  369. package/declaration/intrinsics/bootstrap.d.mts.map +1 -0
  370. package/declaration/intrinsics/eval.d.mts +3 -0
  371. package/declaration/intrinsics/eval.d.mts.map +1 -0
  372. package/declaration/intrinsics/isFinite.d.mts +3 -0
  373. package/declaration/intrinsics/isFinite.d.mts.map +1 -0
  374. package/declaration/intrinsics/isNaN.d.mts +3 -0
  375. package/declaration/intrinsics/isNaN.d.mts.map +1 -0
  376. package/declaration/intrinsics/parseFloat.d.mts +3 -0
  377. package/declaration/intrinsics/parseFloat.d.mts.map +1 -0
  378. package/declaration/intrinsics/parseInt.d.mts +3 -0
  379. package/declaration/intrinsics/parseInt.d.mts.map +1 -0
  380. package/declaration/modules.d.mts +126 -0
  381. package/declaration/modules.d.mts.map +1 -0
  382. package/declaration/parse.d.mts +35 -0
  383. package/declaration/parse.d.mts.map +1 -0
  384. package/declaration/parser/BaseParser.d.mts +24 -0
  385. package/declaration/parser/BaseParser.d.mts.map +1 -0
  386. package/declaration/parser/ExpressionParser.d.mts +70 -0
  387. package/declaration/parser/ExpressionParser.d.mts.map +1 -0
  388. package/declaration/parser/FunctionParser.d.mts +43 -0
  389. package/declaration/parser/FunctionParser.d.mts.map +1 -0
  390. package/declaration/parser/IdentifierParser.d.mts +12 -0
  391. package/declaration/parser/IdentifierParser.d.mts.map +1 -0
  392. package/declaration/parser/LanguageParser.d.mts +10 -0
  393. package/declaration/parser/LanguageParser.d.mts.map +1 -0
  394. package/declaration/parser/Lexer.d.mts +76 -0
  395. package/declaration/parser/Lexer.d.mts.map +1 -0
  396. package/declaration/parser/ModuleParser.d.mts +19 -0
  397. package/declaration/parser/ModuleParser.d.mts.map +1 -0
  398. package/declaration/parser/ParseNode.d.mts +1323 -0
  399. package/declaration/parser/ParseNode.d.mts.map +1 -0
  400. package/declaration/parser/Parser.d.mts +30 -0
  401. package/declaration/parser/Parser.d.mts.map +1 -0
  402. package/declaration/parser/RegExpParser.d.mts +67 -0
  403. package/declaration/parser/RegExpParser.d.mts.map +1 -0
  404. package/declaration/parser/Scope.d.mts +114 -0
  405. package/declaration/parser/Scope.d.mts.map +1 -0
  406. package/declaration/parser/StatementParser.d.mts +56 -0
  407. package/declaration/parser/StatementParser.d.mts.map +1 -0
  408. package/declaration/parser/TemporalParser.d.mts +211 -0
  409. package/declaration/parser/TemporalParser.d.mts.map +1 -0
  410. package/declaration/parser/tokens.d.mts +31 -0
  411. package/declaration/parser/tokens.d.mts.map +1 -0
  412. package/declaration/parser/utils.d.mts +10 -0
  413. package/declaration/parser/utils.d.mts.map +1 -0
  414. package/declaration/runtime-semantics/AdditiveExpression.d.mts +3 -0
  415. package/declaration/runtime-semantics/AdditiveExpression.d.mts.map +1 -0
  416. package/declaration/runtime-semantics/ApplyStringOrNumericBinaryOperator.d.mts +5 -0
  417. package/declaration/runtime-semantics/ApplyStringOrNumericBinaryOperator.d.mts.map +1 -0
  418. package/declaration/runtime-semantics/ArgumentListEvaluation.d.mts +5 -0
  419. package/declaration/runtime-semantics/ArgumentListEvaluation.d.mts.map +1 -0
  420. package/declaration/runtime-semantics/ArrayLiteral.d.mts +5 -0
  421. package/declaration/runtime-semantics/ArrayLiteral.d.mts.map +1 -0
  422. package/declaration/runtime-semantics/ArrowFunction.d.mts +4 -0
  423. package/declaration/runtime-semantics/ArrowFunction.d.mts.map +1 -0
  424. package/declaration/runtime-semantics/AssignmentExpression.d.mts +8 -0
  425. package/declaration/runtime-semantics/AssignmentExpression.d.mts.map +1 -0
  426. package/declaration/runtime-semantics/AsyncArrowFunction.d.mts +4 -0
  427. package/declaration/runtime-semantics/AsyncArrowFunction.d.mts.map +1 -0
  428. package/declaration/runtime-semantics/AsyncFunctionExpression.d.mts +4 -0
  429. package/declaration/runtime-semantics/AsyncFunctionExpression.d.mts.map +1 -0
  430. package/declaration/runtime-semantics/AsyncGeneratorExpression.d.mts +4 -0
  431. package/declaration/runtime-semantics/AsyncGeneratorExpression.d.mts.map +1 -0
  432. package/declaration/runtime-semantics/AwaitExpression.d.mts +5 -0
  433. package/declaration/runtime-semantics/AwaitExpression.d.mts.map +1 -0
  434. package/declaration/runtime-semantics/BindingInitialization.d.mts +8 -0
  435. package/declaration/runtime-semantics/BindingInitialization.d.mts.map +1 -0
  436. package/declaration/runtime-semantics/BitwiseOperators.d.mts +5 -0
  437. package/declaration/runtime-semantics/BitwiseOperators.d.mts.map +1 -0
  438. package/declaration/runtime-semantics/Block.d.mts +8 -0
  439. package/declaration/runtime-semantics/Block.d.mts.map +1 -0
  440. package/declaration/runtime-semantics/BreakStatement.d.mts +4 -0
  441. package/declaration/runtime-semantics/BreakStatement.d.mts.map +1 -0
  442. package/declaration/runtime-semantics/BreakableStatement.d.mts +4 -0
  443. package/declaration/runtime-semantics/BreakableStatement.d.mts.map +1 -0
  444. package/declaration/runtime-semantics/CallExpression.d.mts +5 -0
  445. package/declaration/runtime-semantics/CallExpression.d.mts.map +1 -0
  446. package/declaration/runtime-semantics/ClassDeclaration.d.mts +8 -0
  447. package/declaration/runtime-semantics/ClassDeclaration.d.mts.map +1 -0
  448. package/declaration/runtime-semantics/ClassDefinitionEvaluation.d.mts +88 -0
  449. package/declaration/runtime-semantics/ClassDefinitionEvaluation.d.mts.map +1 -0
  450. package/declaration/runtime-semantics/ClassExpression.d.mts +5 -0
  451. package/declaration/runtime-semantics/ClassExpression.d.mts.map +1 -0
  452. package/declaration/runtime-semantics/ClassFieldDefinitionEvaluation.d.mts +21 -0
  453. package/declaration/runtime-semantics/ClassFieldDefinitionEvaluation.d.mts.map +1 -0
  454. package/declaration/runtime-semantics/ClassStaticBlockDefinitionEvaluation.d.mts +13 -0
  455. package/declaration/runtime-semantics/ClassStaticBlockDefinitionEvaluation.d.mts.map +1 -0
  456. package/declaration/runtime-semantics/CoalesceExpression.d.mts +5 -0
  457. package/declaration/runtime-semantics/CoalesceExpression.d.mts.map +1 -0
  458. package/declaration/runtime-semantics/CommaOperator.d.mts +5 -0
  459. package/declaration/runtime-semantics/CommaOperator.d.mts.map +1 -0
  460. package/declaration/runtime-semantics/ConditionalExpression.d.mts +5 -0
  461. package/declaration/runtime-semantics/ConditionalExpression.d.mts.map +1 -0
  462. package/declaration/runtime-semantics/ContinueStatement.d.mts +4 -0
  463. package/declaration/runtime-semantics/ContinueStatement.d.mts.map +1 -0
  464. package/declaration/runtime-semantics/CreateDynamicFunction.d.mts +4 -0
  465. package/declaration/runtime-semantics/CreateDynamicFunction.d.mts.map +1 -0
  466. package/declaration/runtime-semantics/DebuggerStatement.d.mts +5 -0
  467. package/declaration/runtime-semantics/DebuggerStatement.d.mts.map +1 -0
  468. package/declaration/runtime-semantics/DefineMethod.d.mts +10 -0
  469. package/declaration/runtime-semantics/DefineMethod.d.mts.map +1 -0
  470. package/declaration/runtime-semantics/DestructuringAssignmentEvaluation.d.mts +5 -0
  471. package/declaration/runtime-semantics/DestructuringAssignmentEvaluation.d.mts.map +1 -0
  472. package/declaration/runtime-semantics/EmptyStatement.d.mts +5 -0
  473. package/declaration/runtime-semantics/EmptyStatement.d.mts.map +1 -0
  474. package/declaration/runtime-semantics/EqualityExpression.d.mts +6 -0
  475. package/declaration/runtime-semantics/EqualityExpression.d.mts.map +1 -0
  476. package/declaration/runtime-semantics/EvaluateBody.d.mts +37 -0
  477. package/declaration/runtime-semantics/EvaluateBody.d.mts.map +1 -0
  478. package/declaration/runtime-semantics/EvaluateCall.d.mts +5 -0
  479. package/declaration/runtime-semantics/EvaluateCall.d.mts.map +1 -0
  480. package/declaration/runtime-semantics/EvaluatePropertyAccess.d.mts +9 -0
  481. package/declaration/runtime-semantics/EvaluatePropertyAccess.d.mts.map +1 -0
  482. package/declaration/runtime-semantics/EvaluateStringOrNumericBinaryExpression.d.mts +6 -0
  483. package/declaration/runtime-semantics/EvaluateStringOrNumericBinaryExpression.d.mts.map +1 -0
  484. package/declaration/runtime-semantics/ExponentiationExpression.d.mts +5 -0
  485. package/declaration/runtime-semantics/ExponentiationExpression.d.mts.map +1 -0
  486. package/declaration/runtime-semantics/ExportDeclaration.d.mts +11 -0
  487. package/declaration/runtime-semantics/ExportDeclaration.d.mts.map +1 -0
  488. package/declaration/runtime-semantics/ExpressionStatement.d.mts +5 -0
  489. package/declaration/runtime-semantics/ExpressionStatement.d.mts.map +1 -0
  490. package/declaration/runtime-semantics/ForDeclarationBindingInitialization.d.mts +7 -0
  491. package/declaration/runtime-semantics/ForDeclarationBindingInitialization.d.mts.map +1 -0
  492. package/declaration/runtime-semantics/FunctionDeclaration.d.mts +5 -0
  493. package/declaration/runtime-semantics/FunctionDeclaration.d.mts.map +1 -0
  494. package/declaration/runtime-semantics/FunctionDeclarationInstantiation.d.mts +6 -0
  495. package/declaration/runtime-semantics/FunctionDeclarationInstantiation.d.mts.map +1 -0
  496. package/declaration/runtime-semantics/FunctionExpression.d.mts +4 -0
  497. package/declaration/runtime-semantics/FunctionExpression.d.mts.map +1 -0
  498. package/declaration/runtime-semantics/FunctionStatementList.d.mts +5 -0
  499. package/declaration/runtime-semantics/FunctionStatementList.d.mts.map +1 -0
  500. package/declaration/runtime-semantics/GeneratorExpression.d.mts +4 -0
  501. package/declaration/runtime-semantics/GeneratorExpression.d.mts.map +1 -0
  502. package/declaration/runtime-semantics/GetSubstitution.d.mts +5 -0
  503. package/declaration/runtime-semantics/GetSubstitution.d.mts.map +1 -0
  504. package/declaration/runtime-semantics/GlobalDeclarationInstantiation.d.mts +5 -0
  505. package/declaration/runtime-semantics/GlobalDeclarationInstantiation.d.mts.map +1 -0
  506. package/declaration/runtime-semantics/HoistableDeclaration.d.mts +5 -0
  507. package/declaration/runtime-semantics/HoistableDeclaration.d.mts.map +1 -0
  508. package/declaration/runtime-semantics/IdentifierReference.d.mts +6 -0
  509. package/declaration/runtime-semantics/IdentifierReference.d.mts.map +1 -0
  510. package/declaration/runtime-semantics/IfStatement.d.mts +11 -0
  511. package/declaration/runtime-semantics/IfStatement.d.mts.map +1 -0
  512. package/declaration/runtime-semantics/ImportCall.d.mts +6 -0
  513. package/declaration/runtime-semantics/ImportCall.d.mts.map +1 -0
  514. package/declaration/runtime-semantics/ImportDeclaration.d.mts +5 -0
  515. package/declaration/runtime-semantics/ImportDeclaration.d.mts.map +1 -0
  516. package/declaration/runtime-semantics/ImportMeta.d.mts +5 -0
  517. package/declaration/runtime-semantics/ImportMeta.d.mts.map +1 -0
  518. package/declaration/runtime-semantics/InstantiateArrowFunctionExpression.d.mts +5 -0
  519. package/declaration/runtime-semantics/InstantiateArrowFunctionExpression.d.mts.map +1 -0
  520. package/declaration/runtime-semantics/InstantiateAsyncArrowFunctionExpression.d.mts +5 -0
  521. package/declaration/runtime-semantics/InstantiateAsyncArrowFunctionExpression.d.mts.map +1 -0
  522. package/declaration/runtime-semantics/InstantiateAsyncFunctionExpression.d.mts +5 -0
  523. package/declaration/runtime-semantics/InstantiateAsyncFunctionExpression.d.mts.map +1 -0
  524. package/declaration/runtime-semantics/InstantiateAsyncGeneratorFunctionExpression.d.mts +5 -0
  525. package/declaration/runtime-semantics/InstantiateAsyncGeneratorFunctionExpression.d.mts.map +1 -0
  526. package/declaration/runtime-semantics/InstantiateFunctionObject.d.mts +12 -0
  527. package/declaration/runtime-semantics/InstantiateFunctionObject.d.mts.map +1 -0
  528. package/declaration/runtime-semantics/InstantiateGeneratorFunctionExpression.d.mts +5 -0
  529. package/declaration/runtime-semantics/InstantiateGeneratorFunctionExpression.d.mts.map +1 -0
  530. package/declaration/runtime-semantics/InstantiateOrdinaryFunctionExpression.d.mts +5 -0
  531. package/declaration/runtime-semantics/InstantiateOrdinaryFunctionExpression.d.mts.map +1 -0
  532. package/declaration/runtime-semantics/IteratorBindingInitialization.d.mts +7 -0
  533. package/declaration/runtime-semantics/IteratorBindingInitialization.d.mts.map +1 -0
  534. package/declaration/runtime-semantics/KeyedBindingInitialization.d.mts +6 -0
  535. package/declaration/runtime-semantics/KeyedBindingInitialization.d.mts.map +1 -0
  536. package/declaration/runtime-semantics/LabelledEvaluation.d.mts +7 -0
  537. package/declaration/runtime-semantics/LabelledEvaluation.d.mts.map +1 -0
  538. package/declaration/runtime-semantics/LabelledStatement.d.mts +4 -0
  539. package/declaration/runtime-semantics/LabelledStatement.d.mts.map +1 -0
  540. package/declaration/runtime-semantics/LexicalDeclaration.d.mts +14 -0
  541. package/declaration/runtime-semantics/LexicalDeclaration.d.mts.map +1 -0
  542. package/declaration/runtime-semantics/Literal.d.mts +6 -0
  543. package/declaration/runtime-semantics/Literal.d.mts.map +1 -0
  544. package/declaration/runtime-semantics/LogicalANDExpression.d.mts +5 -0
  545. package/declaration/runtime-semantics/LogicalANDExpression.d.mts.map +1 -0
  546. package/declaration/runtime-semantics/LogicalORExpression.d.mts +5 -0
  547. package/declaration/runtime-semantics/LogicalORExpression.d.mts.map +1 -0
  548. package/declaration/runtime-semantics/MV.d.mts +3 -0
  549. package/declaration/runtime-semantics/MV.d.mts.map +1 -0
  550. package/declaration/runtime-semantics/MemberExpression.d.mts +5 -0
  551. package/declaration/runtime-semantics/MemberExpression.d.mts.map +1 -0
  552. package/declaration/runtime-semantics/MethodDefinitionEvaluation.d.mts +28 -0
  553. package/declaration/runtime-semantics/MethodDefinitionEvaluation.d.mts.map +1 -0
  554. package/declaration/runtime-semantics/Module.d.mts +11 -0
  555. package/declaration/runtime-semantics/Module.d.mts.map +1 -0
  556. package/declaration/runtime-semantics/ModuleBody.d.mts +4 -0
  557. package/declaration/runtime-semantics/ModuleBody.d.mts.map +1 -0
  558. package/declaration/runtime-semantics/MultiplicativeExpression.d.mts +5 -0
  559. package/declaration/runtime-semantics/MultiplicativeExpression.d.mts.map +1 -0
  560. package/declaration/runtime-semantics/NamedEvaluation.d.mts +4 -0
  561. package/declaration/runtime-semantics/NamedEvaluation.d.mts.map +1 -0
  562. package/declaration/runtime-semantics/NewExpression.d.mts +5 -0
  563. package/declaration/runtime-semantics/NewExpression.d.mts.map +1 -0
  564. package/declaration/runtime-semantics/NewTarget.d.mts +3 -0
  565. package/declaration/runtime-semantics/NewTarget.d.mts.map +1 -0
  566. package/declaration/runtime-semantics/NumberToBigInt.d.mts +4 -0
  567. package/declaration/runtime-semantics/NumberToBigInt.d.mts.map +1 -0
  568. package/declaration/runtime-semantics/ObjectLiteral.d.mts +5 -0
  569. package/declaration/runtime-semantics/ObjectLiteral.d.mts.map +1 -0
  570. package/declaration/runtime-semantics/OptionalExpression.d.mts +5 -0
  571. package/declaration/runtime-semantics/OptionalExpression.d.mts.map +1 -0
  572. package/declaration/runtime-semantics/ParenthesizedExpression.d.mts +4 -0
  573. package/declaration/runtime-semantics/ParenthesizedExpression.d.mts.map +1 -0
  574. package/declaration/runtime-semantics/PropertyBindingInitialization.d.mts +6 -0
  575. package/declaration/runtime-semantics/PropertyBindingInitialization.d.mts.map +1 -0
  576. package/declaration/runtime-semantics/PropertyDefinitionEvaluation.d.mts +6 -0
  577. package/declaration/runtime-semantics/PropertyDefinitionEvaluation.d.mts.map +1 -0
  578. package/declaration/runtime-semantics/PropertyName.d.mts +5 -0
  579. package/declaration/runtime-semantics/PropertyName.d.mts.map +1 -0
  580. package/declaration/runtime-semantics/RegExp.d.mts +36 -0
  581. package/declaration/runtime-semantics/RegExp.d.mts.map +1 -0
  582. package/declaration/runtime-semantics/RegularExpressionLiteral.d.mts +4 -0
  583. package/declaration/runtime-semantics/RegularExpressionLiteral.d.mts.map +1 -0
  584. package/declaration/runtime-semantics/RelationalExpression.d.mts +8 -0
  585. package/declaration/runtime-semantics/RelationalExpression.d.mts.map +1 -0
  586. package/declaration/runtime-semantics/RestBindingInitialization.d.mts +5 -0
  587. package/declaration/runtime-semantics/RestBindingInitialization.d.mts.map +1 -0
  588. package/declaration/runtime-semantics/ReturnStatement.d.mts +6 -0
  589. package/declaration/runtime-semantics/ReturnStatement.d.mts.map +1 -0
  590. package/declaration/runtime-semantics/Script.d.mts +5 -0
  591. package/declaration/runtime-semantics/Script.d.mts.map +1 -0
  592. package/declaration/runtime-semantics/ScriptBody.d.mts +3 -0
  593. package/declaration/runtime-semantics/ScriptBody.d.mts.map +1 -0
  594. package/declaration/runtime-semantics/ShiftExpression.d.mts +7 -0
  595. package/declaration/runtime-semantics/ShiftExpression.d.mts.map +1 -0
  596. package/declaration/runtime-semantics/StatementList.d.mts +5 -0
  597. package/declaration/runtime-semantics/StatementList.d.mts.map +1 -0
  598. package/declaration/runtime-semantics/StringIndexOf.d.mts +3 -0
  599. package/declaration/runtime-semantics/StringIndexOf.d.mts.map +1 -0
  600. package/declaration/runtime-semantics/StringPad.d.mts +5 -0
  601. package/declaration/runtime-semantics/StringPad.d.mts.map +1 -0
  602. package/declaration/runtime-semantics/SuperCall.d.mts +5 -0
  603. package/declaration/runtime-semantics/SuperCall.d.mts.map +1 -0
  604. package/declaration/runtime-semantics/SuperProperty.d.mts +5 -0
  605. package/declaration/runtime-semantics/SuperProperty.d.mts.map +1 -0
  606. package/declaration/runtime-semantics/SwitchStatement.d.mts +9 -0
  607. package/declaration/runtime-semantics/SwitchStatement.d.mts.map +1 -0
  608. package/declaration/runtime-semantics/TaggedTemplateExpression.d.mts +5 -0
  609. package/declaration/runtime-semantics/TaggedTemplateExpression.d.mts.map +1 -0
  610. package/declaration/runtime-semantics/TemplateLiteral.d.mts +5 -0
  611. package/declaration/runtime-semantics/TemplateLiteral.d.mts.map +1 -0
  612. package/declaration/runtime-semantics/This.d.mts +5 -0
  613. package/declaration/runtime-semantics/This.d.mts.map +1 -0
  614. package/declaration/runtime-semantics/ThrowStatement.d.mts +5 -0
  615. package/declaration/runtime-semantics/ThrowStatement.d.mts.map +1 -0
  616. package/declaration/runtime-semantics/TrimString.d.mts +5 -0
  617. package/declaration/runtime-semantics/TrimString.d.mts.map +1 -0
  618. package/declaration/runtime-semantics/TryStatement.d.mts +10 -0
  619. package/declaration/runtime-semantics/TryStatement.d.mts.map +1 -0
  620. package/declaration/runtime-semantics/UnaryExpression.d.mts +4 -0
  621. package/declaration/runtime-semantics/UnaryExpression.d.mts.map +1 -0
  622. package/declaration/runtime-semantics/Unicode.d.mts +166 -0
  623. package/declaration/runtime-semantics/Unicode.d.mts.map +1 -0
  624. package/declaration/runtime-semantics/UpdateExpression.d.mts +4 -0
  625. package/declaration/runtime-semantics/UpdateExpression.d.mts.map +1 -0
  626. package/declaration/runtime-semantics/VariableStatement.d.mts +7 -0
  627. package/declaration/runtime-semantics/VariableStatement.d.mts.map +1 -0
  628. package/declaration/runtime-semantics/WithStatement.d.mts +10 -0
  629. package/declaration/runtime-semantics/WithStatement.d.mts.map +1 -0
  630. package/declaration/runtime-semantics/YieldExpression.d.mts +5 -0
  631. package/declaration/runtime-semantics/YieldExpression.d.mts.map +1 -0
  632. package/declaration/runtime-semantics/all.d.mts +110 -0
  633. package/declaration/runtime-semantics/all.d.mts.map +1 -0
  634. package/declaration/static-semantics/BodyText.d.mts +4 -0
  635. package/declaration/static-semantics/BodyText.d.mts.map +1 -0
  636. package/declaration/static-semantics/BoundNames.d.mts +4 -0
  637. package/declaration/static-semantics/BoundNames.d.mts.map +1 -0
  638. package/declaration/static-semantics/CharacterValue.d.mts +6 -0
  639. package/declaration/static-semantics/CharacterValue.d.mts.map +1 -0
  640. package/declaration/static-semantics/CodePointAt.d.mts +8 -0
  641. package/declaration/static-semantics/CodePointAt.d.mts.map +1 -0
  642. package/declaration/static-semantics/CodePointsToString.d.mts +3 -0
  643. package/declaration/static-semantics/CodePointsToString.d.mts.map +1 -0
  644. package/declaration/static-semantics/ConstructorMethod.d.mts +4 -0
  645. package/declaration/static-semantics/ConstructorMethod.d.mts.map +1 -0
  646. package/declaration/static-semantics/ContainsArguments.d.mts +4 -0
  647. package/declaration/static-semantics/ContainsArguments.d.mts.map +1 -0
  648. package/declaration/static-semantics/ContainsExpression.d.mts +3 -0
  649. package/declaration/static-semantics/ContainsExpression.d.mts.map +1 -0
  650. package/declaration/static-semantics/ContainsUsing.d.mts +4 -0
  651. package/declaration/static-semantics/ContainsUsing.d.mts.map +1 -0
  652. package/declaration/static-semantics/DeclarationPart.d.mts +3 -0
  653. package/declaration/static-semantics/DeclarationPart.d.mts.map +1 -0
  654. package/declaration/static-semantics/ExpectedArgumentCount.d.mts +3 -0
  655. package/declaration/static-semantics/ExpectedArgumentCount.d.mts.map +1 -0
  656. package/declaration/static-semantics/ExportEntries.d.mts +14 -0
  657. package/declaration/static-semantics/ExportEntries.d.mts.map +1 -0
  658. package/declaration/static-semantics/ExportEntriesForModule.d.mts +5 -0
  659. package/declaration/static-semantics/ExportEntriesForModule.d.mts.map +1 -0
  660. package/declaration/static-semantics/FlagText.d.mts +4 -0
  661. package/declaration/static-semantics/FlagText.d.mts.map +1 -0
  662. package/declaration/static-semantics/HasInitializer.d.mts +5 -0
  663. package/declaration/static-semantics/HasInitializer.d.mts.map +1 -0
  664. package/declaration/static-semantics/HasName.d.mts +3 -0
  665. package/declaration/static-semantics/HasName.d.mts.map +1 -0
  666. package/declaration/static-semantics/ImportEntries.d.mts +11 -0
  667. package/declaration/static-semantics/ImportEntries.d.mts.map +1 -0
  668. package/declaration/static-semantics/ImportEntriesForModule.d.mts +4 -0
  669. package/declaration/static-semantics/ImportEntriesForModule.d.mts.map +1 -0
  670. package/declaration/static-semantics/ImportedLocalNames.d.mts +4 -0
  671. package/declaration/static-semantics/ImportedLocalNames.d.mts.map +1 -0
  672. package/declaration/static-semantics/IsAnonymousFunctionDefinition.d.mts +4 -0
  673. package/declaration/static-semantics/IsAnonymousFunctionDefinition.d.mts.map +1 -0
  674. package/declaration/static-semantics/IsAwaitUsingDeclaration.d.mts +3 -0
  675. package/declaration/static-semantics/IsAwaitUsingDeclaration.d.mts.map +1 -0
  676. package/declaration/static-semantics/IsComputedPropertyKey.d.mts +3 -0
  677. package/declaration/static-semantics/IsComputedPropertyKey.d.mts.map +1 -0
  678. package/declaration/static-semantics/IsConstantDeclaration.d.mts +3 -0
  679. package/declaration/static-semantics/IsConstantDeclaration.d.mts.map +1 -0
  680. package/declaration/static-semantics/IsDestructuring.d.mts +4 -0
  681. package/declaration/static-semantics/IsDestructuring.d.mts.map +1 -0
  682. package/declaration/static-semantics/IsFunctionDefinition.d.mts +6 -0
  683. package/declaration/static-semantics/IsFunctionDefinition.d.mts.map +1 -0
  684. package/declaration/static-semantics/IsIdentifierRef.d.mts +3 -0
  685. package/declaration/static-semantics/IsIdentifierRef.d.mts.map +1 -0
  686. package/declaration/static-semantics/IsInTailPosition.d.mts +3 -0
  687. package/declaration/static-semantics/IsInTailPosition.d.mts.map +1 -0
  688. package/declaration/static-semantics/IsSimpleParameterList.d.mts +3 -0
  689. package/declaration/static-semantics/IsSimpleParameterList.d.mts.map +1 -0
  690. package/declaration/static-semantics/IsStatic.d.mts +4 -0
  691. package/declaration/static-semantics/IsStatic.d.mts.map +1 -0
  692. package/declaration/static-semantics/IsStrict.d.mts +4 -0
  693. package/declaration/static-semantics/IsStrict.d.mts.map +1 -0
  694. package/declaration/static-semantics/IsStringWellFormedUnicode.d.mts +3 -0
  695. package/declaration/static-semantics/IsStringWellFormedUnicode.d.mts.map +1 -0
  696. package/declaration/static-semantics/IsUsingDeclaration.d.mts +3 -0
  697. package/declaration/static-semantics/IsUsingDeclaration.d.mts.map +1 -0
  698. package/declaration/static-semantics/LexicallyDeclaredNames.d.mts +4 -0
  699. package/declaration/static-semantics/LexicallyDeclaredNames.d.mts.map +1 -0
  700. package/declaration/static-semantics/LexicallyScopedDeclarations.d.mts +3 -0
  701. package/declaration/static-semantics/LexicallyScopedDeclarations.d.mts.map +1 -0
  702. package/declaration/static-semantics/ModuleRequests.d.mts +22 -0
  703. package/declaration/static-semantics/ModuleRequests.d.mts.map +1 -0
  704. package/declaration/static-semantics/NonConstructorElements.d.mts +4 -0
  705. package/declaration/static-semantics/NonConstructorElements.d.mts.map +1 -0
  706. package/declaration/static-semantics/NumericValue.d.mts +4 -0
  707. package/declaration/static-semantics/NumericValue.d.mts.map +1 -0
  708. package/declaration/static-semantics/PrivateBoundIdentifiers.d.mts +5 -0
  709. package/declaration/static-semantics/PrivateBoundIdentifiers.d.mts.map +1 -0
  710. package/declaration/static-semantics/PropName.d.mts +3 -0
  711. package/declaration/static-semantics/PropName.d.mts.map +1 -0
  712. package/declaration/static-semantics/StringToCodePoints.d.mts +3 -0
  713. package/declaration/static-semantics/StringToCodePoints.d.mts.map +1 -0
  714. package/declaration/static-semantics/StringValue.d.mts +3 -0
  715. package/declaration/static-semantics/StringValue.d.mts.map +1 -0
  716. package/declaration/static-semantics/TemplateStrings.d.mts +5 -0
  717. package/declaration/static-semantics/TemplateStrings.d.mts.map +1 -0
  718. package/declaration/static-semantics/TopLevelLexicallyDeclaredNames.d.mts +4 -0
  719. package/declaration/static-semantics/TopLevelLexicallyDeclaredNames.d.mts.map +1 -0
  720. package/declaration/static-semantics/TopLevelLexicallyScopedDeclarations.d.mts +4 -0
  721. package/declaration/static-semantics/TopLevelLexicallyScopedDeclarations.d.mts.map +1 -0
  722. package/declaration/static-semantics/TopLevelVarDeclaredNames.d.mts +4 -0
  723. package/declaration/static-semantics/TopLevelVarDeclaredNames.d.mts.map +1 -0
  724. package/declaration/static-semantics/TopLevelVarScopedDeclarations.d.mts +4 -0
  725. package/declaration/static-semantics/TopLevelVarScopedDeclarations.d.mts.map +1 -0
  726. package/declaration/static-semantics/UTF16EncodeCodePoint.d.mts +4 -0
  727. package/declaration/static-semantics/UTF16EncodeCodePoint.d.mts.map +1 -0
  728. package/declaration/static-semantics/UTF16SurrogatePairToCodePoint.d.mts +4 -0
  729. package/declaration/static-semantics/UTF16SurrogatePairToCodePoint.d.mts.map +1 -0
  730. package/declaration/static-semantics/VarDeclaredNames.d.mts +4 -0
  731. package/declaration/static-semantics/VarDeclaredNames.d.mts.map +1 -0
  732. package/declaration/static-semantics/VarScopedDeclarations.d.mts +4 -0
  733. package/declaration/static-semantics/VarScopedDeclarations.d.mts.map +1 -0
  734. package/declaration/static-semantics/all.d.mts +51 -0
  735. package/declaration/static-semantics/all.d.mts.map +1 -0
  736. package/declaration/utils/callback.d.mts +3 -0
  737. package/declaration/utils/callback.d.mts.map +1 -0
  738. package/declaration/utils/container.d.mts +54 -0
  739. package/declaration/utils/container.d.mts.map +1 -0
  740. package/declaration/utils/internal.d.mts +3 -0
  741. package/declaration/utils/internal.d.mts.map +1 -0
  742. package/declaration/utils/language.d.mts +13 -0
  743. package/declaration/utils/language.d.mts.map +1 -0
  744. package/declaration/utils/module-loader.d.mts +15 -0
  745. package/declaration/utils/module-loader.d.mts.map +1 -0
  746. package/declaration/utils/module-loaders/builtin-loader.d.mts +13 -0
  747. package/declaration/utils/module-loaders/builtin-loader.d.mts.map +1 -0
  748. package/declaration/utils/module.d.mts +15 -0
  749. package/declaration/utils/module.d.mts.map +1 -0
  750. package/declaration/utils/stack.d.mts +49 -0
  751. package/declaration/utils/stack.d.mts.map +1 -0
  752. package/declaration/value.d.mts +276 -0
  753. package/declaration/value.d.mts.map +1 -0
  754. package/lib/engine262.d.mts +1 -0
  755. package/lib/engine262.d.ts +1 -0
  756. package/lib/engine262.js +80493 -0
  757. package/lib/engine262.js.map +1 -0
  758. package/lib/engine262.mjs +79570 -0
  759. package/lib/engine262.mjs.map +1 -0
  760. package/lib/inspector/context.d.mts +39 -0
  761. package/lib/inspector/context.d.mts.map +1 -0
  762. package/lib/inspector/context.mjs +307 -0
  763. package/lib/inspector/context.mjs.map +1 -0
  764. package/lib/inspector/evaluator.d.mts +4 -0
  765. package/lib/inspector/evaluator.d.mts.map +1 -0
  766. package/lib/inspector/evaluator.mjs +16 -0
  767. package/lib/inspector/evaluator.mjs.map +1 -0
  768. package/lib/inspector/index.d.mts +17 -0
  769. package/lib/inspector/index.d.mts.map +1 -0
  770. package/lib/inspector/index.mjs +180 -0
  771. package/lib/inspector/index.mjs.map +1 -0
  772. package/lib/inspector/internal-utils.d.mts +4 -0
  773. package/lib/inspector/internal-utils.d.mts.map +1 -0
  774. package/lib/inspector/internal-utils.mjs +17 -0
  775. package/lib/inspector/internal-utils.mjs.map +1 -0
  776. package/lib/inspector/methods.d.mts +7 -0
  777. package/lib/inspector/methods.d.mts.map +1 -0
  778. package/lib/inspector/methods.mjs +368 -0
  779. package/lib/inspector/methods.mjs.map +1 -0
  780. package/lib/inspector/objects/RegExp.d.mts +4 -0
  781. package/lib/inspector/objects/RegExp.d.mts.map +1 -0
  782. package/lib/inspector/objects/RegExp.mjs +3 -0
  783. package/lib/inspector/objects/RegExp.mjs.map +1 -0
  784. package/lib/inspector/objects/arrays.d.mts +8 -0
  785. package/lib/inspector/objects/arrays.d.mts.map +1 -0
  786. package/lib/inspector/objects/arrays.mjs +72 -0
  787. package/lib/inspector/objects/arrays.mjs.map +1 -0
  788. package/lib/inspector/objects/collections.d.mts +7 -0
  789. package/lib/inspector/objects/collections.d.mts.map +1 -0
  790. package/lib/inspector/objects/collections.mjs +32 -0
  791. package/lib/inspector/objects/collections.mjs.map +1 -0
  792. package/lib/inspector/objects/dates.d.mts +12 -0
  793. package/lib/inspector/objects/dates.d.mts.map +1 -0
  794. package/lib/inspector/objects/dates.mjs +18 -0
  795. package/lib/inspector/objects/dates.mjs.map +1 -0
  796. package/lib/inspector/objects/errors.d.mts +4 -0
  797. package/lib/inspector/objects/errors.d.mts.map +1 -0
  798. package/lib/inspector/objects/errors.mjs +51 -0
  799. package/lib/inspector/objects/errors.mjs.map +1 -0
  800. package/lib/inspector/objects/function.d.mts +4 -0
  801. package/lib/inspector/objects/function.d.mts.map +1 -0
  802. package/lib/inspector/objects/function.mjs +137 -0
  803. package/lib/inspector/objects/function.mjs.map +1 -0
  804. package/lib/inspector/objects/index.d.mts +13 -0
  805. package/lib/inspector/objects/index.d.mts.map +1 -0
  806. package/lib/inspector/objects/index.mjs +84 -0
  807. package/lib/inspector/objects/index.mjs.map +1 -0
  808. package/lib/inspector/objects/modules.d.mts +4 -0
  809. package/lib/inspector/objects/modules.d.mts.map +1 -0
  810. package/lib/inspector/objects/modules.mjs +57 -0
  811. package/lib/inspector/objects/modules.mjs.map +1 -0
  812. package/lib/inspector/objects/objects.d.mts +31 -0
  813. package/lib/inspector/objects/objects.d.mts.map +1 -0
  814. package/lib/inspector/objects/objects.mjs +166 -0
  815. package/lib/inspector/objects/objects.mjs.map +1 -0
  816. package/lib/inspector/objects/primitives.d.mts +9 -0
  817. package/lib/inspector/objects/primitives.d.mts.map +1 -0
  818. package/lib/inspector/objects/primitives.mjs +105 -0
  819. package/lib/inspector/objects/primitives.mjs.map +1 -0
  820. package/lib/inspector/objects/promises.d.mts +4 -0
  821. package/lib/inspector/objects/promises.d.mts.map +1 -0
  822. package/lib/inspector/objects/promises.mjs +6 -0
  823. package/lib/inspector/objects/promises.mjs.map +1 -0
  824. package/lib/inspector/objects/proxies.d.mts +4 -0
  825. package/lib/inspector/objects/proxies.d.mts.map +1 -0
  826. package/lib/inspector/objects/proxies.mjs +12 -0
  827. package/lib/inspector/objects/proxies.mjs.map +1 -0
  828. package/lib/inspector/objects/shadow-realms.d.mts +4 -0
  829. package/lib/inspector/objects/shadow-realms.d.mts.map +1 -0
  830. package/lib/inspector/objects/shadow-realms.mjs +5 -0
  831. package/lib/inspector/objects/shadow-realms.mjs.map +1 -0
  832. package/lib/inspector/types.d.mts +223 -0
  833. package/lib/inspector/types.d.mts.map +1 -0
  834. package/lib/inspector/types.mjs +2 -0
  835. package/lib/inspector/types.mjs.map +1 -0
  836. package/lib/inspector/utils.d.mts +8 -0
  837. package/lib/inspector/utils.d.mts.map +1 -0
  838. package/lib/inspector/utils.mjs +61 -0
  839. package/lib/inspector/utils.mjs.map +1 -0
  840. package/lib/inspector.d.mts +1 -0
  841. package/lib/inspector.d.ts +1 -0
  842. package/lib/inspector.js +1888 -0
  843. package/lib/inspector.js.map +1 -0
  844. package/lib/inspector.mjs +1881 -0
  845. package/lib/inspector.mjs.map +1 -0
  846. package/lib/node/bin.d.mts +3 -0
  847. package/lib/node/bin.d.mts.map +1 -0
  848. package/lib/node/bin.mjs +312 -0
  849. package/lib/node/bin.mjs.map +1 -0
  850. package/lib/node/example.d.mts +2 -0
  851. package/lib/node/example.d.mts.map +1 -0
  852. package/lib/node/example.mjs +153 -0
  853. package/lib/node/example.mjs.map +1 -0
  854. package/lib/node/inspector.d.mts +17 -0
  855. package/lib/node/inspector.d.mts.map +1 -0
  856. package/lib/node/inspector.mjs +138 -0
  857. package/lib/node/inspector.mjs.map +1 -0
  858. package/lib/node/module.d.mts +23 -0
  859. package/lib/node/module.d.mts.map +1 -0
  860. package/lib/node/module.mjs +205 -0
  861. package/lib/node/module.mjs.map +1 -0
  862. package/lib/test262-harness.json +45 -0
  863. package/lib-src/inspector/context.mts +361 -0
  864. package/lib-src/inspector/evaluator.mts +19 -0
  865. package/lib-src/inspector/index.mts +209 -0
  866. package/lib-src/inspector/internal-utils.mts +18 -0
  867. package/lib-src/inspector/js_protocol.json +3288 -0
  868. package/lib-src/inspector/methods.mts +400 -0
  869. package/lib-src/inspector/objects/RegExp.mts +4 -0
  870. package/lib-src/inspector/objects/arrays.mts +78 -0
  871. package/lib-src/inspector/objects/collections.mts +37 -0
  872. package/lib-src/inspector/objects/dates.mts +49 -0
  873. package/lib-src/inspector/objects/errors.mts +58 -0
  874. package/lib-src/inspector/objects/function.mts +154 -0
  875. package/lib-src/inspector/objects/index.mts +134 -0
  876. package/lib-src/inspector/objects/modules.mts +60 -0
  877. package/lib-src/inspector/objects/objects.mts +211 -0
  878. package/lib-src/inspector/objects/primitives.mts +119 -0
  879. package/lib-src/inspector/objects/promises.mts +6 -0
  880. package/lib-src/inspector/objects/proxies.mts +12 -0
  881. package/lib-src/inspector/objects/shadow-realms.mts +6 -0
  882. package/lib-src/inspector/tsconfig.json +17 -0
  883. package/lib-src/inspector/types.mts +228 -0
  884. package/lib-src/inspector/utils.mts +83 -0
  885. package/lib-src/node/bin.mts +339 -0
  886. package/lib-src/node/example.mts +173 -0
  887. package/lib-src/node/inspector.mts +152 -0
  888. package/lib-src/node/module.mts +233 -0
  889. package/lib-src/node/tsconfig.json +21 -0
  890. package/package.json +147 -0
  891. package/src/abstract-ops/all.mts +38 -0
  892. package/src/abstract-ops/arguments-operations.mts +246 -0
  893. package/src/abstract-ops/array-objects.mts +311 -0
  894. package/src/abstract-ops/arraybuffer-objects.mts +361 -0
  895. package/src/abstract-ops/async-function-operations.mts +46 -0
  896. package/src/abstract-ops/async-generator-objects.mts +320 -0
  897. package/src/abstract-ops/data-types-and-values.mts +43 -0
  898. package/src/abstract-ops/dataview-objects.mts +147 -0
  899. package/src/abstract-ops/date-objects.mts +226 -0
  900. package/src/abstract-ops/disposable-operations.mts +166 -0
  901. package/src/abstract-ops/error-objects.mts +38 -0
  902. package/src/abstract-ops/execution-contexts.mts +18 -0
  903. package/src/abstract-ops/function-operations.mts +740 -0
  904. package/src/abstract-ops/generator-operations.mts +298 -0
  905. package/src/abstract-ops/global-object.mts +394 -0
  906. package/src/abstract-ops/immutable-prototype-objects.mts +21 -0
  907. package/src/abstract-ops/import-calls.mts +153 -0
  908. package/src/abstract-ops/iterator-operations.mts +409 -0
  909. package/src/abstract-ops/keyed-collections.mts +15 -0
  910. package/src/abstract-ops/math.mts +72 -0
  911. package/src/abstract-ops/module-namespace-exotic-objects.mts +277 -0
  912. package/src/abstract-ops/module-records.mts +1044 -0
  913. package/src/abstract-ops/notational-conventions.mts +67 -0
  914. package/src/abstract-ops/object-operations.mts +623 -0
  915. package/src/abstract-ops/objects.mts +453 -0
  916. package/src/abstract-ops/private-names.mts +170 -0
  917. package/src/abstract-ops/promise-operations.mts +444 -0
  918. package/src/abstract-ops/proxy-objects.mts +580 -0
  919. package/src/abstract-ops/realms.mts +209 -0
  920. package/src/abstract-ops/reference-operations.mts +211 -0
  921. package/src/abstract-ops/regexp-objects.mts +310 -0
  922. package/src/abstract-ops/shadow-realm.mts +216 -0
  923. package/src/abstract-ops/shared-arraybuffer.mts +8 -0
  924. package/src/abstract-ops/spec-types.mts +251 -0
  925. package/src/abstract-ops/string-objects.mts +156 -0
  926. package/src/abstract-ops/symbol-objects.mts +35 -0
  927. package/src/abstract-ops/temporal/addition.mts +221 -0
  928. package/src/abstract-ops/temporal/all.mts +12 -0
  929. package/src/abstract-ops/temporal/calendar.mts +801 -0
  930. package/src/abstract-ops/temporal/duration.mts +1015 -0
  931. package/src/abstract-ops/temporal/instant.mts +174 -0
  932. package/src/abstract-ops/temporal/not-implemented.mts +15 -0
  933. package/src/abstract-ops/temporal/now.mts +46 -0
  934. package/src/abstract-ops/temporal/plain-date-time.mts +242 -0
  935. package/src/abstract-ops/temporal/plain-date.mts +249 -0
  936. package/src/abstract-ops/temporal/plain-month-day.mts +86 -0
  937. package/src/abstract-ops/temporal/plain-time.mts +331 -0
  938. package/src/abstract-ops/temporal/plain-year-month.mts +195 -0
  939. package/src/abstract-ops/temporal/temporal.mts +837 -0
  940. package/src/abstract-ops/temporal/time-zone.mts +304 -0
  941. package/src/abstract-ops/temporal/zoned-datetime.mts +373 -0
  942. package/src/abstract-ops/testing-comparison.mts +376 -0
  943. package/src/abstract-ops/type-conversion.mts +514 -0
  944. package/src/abstract-ops/typedarray-objects.mts +385 -0
  945. package/src/abstract-ops/weak-operations.mts +20 -0
  946. package/src/api.mts +359 -0
  947. package/src/completion.mts +477 -0
  948. package/src/ecma402/not-implemented.mts +4 -0
  949. package/src/evaluator.mts +384 -0
  950. package/src/execution-context/Agent.mts +481 -0
  951. package/src/execution-context/Environment.mts +994 -0
  952. package/src/execution-context/ExecutionContext.mts +248 -0
  953. package/src/execution-context/Job.mts +64 -0
  954. package/src/execution-context/PrivateEnvironment.mts +41 -0
  955. package/src/execution-context/Realm.mts +378 -0
  956. package/src/execution-context/WeakReference.mts +86 -0
  957. package/src/execution-context/all.mts +7 -0
  958. package/src/host-defined/base64.mts +58 -0
  959. package/src/host-defined/debugger-util.mts +15 -0
  960. package/src/host-defined/decimal.mts +117 -0
  961. package/src/host-defined/devtoolsEval.mts +150 -0
  962. package/src/host-defined/engine.mts +283 -0
  963. package/src/host-defined/error-messages.mts +637 -0
  964. package/src/host-defined/event-loop.mts +311 -0
  965. package/src/host-defined/ieee754.mts +212 -0
  966. package/src/host-defined/inspect.mts +250 -0
  967. package/src/host-defined/job-queue.mts +191 -0
  968. package/src/host-defined/sort.mts +860 -0
  969. package/src/host-defined/test262-intrinsics.mts +167 -0
  970. package/src/index.mts +66 -0
  971. package/src/intrinsics/AbstractModuleSource.mts +47 -0
  972. package/src/intrinsics/AggregateError.mts +66 -0
  973. package/src/intrinsics/AggregateErrorPrototype.mts +12 -0
  974. package/src/intrinsics/Array.mts +302 -0
  975. package/src/intrinsics/ArrayBuffer.mts +48 -0
  976. package/src/intrinsics/ArrayBufferPrototype.mts +189 -0
  977. package/src/intrinsics/ArrayIteratorPrototype.mts +23 -0
  978. package/src/intrinsics/ArrayPrototype.mts +688 -0
  979. package/src/intrinsics/ArrayPrototypeShared.mts +572 -0
  980. package/src/intrinsics/AsyncDisposableStack.mts +36 -0
  981. package/src/intrinsics/AsyncDisposableStackPrototype.mts +103 -0
  982. package/src/intrinsics/AsyncFromSyncIteratorPrototype.mts +165 -0
  983. package/src/intrinsics/AsyncFunction.mts +33 -0
  984. package/src/intrinsics/AsyncFunctionPrototype.mts +8 -0
  985. package/src/intrinsics/AsyncGeneratorFunction.mts +39 -0
  986. package/src/intrinsics/AsyncGeneratorFunctionPrototype.mts +19 -0
  987. package/src/intrinsics/AsyncGeneratorFunctionPrototypePrototype.mts +148 -0
  988. package/src/intrinsics/AsyncIteratorPrototype.mts +56 -0
  989. package/src/intrinsics/BigInt.mts +69 -0
  990. package/src/intrinsics/BigIntPrototype.mts +64 -0
  991. package/src/intrinsics/Boolean.mts +47 -0
  992. package/src/intrinsics/BooleanPrototype.mts +56 -0
  993. package/src/intrinsics/DataView.mts +81 -0
  994. package/src/intrinsics/DataViewPrototype.mts +284 -0
  995. package/src/intrinsics/Date.mts +243 -0
  996. package/src/intrinsics/DatePrototype.mts +771 -0
  997. package/src/intrinsics/DisposableStack.mts +41 -0
  998. package/src/intrinsics/DisposableStackPrototype.mts +103 -0
  999. package/src/intrinsics/Error.mts +106 -0
  1000. package/src/intrinsics/ErrorPrototype.mts +100 -0
  1001. package/src/intrinsics/FinalizationRegistry.mts +69 -0
  1002. package/src/intrinsics/FinalizationRegistryPrototype.mts +110 -0
  1003. package/src/intrinsics/ForInIteratorPrototype.mts +120 -0
  1004. package/src/intrinsics/Function.mts +24 -0
  1005. package/src/intrinsics/FunctionPrototype.mts +232 -0
  1006. package/src/intrinsics/GeneratorFunction.mts +38 -0
  1007. package/src/intrinsics/GeneratorFunctionPrototype.mts +22 -0
  1008. package/src/intrinsics/GeneratorFunctionPrototypePrototype.mts +59 -0
  1009. package/src/intrinsics/Iterator.mts +302 -0
  1010. package/src/intrinsics/IteratorHelperPrototype.mts +61 -0
  1011. package/src/intrinsics/IteratorPrototype.mts +700 -0
  1012. package/src/intrinsics/JSON.mts +740 -0
  1013. package/src/intrinsics/Map.mts +129 -0
  1014. package/src/intrinsics/MapIteratorPrototype.mts +81 -0
  1015. package/src/intrinsics/MapPrototype.mts +295 -0
  1016. package/src/intrinsics/Math.mts +605 -0
  1017. package/src/intrinsics/NativeError.mts +86 -0
  1018. package/src/intrinsics/Number.mts +135 -0
  1019. package/src/intrinsics/NumberPrototype.mts +116 -0
  1020. package/src/intrinsics/Object.mts +466 -0
  1021. package/src/intrinsics/ObjectPrototype.mts +333 -0
  1022. package/src/intrinsics/Promise.mts +807 -0
  1023. package/src/intrinsics/PromisePrototype.mts +126 -0
  1024. package/src/intrinsics/Proxy.mts +101 -0
  1025. package/src/intrinsics/Reflect.mts +211 -0
  1026. package/src/intrinsics/RegExp.mts +166 -0
  1027. package/src/intrinsics/RegExpPrototype.mts +762 -0
  1028. package/src/intrinsics/RegExpStringIteratorPrototype.mts +73 -0
  1029. package/src/intrinsics/Set.mts +75 -0
  1030. package/src/intrinsics/SetIteratorPrototype.mts +78 -0
  1031. package/src/intrinsics/SetPrototype.mts +684 -0
  1032. package/src/intrinsics/ShadowRealm.mts +71 -0
  1033. package/src/intrinsics/ShadowRealmPrototype.mts +47 -0
  1034. package/src/intrinsics/String.mts +138 -0
  1035. package/src/intrinsics/StringIteratorPrototype.mts +23 -0
  1036. package/src/intrinsics/StringPrototype.mts +813 -0
  1037. package/src/intrinsics/SuppressedError.mts +53 -0
  1038. package/src/intrinsics/SuppressedErrorPrototype.mts +11 -0
  1039. package/src/intrinsics/Symbol.mts +99 -0
  1040. package/src/intrinsics/SymbolPrototype.mts +81 -0
  1041. package/src/intrinsics/Temporal/Duration.mts +140 -0
  1042. package/src/intrinsics/Temporal/DurationPrototype.mts +425 -0
  1043. package/src/intrinsics/Temporal/Instant.mts +90 -0
  1044. package/src/intrinsics/Temporal/InstantPrototype.mts +211 -0
  1045. package/src/intrinsics/Temporal/Now.mts +66 -0
  1046. package/src/intrinsics/Temporal/PlainDate.mts +79 -0
  1047. package/src/intrinsics/Temporal/PlainDatePrototype.mts +331 -0
  1048. package/src/intrinsics/Temporal/PlainDateTime.mts +113 -0
  1049. package/src/intrinsics/Temporal/PlainDateTimePrototype.mts +418 -0
  1050. package/src/intrinsics/Temporal/PlainMonthDay.mts +81 -0
  1051. package/src/intrinsics/Temporal/PlainMonthDayPrototype.mts +139 -0
  1052. package/src/intrinsics/Temporal/PlainTime.mts +74 -0
  1053. package/src/intrinsics/Temporal/PlainTimePrototype.mts +224 -0
  1054. package/src/intrinsics/Temporal/PlainYearMonth.mts +96 -0
  1055. package/src/intrinsics/Temporal/PlainYearMonthPrototype.mts +223 -0
  1056. package/src/intrinsics/Temporal/Temporal.mts +30 -0
  1057. package/src/intrinsics/Temporal/ZonedDateTime.mts +103 -0
  1058. package/src/intrinsics/Temporal/ZonedDateTimePrototype.mts +601 -0
  1059. package/src/intrinsics/ThrowTypeError.mts +21 -0
  1060. package/src/intrinsics/TypedArray.mts +585 -0
  1061. package/src/intrinsics/TypedArrayConstructors.mts +85 -0
  1062. package/src/intrinsics/TypedArrayPrototype.mts +600 -0
  1063. package/src/intrinsics/TypedArrayPrototypes.mts +17 -0
  1064. package/src/intrinsics/TypedArray_Uint8Array.mts +438 -0
  1065. package/src/intrinsics/URIHandling.mts +277 -0
  1066. package/src/intrinsics/WeakMap.mts +56 -0
  1067. package/src/intrinsics/WeakMapPrototype.mts +203 -0
  1068. package/src/intrinsics/WeakRef.mts +43 -0
  1069. package/src/intrinsics/WeakRefPrototype.mts +23 -0
  1070. package/src/intrinsics/WeakSet.mts +66 -0
  1071. package/src/intrinsics/WeakSetPrototype.mts +100 -0
  1072. package/src/intrinsics/WrapForValidIteratorPrototype.mts +65 -0
  1073. package/src/intrinsics/bootstrap.mts +153 -0
  1074. package/src/intrinsics/eval.mts +16 -0
  1075. package/src/intrinsics/isFinite.mts +23 -0
  1076. package/src/intrinsics/isNaN.mts +23 -0
  1077. package/src/intrinsics/parseFloat.mts +78 -0
  1078. package/src/intrinsics/parseInt.mts +85 -0
  1079. package/src/modules.mts +1088 -0
  1080. package/src/parse.mts +267 -0
  1081. package/src/parser/BaseParser.mts +36 -0
  1082. package/src/parser/ExpressionParser.mts +1697 -0
  1083. package/src/parser/FunctionParser.mts +398 -0
  1084. package/src/parser/IdentifierParser.mts +149 -0
  1085. package/src/parser/LanguageParser.mts +140 -0
  1086. package/src/parser/Lexer.mts +1190 -0
  1087. package/src/parser/ModuleParser.mts +429 -0
  1088. package/src/parser/ParseNode.mts +2923 -0
  1089. package/src/parser/Parser.mts +88 -0
  1090. package/src/parser/RegExpParser.mts +1428 -0
  1091. package/src/parser/Scope.mts +571 -0
  1092. package/src/parser/StatementParser.mts +1160 -0
  1093. package/src/parser/TemporalParser.mts +1245 -0
  1094. package/src/parser/tokens.mts +210 -0
  1095. package/src/parser/unicode.d.ts +20 -0
  1096. package/src/parser/utils.mts +114 -0
  1097. package/src/runtime-semantics/AdditiveExpression.mts +29 -0
  1098. package/src/runtime-semantics/ApplyStringOrNumericBinaryOperator.mts +78 -0
  1099. package/src/runtime-semantics/ArgumentListEvaluation.mts +178 -0
  1100. package/src/runtime-semantics/ArrayLiteral.mts +99 -0
  1101. package/src/runtime-semantics/ArrowFunction.mts +8 -0
  1102. package/src/runtime-semantics/AssignmentExpression.mts +284 -0
  1103. package/src/runtime-semantics/AsyncArrowFunction.mts +8 -0
  1104. package/src/runtime-semantics/AsyncFunctionExpression.mts +11 -0
  1105. package/src/runtime-semantics/AsyncGeneratorExpression.mts +11 -0
  1106. package/src/runtime-semantics/AwaitExpression.mts +16 -0
  1107. package/src/runtime-semantics/BindingInitialization.mts +91 -0
  1108. package/src/runtime-semantics/BitwiseOperators.mts +14 -0
  1109. package/src/runtime-semantics/Block.mts +73 -0
  1110. package/src/runtime-semantics/BreakStatement.mts +18 -0
  1111. package/src/runtime-semantics/BreakableStatement.mts +18 -0
  1112. package/src/runtime-semantics/CallExpression.mts +57 -0
  1113. package/src/runtime-semantics/ClassDeclaration.mts +41 -0
  1114. package/src/runtime-semantics/ClassDefinitionEvaluation.mts +811 -0
  1115. package/src/runtime-semantics/ClassExpression.mts +24 -0
  1116. package/src/runtime-semantics/ClassFieldDefinitionEvaluation.mts +189 -0
  1117. package/src/runtime-semantics/ClassStaticBlockDefinitionEvaluation.mts +48 -0
  1118. package/src/runtime-semantics/CoalesceExpression.mts +24 -0
  1119. package/src/runtime-semantics/CommaOperator.mts +18 -0
  1120. package/src/runtime-semantics/ConditionalExpression.mts +31 -0
  1121. package/src/runtime-semantics/ContinueStatement.mts +18 -0
  1122. package/src/runtime-semantics/CreateDynamicFunction.mts +161 -0
  1123. package/src/runtime-semantics/DebuggerStatement.mts +20 -0
  1124. package/src/runtime-semantics/DefineMethod.mts +42 -0
  1125. package/src/runtime-semantics/DestructuringAssignmentEvaluation.mts +306 -0
  1126. package/src/runtime-semantics/EmptyStatement.mts +9 -0
  1127. package/src/runtime-semantics/EqualityExpression.mts +60 -0
  1128. package/src/runtime-semantics/EvaluateBody.mts +211 -0
  1129. package/src/runtime-semantics/EvaluateCall.mts +67 -0
  1130. package/src/runtime-semantics/EvaluatePropertyAccess.mts +39 -0
  1131. package/src/runtime-semantics/EvaluateStringOrNumericBinaryExpression.mts +19 -0
  1132. package/src/runtime-semantics/ExponentiationExpression.mts +11 -0
  1133. package/src/runtime-semantics/ExportDeclaration.mts +100 -0
  1134. package/src/runtime-semantics/ExpressionStatement.mts +14 -0
  1135. package/src/runtime-semantics/ForDeclarationBindingInitialization.mts +21 -0
  1136. package/src/runtime-semantics/FunctionDeclaration.mts +10 -0
  1137. package/src/runtime-semantics/FunctionDeclarationInstantiation.mts +273 -0
  1138. package/src/runtime-semantics/FunctionExpression.mts +10 -0
  1139. package/src/runtime-semantics/FunctionStatementList.mts +17 -0
  1140. package/src/runtime-semantics/GeneratorExpression.mts +11 -0
  1141. package/src/runtime-semantics/GetSubstitution.mts +90 -0
  1142. package/src/runtime-semantics/GlobalDeclarationInstantiation.mts +140 -0
  1143. package/src/runtime-semantics/HoistableDeclaration.mts +12 -0
  1144. package/src/runtime-semantics/IdentifierReference.mts +15 -0
  1145. package/src/runtime-semantics/IfStatement.mts +49 -0
  1146. package/src/runtime-semantics/ImportCall.mts +137 -0
  1147. package/src/runtime-semantics/ImportDeclaration.mts +9 -0
  1148. package/src/runtime-semantics/ImportMeta.mts +45 -0
  1149. package/src/runtime-semantics/InstantiateArrowFunctionExpression.mts +36 -0
  1150. package/src/runtime-semantics/InstantiateAsyncArrowFunctionExpression.mts +38 -0
  1151. package/src/runtime-semantics/InstantiateAsyncFunctionExpression.mts +75 -0
  1152. package/src/runtime-semantics/InstantiateAsyncGeneratorFunctionExpression.mts +90 -0
  1153. package/src/runtime-semantics/InstantiateFunctionObject.mts +123 -0
  1154. package/src/runtime-semantics/InstantiateGeneratorFunctionExpression.mts +82 -0
  1155. package/src/runtime-semantics/InstantiateOrdinaryFunctionExpression.mts +64 -0
  1156. package/src/runtime-semantics/IteratorBindingInitialization.mts +212 -0
  1157. package/src/runtime-semantics/KeyedBindingInitialization.mts +61 -0
  1158. package/src/runtime-semantics/LabelledEvaluation.mts +749 -0
  1159. package/src/runtime-semantics/LabelledStatement.mts +11 -0
  1160. package/src/runtime-semantics/LexicalDeclaration.mts +114 -0
  1161. package/src/runtime-semantics/Literal.mts +36 -0
  1162. package/src/runtime-semantics/LogicalANDExpression.mts +25 -0
  1163. package/src/runtime-semantics/LogicalORExpression.mts +25 -0
  1164. package/src/runtime-semantics/MV.mts +10 -0
  1165. package/src/runtime-semantics/MemberExpression.mts +71 -0
  1166. package/src/runtime-semantics/MethodDefinitionEvaluation.mts +364 -0
  1167. package/src/runtime-semantics/Module.mts +15 -0
  1168. package/src/runtime-semantics/ModuleBody.mts +10 -0
  1169. package/src/runtime-semantics/MultiplicativeExpression.mts +18 -0
  1170. package/src/runtime-semantics/NamedEvaluation.mts +97 -0
  1171. package/src/runtime-semantics/NewExpression.mts +51 -0
  1172. package/src/runtime-semantics/NewTarget.mts +8 -0
  1173. package/src/runtime-semantics/NumberToBigInt.mts +16 -0
  1174. package/src/runtime-semantics/ObjectLiteral.mts +25 -0
  1175. package/src/runtime-semantics/OptionalExpression.mts +129 -0
  1176. package/src/runtime-semantics/ParenthesizedExpression.mts +8 -0
  1177. package/src/runtime-semantics/PropertyBindingInitialization.mts +45 -0
  1178. package/src/runtime-semantics/PropertyDefinitionEvaluation.mts +132 -0
  1179. package/src/runtime-semantics/PropertyName.mts +62 -0
  1180. package/src/runtime-semantics/RegExp.mts +1344 -0
  1181. package/src/runtime-semantics/RegularExpressionLiteral.mts +16 -0
  1182. package/src/runtime-semantics/RelationalExpression.mts +150 -0
  1183. package/src/runtime-semantics/RestBindingInitialization.mts +29 -0
  1184. package/src/runtime-semantics/ReturnStatement.mts +32 -0
  1185. package/src/runtime-semantics/Script.mts +15 -0
  1186. package/src/runtime-semantics/ScriptBody.mts +7 -0
  1187. package/src/runtime-semantics/ShiftExpression.mts +17 -0
  1188. package/src/runtime-semantics/StatementList.mts +33 -0
  1189. package/src/runtime-semantics/StringIndexOf.mts +43 -0
  1190. package/src/runtime-semantics/StringPad.mts +34 -0
  1191. package/src/runtime-semantics/SuperCall.mts +65 -0
  1192. package/src/runtime-semantics/SuperProperty.mts +58 -0
  1193. package/src/runtime-semantics/SwitchStatement.mts +214 -0
  1194. package/src/runtime-semantics/TaggedTemplateExpression.mts +23 -0
  1195. package/src/runtime-semantics/TemplateLiteral.mts +34 -0
  1196. package/src/runtime-semantics/This.mts +9 -0
  1197. package/src/runtime-semantics/ThrowStatement.mts +23 -0
  1198. package/src/runtime-semantics/TrimString.mts +19 -0
  1199. package/src/runtime-semantics/TryStatement.mts +119 -0
  1200. package/src/runtime-semantics/UnaryExpression.mts +218 -0
  1201. package/src/runtime-semantics/Unicode.mts +268 -0
  1202. package/src/runtime-semantics/UpdateExpression.mts +126 -0
  1203. package/src/runtime-semantics/VariableStatement.mts +72 -0
  1204. package/src/runtime-semantics/WithStatement.mts +33 -0
  1205. package/src/runtime-semantics/YieldExpression.mts +175 -0
  1206. package/src/runtime-semantics/all.mts +109 -0
  1207. package/src/static-semantics/BodyText.mts +7 -0
  1208. package/src/static-semantics/BoundNames.mts +108 -0
  1209. package/src/static-semantics/CharacterValue.mts +112 -0
  1210. package/src/static-semantics/CodePointAt.mts +53 -0
  1211. package/src/static-semantics/CodePointsToString.mts +15 -0
  1212. package/src/static-semantics/ConstructorMethod.mts +10 -0
  1213. package/src/static-semantics/ContainsArguments.mts +33 -0
  1214. package/src/static-semantics/ContainsExpression.mts +59 -0
  1215. package/src/static-semantics/ContainsUsing.mts +15 -0
  1216. package/src/static-semantics/DeclarationPart.mts +5 -0
  1217. package/src/static-semantics/ExpectedArgumentCount.mts +26 -0
  1218. package/src/static-semantics/ExportEntries.mts +183 -0
  1219. package/src/static-semantics/ExportEntriesForModule.mts +79 -0
  1220. package/src/static-semantics/FlagText.mts +7 -0
  1221. package/src/static-semantics/HasInitializer.mts +5 -0
  1222. package/src/static-semantics/HasName.mts +8 -0
  1223. package/src/static-semantics/ImportEntries.mts +49 -0
  1224. package/src/static-semantics/ImportEntriesForModule.mts +110 -0
  1225. package/src/static-semantics/ImportedLocalNames.mts +14 -0
  1226. package/src/static-semantics/IsAnonymousFunctionDefinition.mts +18 -0
  1227. package/src/static-semantics/IsAwaitUsingDeclaration.mts +12 -0
  1228. package/src/static-semantics/IsComputedPropertyKey.mts +7 -0
  1229. package/src/static-semantics/IsConstantDeclaration.mts +11 -0
  1230. package/src/static-semantics/IsDestructuring.mts +21 -0
  1231. package/src/static-semantics/IsFunctionDefinition.mts +15 -0
  1232. package/src/static-semantics/IsIdentifierRef.mts +5 -0
  1233. package/src/static-semantics/IsInTailPosition.mts +5 -0
  1234. package/src/static-semantics/IsSimpleParameterList.mts +23 -0
  1235. package/src/static-semantics/IsStatic.mts +10 -0
  1236. package/src/static-semantics/IsStrict.mts +7 -0
  1237. package/src/static-semantics/IsStringWellFormedUnicode.mts +24 -0
  1238. package/src/static-semantics/IsUsingDeclaration.mts +12 -0
  1239. package/src/static-semantics/LexicallyDeclaredNames.mts +26 -0
  1240. package/src/static-semantics/LexicallyScopedDeclarations.mts +84 -0
  1241. package/src/static-semantics/ModuleRequests.mts +185 -0
  1242. package/src/static-semantics/NonConstructorElements.mts +15 -0
  1243. package/src/static-semantics/NumericValue.mts +7 -0
  1244. package/src/static-semantics/PrivateBoundIdentifiers.mts +23 -0
  1245. package/src/static-semantics/PropName.mts +23 -0
  1246. package/src/static-semantics/StringToCodePoints.mts +22 -0
  1247. package/src/static-semantics/StringValue.mts +19 -0
  1248. package/src/static-semantics/TemplateStrings.mts +109 -0
  1249. package/src/static-semantics/TopLevelLexicallyDeclaredNames.mts +23 -0
  1250. package/src/static-semantics/TopLevelLexicallyScopedDeclarations.mts +27 -0
  1251. package/src/static-semantics/TopLevelVarDeclaredNames.mts +28 -0
  1252. package/src/static-semantics/TopLevelVarScopedDeclarations.mts +36 -0
  1253. package/src/static-semantics/UTF16EncodeCodePoint.mts +19 -0
  1254. package/src/static-semantics/UTF16SurrogatePairToCodePoint.mts +12 -0
  1255. package/src/static-semantics/VarDeclaredNames.mts +109 -0
  1256. package/src/static-semantics/VarScopedDeclarations.mts +115 -0
  1257. package/src/static-semantics/all.mts +50 -0
  1258. package/src/tsconfig.json +12 -0
  1259. package/src/unicode/.gitkeep +0 -0
  1260. package/src/unicode/CodePointProperties.json +1 -0
  1261. package/src/unicode/PropertyValueAliases.json +434 -0
  1262. package/src/unicode/SequenceProperties.json +1 -0
  1263. package/src/utils/callback.mts +7 -0
  1264. package/src/utils/container.mts +284 -0
  1265. package/src/utils/internal.mts +2 -0
  1266. package/src/utils/language.mts +35 -0
  1267. package/src/utils/module-loader.mts +73 -0
  1268. package/src/utils/module-loaders/builtin-loader.mts +84 -0
  1269. package/src/utils/module.mts +75 -0
  1270. package/src/utils/stack.mts +324 -0
  1271. package/src/value.mts +996 -0
@@ -0,0 +1,2923 @@
1
+ import type { ArrowInfo } from './Scope.mts';
2
+ import type { Character, UnicodeCharacter } from '#self';
3
+
4
+ export interface Position {
5
+ /** 1-based */
6
+ readonly line: number;
7
+ readonly column: number;
8
+ }
9
+
10
+ export interface Location {
11
+ readonly startIndex: number;
12
+ readonly endIndex: number;
13
+ readonly start: Position;
14
+ readonly end: Position;
15
+ }
16
+
17
+ // eslint-disable-next-line @typescript-eslint/no-namespace
18
+ export namespace ParseNode {
19
+ export interface BaseParseNode {
20
+ // NOTE: while we could use `string` here, by limiting `type` to only those types defined in the `ParseNode`
21
+ // union we can ensure that new subtypes of `BaseParseNode` are correctly added to the union.
22
+ readonly type: ParseNode['type'];
23
+ readonly location: Location;
24
+ readonly strict: boolean;
25
+ readonly sourceText: string;
26
+ readonly parent: ParseNode | undefined;
27
+ }
28
+
29
+ // A.1 Lexical Grammar
30
+ // https://tc39.es/ecma262/#sec-lexical-grammar
31
+
32
+ // PrivateIdentifier ::
33
+ // `#` IdentifierName
34
+ export interface PrivateIdentifier extends BaseParseNode {
35
+ readonly type: 'PrivateIdentifier';
36
+ readonly name: string;
37
+ }
38
+
39
+ // IdentifierName ::
40
+ // IdentifierStart
41
+ // IdentifierName IdentifierPart
42
+ export interface IdentifierName extends BaseParseNode {
43
+ readonly type: 'IdentifierName';
44
+ readonly name: string;
45
+ }
46
+
47
+ // NullLiteral ::
48
+ // `null`
49
+ export interface NullLiteral extends BaseParseNode {
50
+ readonly type: 'NullLiteral';
51
+ }
52
+
53
+ // BooleanLiteral ::
54
+ // `true`
55
+ // `false`
56
+ export interface BooleanLiteral extends BaseParseNode {
57
+ readonly type: 'BooleanLiteral';
58
+ readonly value: boolean;
59
+ }
60
+
61
+ // NumericLiteral ::
62
+ // DecimalLiteral
63
+ // DecimalBigIntegerLiteral
64
+ // NonDecimalIntegerLiteral
65
+ // NonDecimalIntegerLiteral BigIntLiteralSuffix
66
+ // LegacyOctalIntegerLiteral
67
+ export interface NumericLiteral extends BaseParseNode {
68
+ readonly type: 'NumericLiteral';
69
+ readonly value: number | bigint;
70
+ }
71
+
72
+ // StringLiteral ::
73
+ // `"` DoubleStringCharacters? `"`
74
+ // `'` SingleStringCharacters? `'`
75
+ export interface StringLiteral extends BaseParseNode {
76
+ readonly type: 'StringLiteral';
77
+ readonly value: string;
78
+ }
79
+
80
+ // RegularExpressionLiteral ::
81
+ // `/` RegularExpressionBody `/` RegularExpressionFlags
82
+ export interface RegularExpressionLiteral extends BaseParseNode {
83
+ readonly type: 'RegularExpressionLiteral';
84
+ readonly RegularExpressionBody: string;
85
+ readonly RegularExpressionFlags: string;
86
+ }
87
+
88
+ // A.2 Expressions
89
+ // https://tc39.es/ecma262/#sec-expressions
90
+
91
+ // IdentifierReference :
92
+ // Identifier
93
+ // [~Yield] `yield`
94
+ // [~Await] `await`
95
+ //
96
+ // Identifier :
97
+ // IdentifierName but not ReservedWord
98
+ export interface IdentifierReference extends BaseParseNode {
99
+ readonly type: 'IdentifierReference';
100
+ readonly escaped: boolean;
101
+ readonly name: string;
102
+ }
103
+
104
+ // BindingIdentifier :
105
+ // Identifier
106
+ // [~Yield] `yield`
107
+ // [~Await] `await`
108
+ //
109
+ // Identifier :
110
+ // IdentifierName but not ReservedWord
111
+ export interface BindingIdentifier extends BaseParseNode {
112
+ readonly type: 'BindingIdentifier';
113
+ readonly name: string;
114
+ }
115
+
116
+ // LabelIdentifier :
117
+ // Identifier
118
+ // [~Yield] `yield`
119
+ // [~Await] `await`
120
+ //
121
+ // Identifier :
122
+ // IdentifierName but not ReservedWord
123
+ export interface LabelIdentifier extends BaseParseNode {
124
+ readonly type: 'LabelIdentifier';
125
+ readonly name: string;
126
+ }
127
+
128
+ // PrimaryExpression :
129
+ // `this`
130
+ // IdentifierReference
131
+ // Literal
132
+ // ArrayLiteral
133
+ // ObjectLiteral
134
+ // FunctionExpression
135
+ // ClassExpression
136
+ // GeneratorExpression
137
+ // AsyncFunctionExpression
138
+ // AsyncGeneratorExpression
139
+ // RegularExpressionLiteral
140
+ // TemplateLiteral
141
+ // CoverParenthesizedExpressionAndArrowParameterList
142
+ export type PrimaryExpression =
143
+ | ThisExpression
144
+ | IdentifierReference
145
+ | Literal
146
+ | ArrayLiteral
147
+ | ObjectLiteral
148
+ | FunctionExpression
149
+ | ClassExpression
150
+ | GeneratorExpression
151
+ | AsyncFunctionExpression
152
+ | AsyncGeneratorExpression
153
+ | RegularExpressionLiteral
154
+ | TemplateLiteral
155
+ | CoverParenthesizedExpressionAndArrowParameterList
156
+ | ParenthesizedExpression;
157
+
158
+ // PrimaryExpression (partial) :
159
+ // `this`
160
+ export interface ThisExpression extends BaseParseNode {
161
+ readonly type: 'ThisExpression';
162
+ }
163
+
164
+ // CoverParenthesizedExpressionAndArrowParameterList :
165
+ // `(` Expression `)`
166
+ // `(` Expression `,` `)`
167
+ // `(` `)`
168
+ // `(` `...` BindingIdentifier `)`
169
+ // `(` `...` BindingPattern `)`
170
+ // `(` Expression `,` `...` BindingIdentifier `)`
171
+ // `(` Expression `.` `...` BindingPattern `)`
172
+ export interface CoverParenthesizedExpressionAndArrowParameterList extends BaseParseNode {
173
+ readonly type: 'CoverParenthesizedExpressionAndArrowParameterList';
174
+ readonly Arguments: readonly (ArgumentListElement | BindingRestElement)[];
175
+ readonly arrowInfo?: ArrowInfo;
176
+ }
177
+
178
+ // CoverParenthesizedExpressionAndArrowParameterList (partial) :
179
+ // `(` Expression `)`
180
+ //
181
+ // ParenthesizedExpression (refined) :
182
+ // `(` Expression `)`
183
+ export interface ParenthesizedExpression extends BaseParseNode {
184
+ readonly type: 'ParenthesizedExpression';
185
+ readonly Expression: Expression;
186
+ }
187
+
188
+ // Literal :
189
+ // NullLiteral
190
+ // BooleanLiteral
191
+ // NumericLiteral
192
+ // StringLiteral
193
+ export type Literal =
194
+ | NullLiteral
195
+ | BooleanLiteral
196
+ | NumericLiteral
197
+ | StringLiteral;
198
+
199
+ // ArrayLiteral :
200
+ // `[` `]`
201
+ // `[` Elision `]`
202
+ // `[` ElementList `]`
203
+ // `[` ElementList `,` `]`
204
+ // `[` ElementList `,` Elision `]`
205
+ export interface ArrayLiteral extends BaseParseNode {
206
+ readonly type: 'ArrayLiteral';
207
+ readonly ElementList: ElementList;
208
+ readonly hasTrailingComma: boolean;
209
+ }
210
+
211
+ // ElementList :
212
+ // Elision? AssignmentExpression
213
+ // Elision? SpreadElement
214
+ // ElementList `,` Elision? AssignmentExpression
215
+ // ElementList `,` Elision? SpreadElement
216
+ export type ElementList = readonly ElementListElement[];
217
+
218
+ // NON-SPEC
219
+ export type ElementListElement =
220
+ | AssignmentExpressionOrHigher
221
+ | SpreadElement
222
+ | Elision;
223
+
224
+ // Elision :
225
+ // `,`
226
+ // Elision `,`
227
+ export interface Elision extends BaseParseNode {
228
+ readonly type: 'Elision';
229
+ }
230
+
231
+ // SpreadElement :
232
+ // `...` AssignmentExpression
233
+ export interface SpreadElement extends BaseParseNode {
234
+ readonly type: 'SpreadElement';
235
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
236
+ }
237
+
238
+ // ObjectLiteral :
239
+ // `{` `}`
240
+ // `{` PropertyDefinitionList `}`
241
+ // `{` PropertyDefinitionList `,` `}`
242
+ export interface ObjectLiteral extends BaseParseNode {
243
+ readonly type: 'ObjectLiteral';
244
+ readonly PropertyDefinitionList: PropertyDefinitionList;
245
+ readonly hasTrailingComma: boolean;
246
+ }
247
+
248
+ // PropertyDefinitionList :
249
+ // PropertyDefinition
250
+ // PropertyDefinitionList `,` PropertyDefinition
251
+ export type PropertyDefinitionList = readonly PropertyDefinitionLike[];
252
+
253
+ // PropertyDefinition :
254
+ // IdentifierReference
255
+ // CoverInitializedName
256
+ // PropertyName `:` AssignmentExpression
257
+ // MethodDefinition
258
+ // `...` AssignmentExpression
259
+ export type PropertyDefinitionLike =
260
+ | IdentifierReference
261
+ | CoverInitializedName
262
+ | PropertyDefinition
263
+ | MethodDefinitionLike;
264
+
265
+ // PropertyDefinition (partial) :
266
+ // PropertyName `:` AssignmentExpression
267
+ // `...` AssignmentExpression
268
+ export interface PropertyDefinition extends BaseParseNode {
269
+ readonly type: 'PropertyDefinition';
270
+ readonly PropertyName: PropertyNameLike | null;
271
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
272
+ }
273
+
274
+ // PropertyName :
275
+ // LiteralPropertyName
276
+ // ComputedPropertyName
277
+ //
278
+ // LiteralPropertyName :
279
+ // IdentifierName
280
+ // StringLiteral
281
+ // NumericLiteral
282
+ //
283
+ // ComputedPropertyName :
284
+ // `[` AssignmentExpression `]`
285
+ export type PropertyNameLike =
286
+ | PropertyName
287
+ | StringLiteral
288
+ | NumericLiteral
289
+ | IdentifierName;
290
+
291
+ // PropertyName (partial) :
292
+ // ComputedPropertyName
293
+ //
294
+ // ComputedPropertyName :
295
+ // `[` AssignmentExpression `]`
296
+ export interface PropertyName extends BaseParseNode {
297
+ readonly type: 'PropertyName';
298
+ readonly ComputedPropertyName: AssignmentExpressionOrHigher;
299
+ }
300
+
301
+ // CoverInitializedName :
302
+ // IdentifierReference Initializer
303
+ export interface CoverInitializedName extends BaseParseNode {
304
+ readonly type: 'CoverInitializedName';
305
+ readonly IdentifierReference: IdentifierReference;
306
+ readonly Initializer: Initializer | null;
307
+ }
308
+
309
+ // Initializer :
310
+ // `=` AssignmentExpression
311
+ export type Initializer = AssignmentExpressionOrHigher;
312
+
313
+ // TemplateLiteral :
314
+ // NoSubstitutionTemplate
315
+ // SubstitutionTemplate
316
+ //
317
+ // SubstitutionTemplate :
318
+ // TemplateHead Expression TemplateSpans
319
+ //
320
+ // TemplateSpans :
321
+ // TemplateTail
322
+ // TemplateMiddleList TemplateTail
323
+ //
324
+ // TemplateMiddleList :
325
+ // TemplateMiddle Expression
326
+ // TemplateMiddleList TemplateMiddle Expression
327
+ export interface TemplateLiteral extends BaseParseNode {
328
+ readonly type: 'TemplateLiteral';
329
+ readonly TemplateSpanList: readonly string[];
330
+ readonly ExpressionList: readonly Expression[];
331
+ }
332
+
333
+ // MemberExpression :
334
+ // PrimaryExpression
335
+ // MemberExpression `[` Expression `]`
336
+ // MemberExpression `.` IdentifierName
337
+ // MemberExpression TemplateLiteral
338
+ // SuperProperty
339
+ // MetaProperty
340
+ // `new` MemberExpression Arguments
341
+ // MemberExpression `.` PrivateIdentifier
342
+ export type MemberExpressionOrHigher =
343
+ | PrimaryExpression
344
+ | MemberExpression
345
+ | SuperProperty
346
+ | MetaProperty
347
+ | NewExpression;
348
+
349
+ // MemberExpression :
350
+ // MemberExpression `[` Expression `]`
351
+ // MemberExpression `.` IdentifierName
352
+ // MemberExpression `.` PrivateIdentifier
353
+ export interface MemberExpression extends BaseParseNode {
354
+ readonly type: 'MemberExpression';
355
+
356
+ /// MemberExpression : MemberExpression `[` Expression `]`
357
+ // readonly MemberExpression: LeftHandSideExpression; // NOTE: Should be MemberExpressionOrHigher
358
+ // readonly Expression: Expression | null;
359
+
360
+ /// MemberExpression : MemberExpression `.` IdentifierName
361
+ // readonly MemberExpression: LeftHandSideExpression; // NOTE: Should be MemberExpressionOrHigher
362
+ // readonly IdentifierName: IdentifierName | null;
363
+
364
+ /// MemberExpression : MemberExpression `.` PrivateIdentifier
365
+ // readonly MemberExpression: LeftHandSideExpression; // NOTE: Should be MemberExpressionOrHigher
366
+ // readonly PrivateIdentifier: PrivateIdentifier | null;
367
+
368
+ readonly MemberExpression: LeftHandSideExpression; // NOTE: Should be MemberExpressionOrHigher
369
+ readonly Expression: Expression | null;
370
+ readonly IdentifierName: IdentifierName | null;
371
+ readonly PrivateIdentifier: PrivateIdentifier | null;
372
+ }
373
+
374
+ // SuperProperty :
375
+ // super `[` Expression `]`
376
+ // super `.` IdentifierName
377
+ export interface SuperProperty extends BaseParseNode {
378
+ readonly type: 'SuperProperty';
379
+
380
+ /// SuperProperty : super `[` Expression `]`
381
+ // readonly Expression: Expression | null;
382
+
383
+ /// SuperProperty : super `.` IdentifierName
384
+ // readonly IdentifierName: IdentifierName | null;
385
+
386
+ readonly Expression: Expression | null;
387
+ readonly IdentifierName: IdentifierName | null;
388
+ }
389
+
390
+ // MetaProperty :
391
+ // NewTarget
392
+ // ImportMeta
393
+ export type MetaProperty =
394
+ | NewTarget
395
+ | ImportMeta;
396
+
397
+ // NewTarget :
398
+ // `new` `.` `target`
399
+ export interface NewTarget extends BaseParseNode {
400
+ readonly type: 'NewTarget';
401
+ }
402
+
403
+ // ImportMeta :
404
+ // `import` `.` `meta`
405
+ export interface ImportMeta extends BaseParseNode {
406
+ readonly type: 'ImportMeta';
407
+ }
408
+
409
+ // NewExpression :
410
+ // MemberExpression
411
+ // `new` NewExpression
412
+ export type NewExpressionOrHigher =
413
+ | MemberExpressionOrHigher
414
+ | NewExpression;
415
+
416
+ // NewExpression (partial) :
417
+ // `new` NewExpression
418
+ //
419
+ // MemberExpression (partial) :
420
+ // `new` MemberExpression Arguments
421
+ export interface NewExpression extends BaseParseNode {
422
+ readonly type: 'NewExpression';
423
+ // NOTE: Should be NewExpressionOrHigher | MemberExpressionOrHigher
424
+ readonly MemberExpression: LeftHandSideExpression;
425
+ readonly Arguments: Arguments | null;
426
+ }
427
+
428
+ // CallExpression :
429
+ // CoverCallExpressionAndAsyncArrowHead
430
+ // SuperCall
431
+ // ImportCall
432
+ // CallExpression Arguments
433
+ // CallExpression `[` Expression `]`
434
+ // CallExpression `.` IdentifierName
435
+ // CallExpression TemplateLiteral
436
+ // CallExpression `.` PrivateIdentifier
437
+ export type CallExpressionOrHigher =
438
+ // CoverCallExpressionAndAsyncArrowHead
439
+ | SuperCall
440
+ | ImportCall
441
+ | CallExpression
442
+ | MemberExpression
443
+ | TaggedTemplateExpression;
444
+
445
+ // CallExpression (partial) :
446
+ // CoverCallExpressionAndAsyncArrowHead
447
+ // CallExpression Arguments
448
+ //
449
+ // CallMemberExpression (refined) :
450
+ // MemberExpression Arguments
451
+ export interface CallExpression extends BaseParseNode {
452
+ readonly type: 'CallExpression';
453
+ readonly CallExpression: CallExpressionOrHigher | MemberExpressionOrHigher;
454
+ readonly Arguments: Arguments;
455
+ // NON-SPEC
456
+ readonly arrowInfo?: ArrowInfo;
457
+ }
458
+
459
+ // CallExpression (partial) :
460
+ // CallExpression TemplateLiteral
461
+ //
462
+ // MemberExpression (partial) :
463
+ // MemberExpression TemplateLiteral
464
+ export interface TaggedTemplateExpression extends BaseParseNode {
465
+ readonly type: 'TaggedTemplateExpression';
466
+ readonly MemberExpression: CallExpressionOrHigher | MemberExpressionOrHigher;
467
+ readonly TemplateLiteral: TemplateLiteral;
468
+ // NON-SPEC
469
+ readonly arrowInfo?: ArrowInfo;
470
+ }
471
+
472
+ // SuperCall :
473
+ // `super` Arguments
474
+ export interface SuperCall extends BaseParseNode {
475
+ readonly type: 'SuperCall';
476
+ readonly Arguments: Arguments;
477
+ }
478
+
479
+ // ImportCall :
480
+ // `import` `(` AssignmentExpression `,`? `)`
481
+ // `import` `(` AssignmentExpression `,` AssignmentExpression `,`? `)`
482
+ // `import` `.` `source` `(` AssignmentExpression `,`? `)`
483
+ // `import` `.` `source` `(` AssignmentExpression `,` AssignmentExpression `,`? `)`
484
+ export interface ImportCall extends BaseParseNode {
485
+ readonly type: 'ImportCall';
486
+ readonly Phase: 'source' | 'defer' | 'evaluation';
487
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
488
+ readonly OptionsExpression?: AssignmentExpressionOrHigher;
489
+ }
490
+
491
+ // Arguments :
492
+ // `(` `)`
493
+ // `(` ArgumentList `)`
494
+ // `(` ArgumentList `,` `)`
495
+ //
496
+ // ArgumentList :
497
+ // AssignmentExpression
498
+ // `...` AssignmentExpression
499
+ // ArgumentList `,` AssignmentExpression
500
+ // ArgumentList `,` `...` AssignmentExpression
501
+ export type Arguments = readonly ArgumentListElement[] & { readonly location: Location };
502
+
503
+ // NON-SPEC
504
+ export type ArgumentListElement =
505
+ | AssignmentExpressionOrHigher
506
+ | AssignmentRestElement;
507
+
508
+ // OptionalExpression :
509
+ // MemberExpression OptionalChain
510
+ // CallExpression OptionalChain
511
+ // OptionalExpression OptionalChain
512
+ export interface OptionalExpression extends BaseParseNode {
513
+ readonly type: 'OptionalExpression';
514
+ // NOTE: The following doesn't match how this is handled in other nodes.
515
+ readonly MemberExpression: MemberExpressionOrHigher | CallExpressionOrHigher | OptionalExpression;
516
+ readonly OptionalChain: OptionalChain;
517
+ }
518
+
519
+ // OptionalChain :
520
+ // `?.` Arguments
521
+ // `?.` `[` Expression `]`
522
+ // `?.` IdentifierName
523
+ // `?.` PrivateIdentifier
524
+ // OptionalChain `?.` Arguments
525
+ // OptionalChain `?.` `[` Expression `]`
526
+ // OptionalChain `?.` IdentifierName
527
+ // OptionalChain `?.` PrivateIdentifier
528
+ export interface OptionalChain extends BaseParseNode {
529
+ readonly type: 'OptionalChain';
530
+
531
+ /// OptionalChain : `?.` Arguments
532
+ // readonly Arguments?: Arguments;
533
+
534
+ /// OptionalChain : `?.` `[` Expression `]`
535
+ // readonly Expression?: Expression;
536
+
537
+ /// OptionalChain : `?.` IdentifierName
538
+ // readonly IdentifierName?: IdentifierName;
539
+
540
+ /// OptionalChain : `?.` PrivateIdentifier
541
+ // readonly PrivateIdentifier?: PrivateIdentifier;
542
+
543
+ /// OptionalChain : OptionalChain `?.` Arguments
544
+ // readonly OptionalChain: OptionalChain | null;
545
+ // readonly Arguments?: Arguments;
546
+
547
+ /// OptionalChain : OptionalChain `?.` `[` Expression `]`
548
+ // readonly OptionalChain: OptionalChain | null;
549
+ // readonly Expression?: Expression;
550
+
551
+ /// OptionalChain : OptionalChain `?.` IdentifierName
552
+ // readonly OptionalChain: OptionalChain | null;
553
+ // readonly IdentifierName?: IdentifierName;
554
+
555
+ /// OptionalChain : OptionalChain `?.` PrivateIdentifier
556
+ // readonly OptionalChain: OptionalChain | null;
557
+ // readonly PrivateIdentifier?: PrivateIdentifier;
558
+
559
+ readonly OptionalChain: OptionalChain | null;
560
+ readonly Arguments?: Arguments;
561
+ readonly Expression?: Expression;
562
+ readonly IdentifierName?: IdentifierName;
563
+ readonly PrivateIdentifier?: PrivateIdentifier;
564
+ }
565
+
566
+ // LeftHandSideExpression :
567
+ // NewExpression
568
+ // CallExpression
569
+ // OptionalExpression
570
+ export type LeftHandSideExpression =
571
+ | NewExpressionOrHigher
572
+ | CallExpressionOrHigher
573
+ | OptionalExpression;
574
+
575
+ // UpdateExpression :
576
+ // LeftHandSideExpression
577
+ // LeftHandSideExpression [no LineTerminator here] `++`
578
+ // LeftHandSideExpression [no LineTerminator here] `--`
579
+ // `++` UnaryExpression
580
+ // `--` UnaryExpression
581
+ export type UpdateExpressionOrHigher =
582
+ | LeftHandSideExpression
583
+ | UpdateExpression;
584
+
585
+ // UpdateExpression (partial) :
586
+ // LeftHandSideExpression [no LineTerminator here] `++`
587
+ // LeftHandSideExpression [no LineTerminator here] `--`
588
+ // `++` UnaryExpression
589
+ // `--` UnaryExpression
590
+ export interface UpdateExpression extends BaseParseNode {
591
+ readonly type: 'UpdateExpression';
592
+
593
+ /// UpdateExpression :
594
+ /// LeftHandSideExpression [no LineTerminator here] `++`
595
+ /// LeftHandSideExpression [no LineTerminator here] `--`
596
+ // readonly LeftHandSideExpression: LeftHandSideExpression | null;
597
+ // readonly operator: '++' | '--';
598
+
599
+ /// UpdateExpression :
600
+ /// `++` UnaryExpression
601
+ /// `--` UnaryExpression
602
+ // readonly operator: '++' | '--';
603
+ // readonly UnaryExpression: UnaryExpressionOrHigher | null;
604
+
605
+ readonly operator: '++' | '--';
606
+ readonly LeftHandSideExpression: LeftHandSideExpression | null;
607
+ readonly UnaryExpression: UnaryExpressionOrHigher | null;
608
+ }
609
+
610
+ // UnaryExpression :
611
+ // UpdateExpression
612
+ // `delete` UnaryExpression
613
+ // `void` UnaryExpression
614
+ // `typeof` UnaryExpression
615
+ // `+` UnaryExpression
616
+ // `-` UnaryExpression
617
+ // `~` UnaryExpression
618
+ // `!` UnaryExpression
619
+ // [+Await] AwaitExpression
620
+ export type UnaryExpressionOrHigher =
621
+ | UpdateExpressionOrHigher
622
+ | UnaryExpression
623
+ | AwaitExpression;
624
+
625
+ // UnaryExpression (partial) :
626
+ // `delete` UnaryExpression
627
+ // `void` UnaryExpression
628
+ // `typeof` UnaryExpression
629
+ // `+` UnaryExpression
630
+ // `-` UnaryExpression
631
+ // `~` UnaryExpression
632
+ // `!` UnaryExpression
633
+ export interface UnaryExpression extends BaseParseNode {
634
+ readonly type: 'UnaryExpression';
635
+ readonly operator: 'delete' | 'void' | 'typeof' | '+' | '-' | '~' | '!';
636
+ readonly UnaryExpression: UnaryExpressionOrHigher;
637
+ }
638
+
639
+ // ExponentiationExpression :
640
+ // UnaryExpression
641
+ // UpdateExpresion `**` ExponentiationExpression
642
+ export type ExponentiationExpressionOrHigher =
643
+ | UnaryExpressionOrHigher
644
+ | ExponentiationExpression;
645
+
646
+ // ExponentiationExpression (partial) :
647
+ // UpdateExpresion `**` ExponentiationExpression
648
+ export interface ExponentiationExpression extends BaseParseNode {
649
+ readonly type: 'ExponentiationExpression';
650
+ readonly UpdateExpression: UpdateExpressionOrHigher;
651
+ readonly ExponentiationExpression: ExponentiationExpressionOrHigher;
652
+ }
653
+
654
+ // MultiplicativeExpression :
655
+ // ExponentiationExpression
656
+ // MultiplicativeExpression MultiplicativeOperator ExponentiationExpression
657
+ export type MultiplicativeExpressionOrHigher =
658
+ | ExponentiationExpressionOrHigher
659
+ | MultiplicativeExpression;
660
+
661
+ // MultiplicativeExpression (partial) :
662
+ // MultiplicativeExpression MultiplicativeOperator ExponentiationExpression
663
+ export interface MultiplicativeExpression extends BaseParseNode {
664
+ readonly type: 'MultiplicativeExpression';
665
+ readonly MultiplicativeExpression: MultiplicativeExpressionOrHigher;
666
+ readonly MultiplicativeOperator: MultiplicativeOperator;
667
+ readonly ExponentiationExpression: ExponentiationExpressionOrHigher;
668
+ }
669
+
670
+ // MultiplicativeOperator : one of
671
+ // `*` `/` `%`;
672
+ export type MultiplicativeOperator = '*' | '/' | '%';
673
+
674
+ // AdditiveExpression :
675
+ // MultiplicativeExpression
676
+ // AdditiveExpression `+` MultiplicativeExpression
677
+ // AdditiveExpression `-` MultiplicativeExpression
678
+ export type AdditiveExpressionOrHigher =
679
+ | MultiplicativeExpressionOrHigher
680
+ | AdditiveExpression;
681
+
682
+ // AdditiveExpression (partial) :
683
+ // AdditiveExpression `+` MultiplicativeExpression
684
+ // AdditiveExpression `-` MultiplicativeExpression
685
+ export interface AdditiveExpression extends BaseParseNode {
686
+ readonly type: 'AdditiveExpression';
687
+ readonly operator: '+' | '-';
688
+ readonly AdditiveExpression: AdditiveExpressionOrHigher;
689
+ readonly MultiplicativeExpression: MultiplicativeExpressionOrHigher;
690
+ }
691
+
692
+ // ShiftExpression :
693
+ // AdditiveExpression
694
+ // ShiftExpression `<<` AdditiveExpression
695
+ // ShiftExpression `>>` AdditiveExpression
696
+ // ShiftExpression `>>>` AdditiveExpression
697
+ export type ShiftExpressionOrHigher =
698
+ | AdditiveExpressionOrHigher
699
+ | ShiftExpression;
700
+
701
+ // ShiftExpression (partial) :
702
+ // ShiftExpression `<<` AdditiveExpression
703
+ // ShiftExpression `>>` AdditiveExpression
704
+ // ShiftExpression `>>>` AdditiveExpression
705
+ export interface ShiftExpression extends BaseParseNode {
706
+ readonly type: 'ShiftExpression';
707
+ readonly operator: '<<' | '>>' | '>>>';
708
+ readonly ShiftExpression: ShiftExpressionOrHigher;
709
+ readonly AdditiveExpression: AdditiveExpressionOrHigher;
710
+ }
711
+
712
+ // RelationalExpression :
713
+ // ShiftExpression
714
+ // RelationalExpression `<` ShiftExpression
715
+ // RelationalExpression `>` ShiftExpression
716
+ // RelationalExpression `<=` ShiftExpression
717
+ // RelationalExpression `>=` ShiftExpression
718
+ // RelationalExpression `instanceof` ShiftExpression
719
+ // RelationalExpression `in` ShiftExpression
720
+ export type RelationalExpressionOrHigher =
721
+ | ShiftExpressionOrHigher
722
+ | RelationalExpression;
723
+
724
+ // RelationalExpression (partial) :
725
+ // RelationalExpression `<` ShiftExpression
726
+ // RelationalExpression `>` ShiftExpression
727
+ // RelationalExpression `<=` ShiftExpression
728
+ // RelationalExpression `>=` ShiftExpression
729
+ // RelationalExpression `instanceof` ShiftExpression
730
+ // RelationalExpression `in` ShiftExpression
731
+ // PrivateIdentifier `in` ShiftExpression
732
+ export interface RelationalExpression extends BaseParseNode {
733
+ readonly type: 'RelationalExpression';
734
+ readonly operator: '<' | '>' | '<=' | '>=' | 'instanceof' | 'in';
735
+ readonly PrivateIdentifier?: PrivateIdentifier;
736
+ readonly RelationalExpression?: RelationalExpressionOrHigher;
737
+ readonly ShiftExpression: ShiftExpressionOrHigher;
738
+ }
739
+
740
+ // EqualityExpression :
741
+ // RelationalExpression
742
+ // EqualityExpression == RelationalExpression
743
+ // EqualityExpression != RelationalExpression
744
+ // EqualityExpression === RelationalExpression
745
+ // EqualityExpression !== RelationalExpression
746
+ export type EqualityExpressionOrHigher =
747
+ | RelationalExpressionOrHigher
748
+ | EqualityExpression;
749
+
750
+ // EqualityExpression (partial) :
751
+ // EqualityExpression == RelationalExpression
752
+ // EqualityExpression != RelationalExpression
753
+ // EqualityExpression === RelationalExpression
754
+ // EqualityExpression !== RelationalExpression
755
+ export interface EqualityExpression extends BaseParseNode {
756
+ readonly type: 'EqualityExpression';
757
+ readonly operator: '==' | '!=' | '===' | '!==';
758
+ readonly EqualityExpression: EqualityExpressionOrHigher;
759
+ readonly RelationalExpression: RelationalExpressionOrHigher;
760
+ }
761
+
762
+ // BitwiseANDExpression :
763
+ // EqualityExpression
764
+ // BitwiseANDExpression `^&` EqualityExpression
765
+ export type BitwiseANDExpressionOrHigher =
766
+ | EqualityExpressionOrHigher
767
+ | BitwiseANDExpression;
768
+
769
+ // BitwiseANDExpression (partial) :
770
+ // BitwiseANDExpression `^&` EqualityExpression
771
+ export interface BitwiseANDExpression extends BaseParseNode {
772
+ readonly type: 'BitwiseANDExpression';
773
+ readonly operator: '&';
774
+ readonly A: BitwiseANDExpressionOrHigher;
775
+ readonly B: EqualityExpressionOrHigher;
776
+ }
777
+
778
+ // BitwiseXORExpression :
779
+ // BitwiseANDExpression
780
+ // BitwiseXORExpression `^` BitwiseANDExpression
781
+ export type BitwiseXORExpressionOrHigher =
782
+ | BitwiseANDExpressionOrHigher
783
+ | BitwiseXORExpression;
784
+
785
+ // BitwiseXORExpression (partial) :
786
+ // BitwiseXORExpression `^` BitwiseANDExpression
787
+ export interface BitwiseXORExpression extends BaseParseNode {
788
+ readonly type: 'BitwiseXORExpression';
789
+ readonly operator: '^';
790
+ readonly A: BitwiseXORExpressionOrHigher;
791
+ readonly B: BitwiseANDExpressionOrHigher;
792
+ }
793
+
794
+ // BitwiseORExpression :
795
+ // BitwiseXORExpression
796
+ // BitwiseORExpression `|` BitwiseXORExpression
797
+ export type BitwiseORExpressionOrHigher =
798
+ | BitwiseXORExpressionOrHigher
799
+ | BitwiseORExpression;
800
+
801
+ // BitwiseORExpression (partial) :
802
+ // BitwiseORExpression `|` BitwiseXORExpression
803
+ export interface BitwiseORExpression extends BaseParseNode {
804
+ readonly type: 'BitwiseORExpression';
805
+ readonly operator: '|';
806
+ readonly A: BitwiseORExpressionOrHigher;
807
+ readonly B: BitwiseXORExpressionOrHigher;
808
+ }
809
+
810
+ // LogicalANDExpression :
811
+ // BitwiseORExpression
812
+ // LogicalANDExpression `&&` BitwiseORExpression
813
+ export type LogicalANDExpressionOrHigher =
814
+ | BitwiseORExpressionOrHigher
815
+ | LogicalANDExpression;
816
+
817
+ // LogicalANDExpression (partial) :
818
+ // LogicalANDExpression `&&` BitwiseORExpression
819
+ export interface LogicalANDExpression extends BaseParseNode {
820
+ readonly type: 'LogicalANDExpression';
821
+ readonly LogicalANDExpression: LogicalANDExpressionOrHigher;
822
+ readonly BitwiseORExpression: BitwiseORExpressionOrHigher;
823
+ }
824
+
825
+ // LogicalORExpression :
826
+ // LogicalANDExpression
827
+ // LogicalORExpression `||` LogicalANDExpression
828
+ export type LogicalORExpressionOrHigher =
829
+ | LogicalANDExpressionOrHigher
830
+ | LogicalORExpression;
831
+
832
+ // LogicalORExpression (partial) :
833
+ // LogicalORExpression `||` LogicalANDExpression
834
+ export interface LogicalORExpression extends BaseParseNode {
835
+ readonly type: 'LogicalORExpression';
836
+ readonly LogicalORExpression: LogicalORExpressionOrHigher;
837
+ readonly LogicalANDExpression: LogicalANDExpressionOrHigher;
838
+ }
839
+
840
+ // CoalesceExpression :
841
+ // CoalesceExpressionHead `??` BitwiseORExpression
842
+ export interface CoalesceExpression extends BaseParseNode {
843
+ readonly type: 'CoalesceExpression';
844
+ readonly CoalesceExpressionHead: CoalesceExpressionHead;
845
+ readonly BitwiseORExpression: BitwiseORExpressionOrHigher;
846
+ }
847
+
848
+ // CoalesceExpressionHead :
849
+ // CoalesceExpression
850
+ // BitwiseORExpression
851
+ export type CoalesceExpressionHead =
852
+ | BitwiseORExpressionOrHigher
853
+ | CoalesceExpression;
854
+
855
+ // ShortCircuitExpression :
856
+ // LogicalORExpression
857
+ // CoalesceExpression
858
+ export type ShortCircuitExpressionOrHigher =
859
+ | LogicalORExpressionOrHigher
860
+ | CoalesceExpression;
861
+
862
+ // ConditionalExpression :
863
+ // ShortCircuitExpression
864
+ // ShortCircuitExpression `?` AssignmentExpression `:` AssignmentExpression
865
+ export type ConditionalExpressionOrHigher =
866
+ | ShortCircuitExpressionOrHigher
867
+ | ConditionalExpression;
868
+
869
+ // ConditionalExpression (partial) :
870
+ // ShortCircuitExpression `?` AssignmentExpression `:` AssignmentExpression
871
+ export interface ConditionalExpression extends BaseParseNode {
872
+ readonly type: 'ConditionalExpression';
873
+ readonly ShortCircuitExpression: ShortCircuitExpressionOrHigher;
874
+ readonly AssignmentExpression_a: AssignmentExpressionOrHigher;
875
+ readonly AssignmentExpression_b: AssignmentExpressionOrHigher;
876
+ }
877
+
878
+ // AssignmentExpression :
879
+ // ConditionalExpression
880
+ // [+Yield] YieldExpression
881
+ // ArrowFunction
882
+ // AsyncArrowFunction
883
+ // LeftHandSideExpression `=` AssignmentExpression
884
+ // LeftHandSideExpression AssignmentOperator AssignmentExpression
885
+ // LeftHandSideExpression LogicalAssignmentOperator AssignmentExpression
886
+ export type AssignmentExpressionOrHigher =
887
+ | ConditionalExpressionOrHigher
888
+ | YieldExpression
889
+ | ArrowFunction
890
+ | AsyncArrowFunction
891
+ | AssignmentExpression;
892
+
893
+ // AssignmentExpression (partial) :
894
+ // LeftHandSideExpression `=` AssignmentExpression
895
+ // LeftHandSideExpression AssignmentOperator AssignmentExpression
896
+ // LeftHandSideExpression LogicalAssignmentOperator AssignmentExpression
897
+ //
898
+ export interface AssignmentExpression extends BaseParseNode {
899
+ readonly type: 'AssignmentExpression';
900
+ // NOTE: Should be LeftHandSideExpression, but some invalid nodes are allowed as they report early errors
901
+ readonly LeftHandSideExpression: AssignmentExpressionOrHigher;
902
+ readonly AssignmentOperator: '=' | AssignmentOperator | '&&=' | '||=' | '??=';
903
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
904
+ }
905
+
906
+ // AssignmentOperator : one of
907
+ // `*=` `/=` `%=` `+=` `-=` `<<=` `>>=` `>>>=` `&=` `^=` `|=` `**=`
908
+ export type AssignmentOperator = '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|=' | '**=';
909
+
910
+ // AssignmentRestElement :
911
+ // `...` DestructuringAssignmentTarget
912
+ //
913
+ // ArgumentList (partial) :
914
+ // `...` AssignmentExpression
915
+ // ArgumentList `,` `...` AssignmentExpression
916
+ export interface AssignmentRestElement extends BaseParseNode {
917
+ readonly type: 'AssignmentRestElement';
918
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
919
+ }
920
+
921
+ // NON-SPEC
922
+ export type BinaryExpressionOrHigher =
923
+ | BinaryExpression
924
+ | UnaryExpressionOrHigher;
925
+
926
+ // NON-SPEC
927
+ export type BinaryExpression =
928
+ | AssignmentExpression
929
+ | LogicalORExpression
930
+ | LogicalANDExpression
931
+ | BitwiseORExpression
932
+ | BitwiseXORExpression
933
+ | BitwiseANDExpression
934
+ | RelationalExpression
935
+ | EqualityExpression
936
+ | ShiftExpression
937
+ | AdditiveExpression
938
+ | MultiplicativeExpression
939
+ | ExponentiationExpression;
940
+
941
+ // Expression :
942
+ // AssignmentExpression
943
+ // Expression `,` AssignmentExpression
944
+ export type Expression =
945
+ | CommaOperator
946
+ | AssignmentExpressionOrHigher;
947
+
948
+ // Expression (partial) :
949
+ // Expression `,` AssignmentExpression
950
+ export interface CommaOperator extends BaseParseNode {
951
+ readonly type: 'CommaOperator';
952
+ readonly ExpressionList: readonly AssignmentExpressionOrHigher[];
953
+ }
954
+
955
+ // A.3 Statements
956
+ // https://tc39.es/ecma262/#sec-statements
957
+
958
+ // Statement :
959
+ // BlockStatement
960
+ // VariableStatement
961
+ // EmptyStatement
962
+ // ExpressionStatement
963
+ // IfStatement
964
+ // BreakableStatement
965
+ // ContinueStatement
966
+ // BreakStatement
967
+ // [+Return] ReturnStatement
968
+ // WithStatement
969
+ // LabelledStatement
970
+ // ThrowStatement
971
+ // TryStatement
972
+ // DebuggerStatement
973
+ export type Statement =
974
+ | BlockStatement
975
+ | VariableStatement
976
+ | EmptyStatement
977
+ | ExpressionStatement
978
+ | IfStatement
979
+ | BreakableStatement
980
+ | ContinueStatement
981
+ | BreakStatement
982
+ | ReturnStatement
983
+ | WithStatement
984
+ | LabelledStatement
985
+ | ThrowStatement
986
+ | TryStatement
987
+ | DebuggerStatement;
988
+
989
+ // Declaration :
990
+ // HoistableDeclaration
991
+ // ClassDeclaration
992
+ // LexicalDeclarationLike
993
+ export type Declaration =
994
+ | HoistableDeclaration
995
+ | ClassDeclaration
996
+ | LexicalDeclarationLike;
997
+
998
+ // HoistableDeclaration
999
+ // FunctionDeclaration
1000
+ // GeneratorDeclaration
1001
+ // AsyncFunctionDeclaration
1002
+ // AsyncGeneratorDeclaration
1003
+ export type HoistableDeclaration =
1004
+ | FunctionDeclaration
1005
+ | GeneratorDeclaration
1006
+ | AsyncFunctionDeclaration
1007
+ | AsyncGeneratorDeclaration;
1008
+
1009
+ // BreakableStatement :
1010
+ // IterationStatement
1011
+ // SwitchStatement
1012
+ export type BreakableStatement =
1013
+ | IterationStatement
1014
+ | SwitchStatement;
1015
+
1016
+ // BlockStatement :
1017
+ // Block
1018
+ export type BlockStatement =
1019
+ | Block;
1020
+
1021
+ // Block :
1022
+ // `{` StatementList `}`
1023
+ export interface Block extends BaseParseNode {
1024
+ readonly type: 'Block';
1025
+ readonly StatementList: StatementList;
1026
+ }
1027
+
1028
+ // StatementList :
1029
+ // StatementListItem
1030
+ // StatementList StatementListItem
1031
+ export type StatementList = readonly StatementListItem[];
1032
+
1033
+ // StatementListItem :
1034
+ // Statement
1035
+ // Declaration
1036
+ export type StatementListItem =
1037
+ | Statement
1038
+ | Declaration;
1039
+
1040
+ // LexicalDeclaration :
1041
+ // LetOrConst BindingList `;`
1042
+ // UsingDeclaration
1043
+ // [+Await] AwaitUsingDeclaration
1044
+ export type LexicalDeclarationLike =
1045
+ | LexicalDeclaration
1046
+ | UsingDeclaration
1047
+ | AwaitUsingDeclaration;
1048
+
1049
+ // LexicalDeclaration :
1050
+ // LetOrConst BindingList `;`
1051
+ export interface LexicalDeclaration extends BaseParseNode {
1052
+ readonly type: 'LexicalDeclaration';
1053
+ readonly LetOrConst: LetOrConst;
1054
+ readonly BindingList: BindingList;
1055
+ }
1056
+
1057
+ // UsingDeclaration :
1058
+ // `using` [no LineTerminator here] BindingList `;`
1059
+ export interface UsingDeclaration extends BaseParseNode {
1060
+ readonly type: 'UsingDeclaration';
1061
+ readonly BindingList: BindingList;
1062
+ }
1063
+
1064
+ // AwaitUsingDeclaration :
1065
+ // `await` [no LineTerminator here] `using` [no LineTerminator here] BindingList `;`
1066
+ export interface AwaitUsingDeclaration extends BaseParseNode {
1067
+ readonly type: 'AwaitUsingDeclaration';
1068
+ readonly BindingList: BindingList;
1069
+ }
1070
+
1071
+ // LetOrConst :
1072
+ // `let`
1073
+ // `const`
1074
+ export type LetOrConst =
1075
+ | 'let'
1076
+ | 'const';
1077
+
1078
+ // BindingList :
1079
+ // LexicalBinding
1080
+ // BindingList `,` LexicalBinding
1081
+ export type BindingList = readonly LexicalBinding[];
1082
+
1083
+ // LexicalBinding :
1084
+ // BindingIdentifier Initializer?
1085
+ // [+Pattern] BindingPattern Initializer
1086
+ export interface LexicalBinding extends BaseParseNode {
1087
+ readonly type: 'LexicalBinding';
1088
+
1089
+ // LexicalBinding : BindingIdentifier Initializer?
1090
+ readonly BindingIdentifier?: BindingIdentifier;
1091
+
1092
+ // LexicalBinding : BindingPattern Initializer
1093
+ readonly BindingPattern?: BindingPattern;
1094
+
1095
+ readonly Initializer: Initializer | null;
1096
+ }
1097
+
1098
+ // VariableStatement :
1099
+ // `var` VariableDeclarationList `;`
1100
+ export interface VariableStatement extends BaseParseNode {
1101
+ readonly type: 'VariableStatement';
1102
+ readonly VariableDeclarationList: VariableDeclarationList;
1103
+ }
1104
+
1105
+ // VariableDeclarationList :
1106
+ // VariableDeclaration
1107
+ // VariableDeclarationList `,` VariableDeclaration
1108
+ export type VariableDeclarationList = readonly VariableDeclaration[];
1109
+
1110
+ // VariableDeclaration :
1111
+ // BindingIdentifier Initializer?
1112
+ // BindingPattern Initializer
1113
+ export interface VariableDeclaration extends BaseParseNode {
1114
+ readonly type: 'VariableDeclaration';
1115
+ readonly BindingPattern?: BindingPattern;
1116
+ readonly BindingIdentifier?: BindingIdentifier;
1117
+ readonly Initializer: Initializer | null;
1118
+ }
1119
+
1120
+ // BindingPattern :
1121
+ // ObjectBindingPattern
1122
+ // ArrayBindingPattern
1123
+ export type BindingPattern =
1124
+ | ObjectBindingPattern
1125
+ | ArrayBindingPattern;
1126
+
1127
+ // ObjectBindingPattern :
1128
+ // `{` `}`
1129
+ // `{` BindingRestProperty `}`
1130
+ // `{` BindingPropertyList `}`
1131
+ // `{` BindingPropertyList `,` BindingRestProperty? `}`
1132
+ export interface ObjectBindingPattern extends BaseParseNode {
1133
+ readonly type: 'ObjectBindingPattern';
1134
+ readonly BindingPropertyList: BindingPropertyList;
1135
+ readonly BindingRestProperty?: BindingRestProperty;
1136
+ }
1137
+
1138
+ // ArrayBindingPattern :
1139
+ // `[` Elision? BindingRestElement `]`
1140
+ // `[` BindingElementList `]`
1141
+ // `[` BindingElementList `,` Elision? BindingRestElement `]`
1142
+ export interface ArrayBindingPattern extends BaseParseNode {
1143
+ readonly type: 'ArrayBindingPattern';
1144
+ readonly BindingElementList: BindingElementList;
1145
+ readonly BindingRestElement: BindingRestElement;
1146
+ }
1147
+
1148
+ // BindingRestProperty :
1149
+ // `...` BindingIdentifier
1150
+ export interface BindingRestProperty extends BaseParseNode {
1151
+ readonly type: 'BindingRestProperty';
1152
+ readonly BindingIdentifier: BindingIdentifier;
1153
+ }
1154
+
1155
+ // BindingPropertyList :
1156
+ // BindingProperty
1157
+ // BindingPropertyList BindingProperty
1158
+ export type BindingPropertyList = readonly BindingPropertyLike[];
1159
+
1160
+ // BindingElementList :
1161
+ // BindingElisionElement
1162
+ // BindingElementList `,` BindingElisionElement
1163
+ export type BindingElementList = readonly BindingElisionElement[];
1164
+
1165
+ // BindingElisionElement :
1166
+ // Elision? BindingElement
1167
+ export type BindingElisionElement =
1168
+ | BindingElementLike
1169
+ | Elision;
1170
+
1171
+ // BindingProperty :
1172
+ // SingleNameBinding
1173
+ // PropertyName `:` BindingElement
1174
+ export type BindingPropertyLike =
1175
+ | BindingProperty
1176
+ | SingleNameBinding;
1177
+
1178
+ // BindingProperty :
1179
+ // PropertyName `:` BindingElement
1180
+ export interface BindingProperty extends BaseParseNode {
1181
+ readonly type: 'BindingProperty';
1182
+ readonly PropertyName: PropertyNameLike;
1183
+ readonly BindingElement: BindingElementLike;
1184
+ }
1185
+
1186
+ // BindingElement :
1187
+ // SingleNameBinding
1188
+ // BindingPattern Initializer?
1189
+ export type BindingElementLike =
1190
+ | BindingElement
1191
+ | SingleNameBinding;
1192
+
1193
+ // BindingElement (partial) :
1194
+ // BindingPattern Initializer?
1195
+ export interface BindingElement extends BaseParseNode {
1196
+ readonly type: 'BindingElement';
1197
+ readonly BindingPattern: BindingPattern;
1198
+ readonly Initializer: Initializer | null;
1199
+ }
1200
+
1201
+ // SingleNameBinding :
1202
+ // BindingIdentifier Initializer?
1203
+ export interface SingleNameBinding extends BaseParseNode {
1204
+ readonly type: 'SingleNameBinding';
1205
+ readonly BindingIdentifier: BindingIdentifier;
1206
+ readonly Initializer: Initializer | null;
1207
+ }
1208
+
1209
+ // BindingRestElement :
1210
+ // `...` BindingIdentifier
1211
+ // `...` BindingPattern
1212
+ export interface BindingRestElement extends BaseParseNode {
1213
+ readonly type: 'BindingRestElement';
1214
+ readonly BindingIdentifier?: BindingIdentifier;
1215
+ readonly BindingPattern?: BindingPattern;
1216
+ }
1217
+
1218
+ // EmptyStatement :
1219
+ // `;`
1220
+ export interface EmptyStatement extends BaseParseNode {
1221
+ readonly type: 'EmptyStatement';
1222
+ }
1223
+
1224
+ // ExpressionStatement :
1225
+ // [lookahead != `{`, `function`, `async` [no LineTerminator here] `function`, `class`, `let` `[` ] Expression `;`
1226
+ export interface ExpressionStatement extends BaseParseNode {
1227
+ readonly type: 'ExpressionStatement';
1228
+ readonly Expression: Expression;
1229
+ }
1230
+
1231
+ // IfStatement :
1232
+ // `if` `(` Expression `)` Statement `else` Statement
1233
+ // `if` `(` Expression `)` Statement [lookahead ≠ `else`]
1234
+ export interface IfStatement extends BaseParseNode {
1235
+ readonly type: 'IfStatement';
1236
+ readonly Expression: Expression;
1237
+ readonly Statement_a: Statement;
1238
+ readonly Statement_b: Statement;
1239
+ }
1240
+
1241
+ // IterationStatement :
1242
+ // DoWhileStatement
1243
+ // WhileStatement
1244
+ // ForStatement
1245
+ // ForInOfStatement
1246
+ export type IterationStatement =
1247
+ | DoWhileStatement
1248
+ | WhileStatement
1249
+ | ForStatement
1250
+ | ForInOfStatement;
1251
+
1252
+ // DoWhileStatement :
1253
+ // `do` Statement `while` `(` Expression `)` `;`
1254
+ export interface DoWhileStatement extends BaseParseNode {
1255
+ readonly type: 'DoWhileStatement';
1256
+ readonly Statement: Statement;
1257
+ readonly Expression: Expression;
1258
+ }
1259
+
1260
+ // WhileStatement :
1261
+ // `while` `(` Expression `)` Statement
1262
+ export interface WhileStatement extends BaseParseNode {
1263
+ readonly type: 'WhileStatement';
1264
+ readonly Expression: Expression;
1265
+ readonly Statement: Statement;
1266
+ }
1267
+
1268
+ // ForStatement :
1269
+ // `for` `(` [lookahead != `let` `[`] Expression? `;` Expression? `;` Expression? `)` Statement
1270
+ // `for` `(` `var` VariableDeclarationList `;` Expression? `;` Expression? `)` Statement
1271
+ // `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement
1272
+ export interface ForStatement extends BaseParseNode {
1273
+ readonly type: 'ForStatement';
1274
+
1275
+ /// ForStatement : `for` `(` [lookahead != `let` `[`] Expression? `;` Expression? `;` Expression? `)` Statement
1276
+ // Expression_a?: Expression;
1277
+ // Expression_b?: Expression;
1278
+ // Expression_c?: Expression;
1279
+ // Statement: Statement;
1280
+
1281
+ /// ForStatement : `for` `(` `var` VariableDeclarationList `;` Expression? `;` Expression? `)` Statement
1282
+ // VariableDeclarationList: VariableDeclarationList;
1283
+ // Expression_a?: Expression;
1284
+ // Expression_b?: Expression;
1285
+ // Statement: Statement;
1286
+
1287
+ /// ForStatement : `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement
1288
+ // LexicalDeclaration?: LexicalDeclarationLike;
1289
+ // Expression_a?: Expression;
1290
+ // Expression_b?: Expression;
1291
+ // Statement: Statement;
1292
+
1293
+ readonly VariableDeclarationList: VariableDeclarationList;
1294
+ readonly LexicalDeclaration?: LexicalDeclarationLike;
1295
+ readonly Expression_a?: Expression;
1296
+ readonly Expression_b?: Expression;
1297
+ readonly Expression_c?: Expression;
1298
+ readonly Statement: Statement;
1299
+ }
1300
+
1301
+ // ForInOfStatement :
1302
+ // `for` `(` [lookahead != `let` `[`] LeftHandSideExpression `in` Expression `)` Statement
1303
+ // `for` `(` `var` ForBinding `in` Expression `)` Statement
1304
+ // `for` `(` ForDeclaration `in` Expression `)` Statement
1305
+ // `for` `(` [lookahead != { `let`, `async` `of` }] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1306
+ // `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1307
+ // `for` `(` [lookahead != `using` `of`] ForDeclaration `of` AssignmentExpression `)` Statement
1308
+ // [+Await] `for` `await` `(` [lookahead != `let`] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1309
+ // [+Await] `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1310
+ // [+Await] `for` `await` `(` [lookahead != `using` `of`] ForDeclaration `of` AssignmentExpression `)` Statement
1311
+ export type ForInOfStatement =
1312
+ | ForInStatement
1313
+ | ForOfStatement
1314
+ | ForAwaitStatement;
1315
+
1316
+ // ForInOfStatement (partial) :
1317
+ // `for` `(` [lookahead != `let` `[`] LeftHandSideExpression `in` Expression `)` Statement
1318
+ // `for` `(` `var` ForBinding `in` Expression `)` Statement
1319
+ // `for` `(` ForDeclaration `in` Expression `)` Statement
1320
+ export interface ForInStatement extends BaseParseNode {
1321
+ readonly type: 'ForInStatement';
1322
+
1323
+ /// ForInStatement : `for` `(` [lookahead != `let` `[`] LeftHandSideExpression `in` Expression `)` Statement
1324
+ // LeftHandSideExpression?: LeftHandSideExpression;
1325
+ // Expression: Expression;
1326
+ // Statement: Statement;
1327
+
1328
+ /// ForInStatement : `for` `(` `var` ForBinding `in` Expression `)` Statement
1329
+ // ForBinding?: ForBinding;
1330
+ // Expression: Expression;
1331
+ // Statement: Statement;
1332
+
1333
+ /// ForInStatement : `for` `(` ForDeclaration `in` Expression `)` Statement
1334
+ // ForDeclaration?: ForDeclaration;
1335
+ // Expression: Expression;
1336
+ // Statement: Statement;
1337
+
1338
+ readonly LeftHandSideExpression?: LeftHandSideExpression;
1339
+ readonly ForBinding?: ForBinding;
1340
+ readonly ForDeclaration?: ForDeclaration;
1341
+ readonly Expression: Expression;
1342
+ readonly Statement: Statement;
1343
+ }
1344
+
1345
+ // ForInOfStatement (partial) :
1346
+ // `for` `(` [lookahead != { `let`, `async` `of` }] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1347
+ // `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1348
+ // `for` `(` [lookahead != `using` `of`] ForDeclaration `of` AssignmentExpression `)` Statement
1349
+ export interface ForOfStatement extends BaseParseNode {
1350
+ readonly type: 'ForOfStatement';
1351
+
1352
+ /// ForOfStatement : `for` `(` [lookahead != { `let`, `async` `of` }] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1353
+ // LeftHandSideExpression?: LeftHandSideExpression;
1354
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1355
+ // Statement: Statement;
1356
+
1357
+ /// ForOfStatement : `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1358
+ // ForBinding?: ForBinding;
1359
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1360
+ // Statement: Statement;
1361
+
1362
+ /// ForOfStatement : `for` `(` [lookahead != `using` `of`] ForDeclaration `of` AssignmentExpression `)` Statement
1363
+ // ForDeclaration?: ForDeclaration;
1364
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1365
+ // Statement: Statement;
1366
+
1367
+ readonly LeftHandSideExpression?: LeftHandSideExpression;
1368
+ readonly ForDeclaration?: ForDeclaration;
1369
+ readonly ForBinding?: ForBinding;
1370
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
1371
+ readonly Statement: Statement;
1372
+ }
1373
+
1374
+ // ForInOfStatement (partial) :
1375
+ // [+Await] `for` `await` `(` [lookahead != `let`] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1376
+ // [+Await] `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1377
+ // [+Await] `for` `await` `(` [lookahead != `using` `of`] ForDeclaration `of` AssignmentExpression `)` Statement
1378
+ export interface ForAwaitStatement extends BaseParseNode {
1379
+ readonly type: 'ForAwaitStatement';
1380
+
1381
+ /// ForOfStatement : `for` `await` `(` [lookahead != `let`] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1382
+ // LeftHandSideExpression?: LeftHandSideExpression;
1383
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1384
+ // Statement: Statement;
1385
+
1386
+ /// ForOfStatement : `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1387
+ // ForBinding?: ForBinding;
1388
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1389
+ // Statement: Statement;
1390
+
1391
+ /// ForOfStatement : `for` `await` `(` [lookahead != `using` `of`] ForDeclaration `of` AssignmentExpression `)` Statement
1392
+ // ForDeclaration?: ForDeclaration;
1393
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1394
+ // Statement: Statement;
1395
+
1396
+ readonly LeftHandSideExpression?: LeftHandSideExpression;
1397
+ readonly ForDeclaration?: ForDeclaration;
1398
+ readonly ForBinding?: ForBinding;
1399
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
1400
+ readonly Statement: Statement;
1401
+ }
1402
+
1403
+ // ForDeclaration :
1404
+ // LetOrConst ForBinding
1405
+ // [+Using] `using` [no LineTerminator here] ForBinding
1406
+ // [+Using, +Await] `await` [no LineTerminator here] `using` [no LineTerminator here] ForBinding
1407
+ export type ForDeclaration =
1408
+ | ForDeclaration_LetOrConst
1409
+ | ForDeclaration_Using
1410
+ | ForDeclaration_AwaitUsing;
1411
+
1412
+ // ForDeclaration (partial) :
1413
+ // LetOrConst ForBinding
1414
+ export interface ForDeclaration_LetOrConst extends BaseParseNode {
1415
+ readonly type: 'ForDeclaration';
1416
+ readonly production: 'LetOrConst';
1417
+ readonly LetOrConst: LetOrConst;
1418
+ readonly ForBinding: ForBinding;
1419
+ }
1420
+
1421
+ // ForDeclaration (partial) :
1422
+ // [+Using] `using` [no LineTerminator here] ForBinding
1423
+ export interface ForDeclaration_Using extends BaseParseNode {
1424
+ readonly type: 'ForDeclaration';
1425
+ readonly production: 'Using';
1426
+ readonly ForBinding: ForBinding;
1427
+ }
1428
+
1429
+ // ForDeclaration (partial) :
1430
+ // [+Using, +Await] `await` [no LineTerminator here] `using`
1431
+ // [no LineTerminator here] ForBinding
1432
+ export interface ForDeclaration_AwaitUsing extends BaseParseNode {
1433
+ readonly type: 'ForDeclaration';
1434
+ readonly production: 'AwaitUsing';
1435
+ readonly ForBinding: ForBinding;
1436
+ }
1437
+
1438
+ // ForBinding :
1439
+ // BindingIdentifier
1440
+ // [+Pattern] BindingPattern
1441
+ export interface ForBinding extends BaseParseNode {
1442
+ readonly type: 'ForBinding';
1443
+ readonly BindingIdentifier?: BindingIdentifier;
1444
+ readonly BindingPattern?: BindingPattern;
1445
+ }
1446
+
1447
+ // ContinueStatement :
1448
+ // `continue` `;`
1449
+ // `continue` [no LineTerminator here] LabelIdentifier `;`
1450
+ export interface ContinueStatement extends BaseParseNode {
1451
+ readonly type: 'ContinueStatement';
1452
+ readonly LabelIdentifier: LabelIdentifier | null;
1453
+ }
1454
+
1455
+ // BreakStatement :
1456
+ // `break` `;`
1457
+ // `break` [no LineTerminator here] LabelIdentifier `;`
1458
+ export interface BreakStatement extends BaseParseNode {
1459
+ readonly type: 'BreakStatement';
1460
+ readonly LabelIdentifier: LabelIdentifier | null;
1461
+ }
1462
+
1463
+ // ReturnStatement :
1464
+ // `return` `;`
1465
+ // `return` [no LineTerminator here] Expression `;`
1466
+ export interface ReturnStatement extends BaseParseNode {
1467
+ readonly type: 'ReturnStatement';
1468
+ readonly Expression: Expression | null;
1469
+ }
1470
+
1471
+ // WithStatement :
1472
+ // `with` `(` Expression `)` Statement
1473
+ export interface WithStatement extends BaseParseNode {
1474
+ readonly type: 'WithStatement';
1475
+ readonly Expression: Expression;
1476
+ readonly Statement: Statement;
1477
+ }
1478
+
1479
+ // SwitchStatement :
1480
+ // `switch` `(` Expression `)` CaseBlock
1481
+ export interface SwitchStatement extends BaseParseNode {
1482
+ readonly type: 'SwitchStatement';
1483
+ readonly Expression: Expression;
1484
+ readonly CaseBlock: CaseBlock;
1485
+ }
1486
+
1487
+ // CaseBlock :
1488
+ // `{` CaseClauses? `}`
1489
+ // `{` CaseClauses? DefaultClause CaseClauses? `}`
1490
+ export interface CaseBlock extends BaseParseNode {
1491
+ readonly type: 'CaseBlock';
1492
+ readonly CaseClauses_a?: CaseClauses;
1493
+ readonly DefaultClause?: DefaultClause;
1494
+ readonly CaseClauses_b?: CaseClauses;
1495
+ }
1496
+
1497
+ // CaseClauses :
1498
+ // CaseClause
1499
+ // CaseClauses CauseClause
1500
+ export type CaseClauses = readonly CaseClause[];
1501
+
1502
+ // CaseClause :
1503
+ // `case` Expression `:` StatementList?
1504
+ export interface CaseClause extends BaseParseNode {
1505
+ readonly type: 'CaseClause';
1506
+ readonly Expression: Expression;
1507
+ readonly StatementList: StatementList;
1508
+ }
1509
+
1510
+ // DefaultClause :
1511
+ // `default` `:` StatementList?
1512
+ export interface DefaultClause extends BaseParseNode {
1513
+ readonly type: 'DefaultClause';
1514
+ readonly StatementList: StatementList;
1515
+ }
1516
+
1517
+ // LabelledStatement :
1518
+ // LabelIdentifier `:` LabelledItem
1519
+ export interface LabelledStatement extends BaseParseNode {
1520
+ readonly type: 'LabelledStatement';
1521
+ readonly LabelIdentifier: LabelIdentifier;
1522
+ readonly LabelledItem: LabelledItem;
1523
+ }
1524
+
1525
+ // LabelledItem :
1526
+ // Statement
1527
+ // FunctionDeclaration
1528
+ export type LabelledItem =
1529
+ | Statement
1530
+ | FunctionDeclaration; // SPEC QUESTION: why only |FunctionDeclaration| and not generators or async functions?
1531
+
1532
+ // ThrowStatement :
1533
+ // `throw` [no LineTerminator here] Expression `;`
1534
+ export interface ThrowStatement extends BaseParseNode {
1535
+ readonly type: 'ThrowStatement';
1536
+ readonly Expression: Expression;
1537
+ }
1538
+
1539
+ // TryStatement :
1540
+ // `try` Block Catch
1541
+ // `try` Block Finally
1542
+ // `try` Block Catch Finally
1543
+ export interface TryStatement extends BaseParseNode {
1544
+ readonly type: 'TryStatement';
1545
+ readonly Block: Block;
1546
+ readonly Catch: Catch | null;
1547
+ readonly Finally: Finally | null;
1548
+ }
1549
+
1550
+ // Catch :
1551
+ // `catch` `(` CatchParameter `)` Block
1552
+ // `catch` Block
1553
+ //
1554
+ // CatchParameter :
1555
+ // BindingIdentifier
1556
+ // BindingPattern
1557
+ export interface Catch extends BaseParseNode {
1558
+ readonly type: 'Catch';
1559
+ readonly CatchParameter: CatchParameter | null;
1560
+ readonly Block: Block;
1561
+ }
1562
+
1563
+ // Finally :
1564
+ // `finally` Block
1565
+ export type Finally =
1566
+ | Block;
1567
+
1568
+ // CatchParameter :
1569
+ // BindingPattern
1570
+ // BindingIdentifier
1571
+ export type CatchParameter =
1572
+ | BindingPattern
1573
+ | BindingIdentifier;
1574
+
1575
+ // DebuggerStatement :
1576
+ // `debugger` `;`
1577
+ export interface DebuggerStatement extends BaseParseNode {
1578
+ readonly type: 'DebuggerStatement';
1579
+ }
1580
+
1581
+ // A.4 Functions and Classes
1582
+ // https://tc39.es/ecma262/#sec-functions-and-classes
1583
+
1584
+ // UniqueFormalParameters :
1585
+ // FormalParameters
1586
+ export type UniqueFormalParameters =
1587
+ | FormalParameters;
1588
+
1589
+ // FormalParameters :
1590
+ // [empty]
1591
+ // FunctionRestParameter
1592
+ // FormalParameterList
1593
+ // FormalParameterList `,`
1594
+ // FormalParameterList `,` FunctionRestParameter
1595
+ export type FormalParameters = readonly FormalParametersElement[];
1596
+
1597
+ // NON-SPEC
1598
+ export type FormalParametersElement = FormalParameterList[number] | FunctionRestParameter;
1599
+
1600
+ // FormalParameterList :
1601
+ // FormalParameter
1602
+ // FormalParameterList `,` FormalParameterList
1603
+ export type FormalParameterList = readonly FormalParameter[];
1604
+
1605
+ // FunctionRestParameter :
1606
+ // BindingRestElement
1607
+ export type FunctionRestParameter =
1608
+ | BindingRestElement;
1609
+
1610
+ // FormalParameter :
1611
+ // BindingElement
1612
+ export type FormalParameter =
1613
+ | BindingElementLike;
1614
+
1615
+ // NON-SPEC
1616
+ export type FunctionLike =
1617
+ | FunctionDeclarationLike
1618
+ | FunctionExpressionLike;
1619
+
1620
+ // NON-SPEC
1621
+ export type FunctionDeclarationLike =
1622
+ | FunctionDeclaration
1623
+ | GeneratorDeclaration
1624
+ | AsyncFunctionDeclaration
1625
+ | AsyncGeneratorDeclaration;
1626
+
1627
+ // NON-SPEC
1628
+ export type FunctionExpressionLike =
1629
+ | FunctionExpression
1630
+ | GeneratorExpression
1631
+ | AsyncFunctionExpression
1632
+ | AsyncGeneratorExpression;
1633
+
1634
+ // NON-SPEC
1635
+ export type FunctionBodyLike =
1636
+ | FunctionBody
1637
+ | GeneratorBody
1638
+ | AsyncBody
1639
+ | AsyncGeneratorBody;
1640
+
1641
+ // FunctionDeclaration :
1642
+ // `function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`
1643
+ // [+Default] `function` `(` FormalParameters `)` `{` FunctionBody `}`
1644
+ export interface FunctionDeclaration extends BaseParseNode {
1645
+ readonly type: 'FunctionDeclaration';
1646
+ readonly BindingIdentifier: BindingIdentifier | null;
1647
+ readonly FormalParameters: FormalParameters;
1648
+ readonly FunctionBody: FunctionBody;
1649
+ }
1650
+
1651
+ // FunctionExpression :
1652
+ // `function` BindingIdentifier? `(` FormalParameters `)` `{` FunctionBody `}`
1653
+ export interface FunctionExpression extends BaseParseNode {
1654
+ readonly type: 'FunctionExpression';
1655
+ readonly BindingIdentifier: BindingIdentifier | null;
1656
+ readonly FormalParameters: FormalParameters;
1657
+ readonly FunctionBody: FunctionBody;
1658
+ }
1659
+
1660
+ // FunctionBody :
1661
+ // FunctionStatementList
1662
+ export interface FunctionBody extends BaseParseNode {
1663
+ readonly type: 'FunctionBody';
1664
+ readonly directives: string[];
1665
+ readonly strict: boolean;
1666
+ readonly FunctionStatementList: FunctionStatementList;
1667
+ }
1668
+
1669
+ // FunctionStatementList :
1670
+ // StatementList
1671
+ export type FunctionStatementList = StatementList;
1672
+
1673
+ // ArrowFunction :
1674
+ // ArrowParameters [no LineTerminator here] `=>` ConciseBody
1675
+ export interface ArrowFunction extends BaseParseNode {
1676
+ readonly type: 'ArrowFunction';
1677
+ readonly ArrowParameters: ArrowParameters;
1678
+ readonly ConciseBody: ConciseBodyLike;
1679
+ }
1680
+
1681
+ // ArrowParameters :
1682
+ // BindingIdentifier
1683
+ // CoverParenthesizedExpressionAndArrowParameterList
1684
+ //
1685
+ // CoverParenthesizedExpressionAndArrowParameterList refined as:
1686
+ // ArrowFormalParameters (refined) :
1687
+ // `(` UniqueFormalParameters `)`
1688
+ export type ArrowParameters = ArrowFormalParameters;
1689
+
1690
+ // ConciseBody :
1691
+ // ExpressionBody
1692
+ // `{` FunctionBody `}`
1693
+ export type ConciseBodyLike =
1694
+ | FunctionBody
1695
+ | ConciseBody;
1696
+
1697
+ // ConciseBody (partial) :
1698
+ // ExpressionBody
1699
+ export interface ConciseBody extends BaseParseNode {
1700
+ readonly type: 'ConciseBody';
1701
+ readonly directives?: undefined;
1702
+ readonly ExpressionBody: ExpressionBody;
1703
+ }
1704
+
1705
+ // ExpressionBody :
1706
+ // AssignmentExpression
1707
+ export interface ExpressionBody extends BaseParseNode {
1708
+ readonly type: 'ExpressionBody';
1709
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
1710
+ }
1711
+
1712
+ // CoverParenthesizedExpressionAndArrowParameterList refined as:
1713
+ // ArrowFormalParameters :
1714
+ // `(` UniqueFormalParameters `)`
1715
+ export type ArrowFormalParameters =
1716
+ | UniqueFormalParameters;
1717
+
1718
+ // AsyncArrowFunction :
1719
+ // `async` AsyncArrowBindingIdentifier `=>` AsyncConciseBody
1720
+ // CoverCallExpressionAndAsyncArrowHead `=>` AsyncConciseBody
1721
+ //
1722
+ // CoverCallExpressionAndAsyncArrowHead :
1723
+ // MemberExpression Arguments
1724
+ //
1725
+ // AsyncArrowHead (refined) :
1726
+ // `async` ArrowFormalParameters
1727
+ export interface AsyncArrowFunction extends BaseParseNode {
1728
+ readonly type: 'AsyncArrowFunction';
1729
+ readonly ArrowParameters: ArrowParameters;
1730
+ readonly AsyncConciseBody: AsyncConciseBodyLike;
1731
+ }
1732
+
1733
+ // AsyncConciseBody :
1734
+ // ExpressionBody
1735
+ // `{` AsyncBody `}`
1736
+ export type AsyncConciseBodyLike =
1737
+ | AsyncConciseBody
1738
+ | AsyncBody;
1739
+
1740
+ // AsyncConciseBody (partial) :
1741
+ // ExpressionBody
1742
+ export interface AsyncConciseBody extends BaseParseNode {
1743
+ readonly type: 'AsyncConciseBody';
1744
+ readonly directives?: undefined;
1745
+ readonly ExpressionBody: ExpressionBody;
1746
+ }
1747
+
1748
+ // MethodDefinition :
1749
+ // ClassElementName `(` UniqueFormalParameters `)` `{` FunctionBody `}`
1750
+ // GeneratorMethod
1751
+ // AsyncMethod
1752
+ // AsyncGeneratorMethod
1753
+ // `get` ClassElementName `(` `)` `{` FunctionBody `}`
1754
+ // `set` ClassElementName `(` PropertySetParameterList `)` `{` FunctionBody `}`
1755
+ export type MethodDefinitionLike =
1756
+ | MethodDefinition
1757
+ | GeneratorMethod
1758
+ | AsyncMethod
1759
+ | AsyncGeneratorMethod;
1760
+
1761
+ // MethodDefinition (partial) :
1762
+ // ClassElementName `(` UniqueFormalParameters `)` `{` FunctionBody `}`
1763
+ // `get` ClassElementName `(` `)` `{` FunctionBody `}`
1764
+ // `set` ClassElementName `(` PropertySetParameterList `)` `{` FunctionBody `}`
1765
+ export interface MethodDefinition extends BaseParseNode {
1766
+ readonly type: 'MethodDefinition';
1767
+ readonly Decorators?: readonly Decorator[] | null;
1768
+ readonly static?: boolean;
1769
+ readonly ClassElementName: ClassElementName;
1770
+ readonly PropertySetParameterList: PropertySetParameterList | null;
1771
+ readonly UniqueFormalParameters: UniqueFormalParameters | null;
1772
+ readonly FunctionBody: FunctionBody;
1773
+ }
1774
+
1775
+ // PropertySetParameterList :
1776
+ // FormalParameter
1777
+ export type PropertySetParameterList = [FormalParameter];
1778
+
1779
+ // GeneratorDeclaration :
1780
+ // `function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`
1781
+ // [+Default] `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`
1782
+ export interface GeneratorDeclaration extends BaseParseNode {
1783
+ readonly type: 'GeneratorDeclaration';
1784
+ readonly BindingIdentifier: BindingIdentifier | null;
1785
+ readonly FormalParameters: FormalParameters;
1786
+ readonly GeneratorBody: GeneratorBody;
1787
+ }
1788
+
1789
+ // GeneratorExpression :
1790
+ // `function` `*` BindingIdentifier? `(` FormalParameters `)` `{` GeneratorBody `}`
1791
+ export interface GeneratorExpression extends BaseParseNode {
1792
+ readonly type: 'GeneratorExpression';
1793
+ readonly BindingIdentifier: BindingIdentifier | null;
1794
+ readonly FormalParameters: FormalParameters;
1795
+ readonly GeneratorBody: GeneratorBody;
1796
+ }
1797
+
1798
+ // GeneratorMethod :
1799
+ // `*` ClassElementName `(` UniqueFormalParameters `)` `{` GeneratorBody `}`
1800
+ export interface GeneratorMethod extends BaseParseNode {
1801
+ readonly type: 'GeneratorMethod';
1802
+ readonly Decorators?: readonly Decorator[] | null;
1803
+ readonly static?: boolean;
1804
+ readonly ClassElementName: ClassElementName;
1805
+ readonly PropertySetParameterList: null;
1806
+ readonly UniqueFormalParameters: UniqueFormalParameters;
1807
+ readonly GeneratorBody: GeneratorBody;
1808
+ }
1809
+
1810
+ // GeneratorBody :
1811
+ // FunctionBody
1812
+ export interface GeneratorBody extends BaseParseNode {
1813
+ readonly type: 'GeneratorBody';
1814
+ readonly directives: string[];
1815
+ readonly strict: boolean;
1816
+ readonly FunctionStatementList: FunctionStatementList;
1817
+ }
1818
+
1819
+ // YieldExpression :
1820
+ // `yield`
1821
+ // `yield` [no LineTerminator here] AssignmentExpression
1822
+ // `yield` [no LineTerminator here] `*` AssignmentExpression
1823
+ export interface YieldExpression extends BaseParseNode {
1824
+ readonly type: 'YieldExpression';
1825
+ readonly hasStar: boolean;
1826
+ readonly AssignmentExpression: AssignmentExpressionOrHigher | null;
1827
+ }
1828
+
1829
+ // AsyncGeneratorDeclaration :
1830
+ // `async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
1831
+ // [+Default] `async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
1832
+ export interface AsyncGeneratorDeclaration extends BaseParseNode {
1833
+ readonly type: 'AsyncGeneratorDeclaration';
1834
+ readonly BindingIdentifier: BindingIdentifier | null;
1835
+ readonly FormalParameters: FormalParameters;
1836
+ readonly AsyncGeneratorBody: AsyncGeneratorBody;
1837
+ }
1838
+
1839
+ // AsyncGeneratorExpression :
1840
+ // `async` `function` `*` BindingIdentifier? `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
1841
+ export interface AsyncGeneratorExpression extends BaseParseNode {
1842
+ readonly type: 'AsyncGeneratorExpression';
1843
+ readonly BindingIdentifier: BindingIdentifier | null;
1844
+ readonly FormalParameters: FormalParameters;
1845
+ readonly AsyncGeneratorBody: AsyncGeneratorBody;
1846
+ }
1847
+
1848
+ // AsyncGeneratorMethod :
1849
+ // `async` `*` ClassElementName `(` UniqueFormalParameters `)` `{` AsyncGeneratorBody `}`
1850
+ export interface AsyncGeneratorMethod extends BaseParseNode {
1851
+ readonly type: 'AsyncGeneratorMethod';
1852
+ readonly Decorators?: readonly Decorator[] | null;
1853
+ readonly static?: boolean;
1854
+ readonly ClassElementName: ClassElementName;
1855
+ readonly PropertySetParameterList: null;
1856
+ readonly UniqueFormalParameters: UniqueFormalParameters;
1857
+ readonly AsyncGeneratorBody: AsyncGeneratorBody;
1858
+ }
1859
+
1860
+ // AsyncGeneratorBody :
1861
+ // FunctionBody
1862
+ export interface AsyncGeneratorBody extends BaseParseNode {
1863
+ readonly type: 'AsyncGeneratorBody';
1864
+ readonly directives: string[];
1865
+ readonly strict: boolean;
1866
+ readonly FunctionStatementList: FunctionStatementList;
1867
+ }
1868
+
1869
+ // AsyncFunctionDeclaration :
1870
+ // `async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncBody `}`
1871
+ // [+Default] `async` `function` `*` `(` FormalParameters `)` `{` AsyncBody `}`
1872
+ export interface AsyncFunctionDeclaration extends BaseParseNode {
1873
+ readonly type: 'AsyncFunctionDeclaration';
1874
+ readonly BindingIdentifier: BindingIdentifier | null;
1875
+ readonly FormalParameters: FormalParameters;
1876
+ readonly AsyncBody: AsyncBody;
1877
+ }
1878
+
1879
+ // AsyncFunctionExpression :
1880
+ // `async` `function` BindingIdentifier? `(` FormalParameters `)` `{` AsyncBody `}`
1881
+ export interface AsyncFunctionExpression extends BaseParseNode {
1882
+ readonly type: 'AsyncFunctionExpression';
1883
+ readonly BindingIdentifier: BindingIdentifier | null;
1884
+ readonly FormalParameters: FormalParameters;
1885
+ readonly AsyncBody: AsyncBody;
1886
+ }
1887
+
1888
+ // AsyncMethod :
1889
+ // `async` ClassElementName `(` UniqueFormalParameters `)` `{` AsyncBody `}`
1890
+ export interface AsyncMethod extends BaseParseNode {
1891
+ readonly type: 'AsyncMethod';
1892
+ readonly Decorators?: readonly Decorator[] | null;
1893
+ readonly static?: boolean;
1894
+ readonly ClassElementName: ClassElementName;
1895
+ readonly PropertySetParameterList: null;
1896
+ readonly UniqueFormalParameters: UniqueFormalParameters;
1897
+ readonly AsyncBody: AsyncBody;
1898
+ }
1899
+
1900
+ // AsyncBody :
1901
+ // FunctionBody
1902
+ export interface AsyncBody extends BaseParseNode {
1903
+ readonly type: 'AsyncBody';
1904
+ readonly directives: string[];
1905
+ readonly strict: boolean;
1906
+ readonly FunctionStatementList: FunctionStatementList;
1907
+ }
1908
+
1909
+ // AwaitExpression : `await` UnaryExpression
1910
+ export interface AwaitExpression extends BaseParseNode {
1911
+ readonly type: 'AwaitExpression';
1912
+ readonly UnaryExpression: UnaryExpressionOrHigher;
1913
+ }
1914
+
1915
+ // pending
1916
+
1917
+ // NON-SPEC
1918
+ export type ClassLike =
1919
+ | ClassDeclaration
1920
+ | ClassExpression;
1921
+
1922
+ // Decorator[Yield, Await] :
1923
+ // @ DecoratorMemberExpression (subset of MemberExpression that only allows identifiers, e.g. A.B, no this.y or x[y])
1924
+ // @ DecoratorParenthesizedExpression : `(` Expression[+In] `)`
1925
+ // @ DecoratorCallExpression : DecoratorMemberExpression Arguments
1926
+ export type Decorator = Decorator_MemberExpression | Decorator_ParenthesizedExpression | Decorator_CallExpression;
1927
+ export interface Decorator_MemberExpression extends BaseParseNode {
1928
+ readonly type: 'Decorator';
1929
+ readonly subtype: 'MemberExpression';
1930
+ readonly MemberExpression: MemberExpression | IdentifierReference;
1931
+ readonly ParenthesizedExpression?: undefined;
1932
+ readonly CallExpression?: undefined;
1933
+ }
1934
+ export interface Decorator_ParenthesizedExpression extends BaseParseNode {
1935
+ readonly type: 'Decorator';
1936
+ readonly subtype: 'ParenthesizedExpression';
1937
+ readonly ParenthesizedExpression: Expression;
1938
+ readonly MemberExpression?: undefined;
1939
+ readonly CallExpression?: undefined;
1940
+ }
1941
+ export interface Decorator_CallExpression extends BaseParseNode {
1942
+ readonly type: 'Decorator';
1943
+ readonly subtype: 'CallExpression';
1944
+ readonly CallExpression: CallExpression;
1945
+ readonly MemberExpression?: undefined;
1946
+ readonly ParenthesizedExpression?: undefined;
1947
+ }
1948
+
1949
+ // ClassDeclaration :
1950
+ // DecoratorList? `class` BindingIdentifier ClassTail
1951
+ // DecoratorList? [+Default] `class` ClassTail
1952
+ export interface ClassDeclaration extends BaseParseNode {
1953
+ readonly Decorators?: readonly Decorator[] | null;
1954
+ readonly type: 'ClassDeclaration';
1955
+ readonly BindingIdentifier: BindingIdentifier | null;
1956
+ readonly ClassTail: ClassTail;
1957
+ }
1958
+
1959
+ // ClassExpression :
1960
+ // DecoratorList? `class` BindingIdentifier? ClassTail
1961
+ export interface ClassExpression extends BaseParseNode {
1962
+ readonly Decorators?: readonly Decorator[] | null;
1963
+ readonly type: 'ClassExpression';
1964
+ readonly BindingIdentifier: BindingIdentifier | null;
1965
+ readonly ClassTail: ClassTail;
1966
+ }
1967
+
1968
+ // ClassTail :
1969
+ // ClassHeritage? `{` ClassBody? `}`
1970
+ export interface ClassTail extends BaseParseNode {
1971
+ readonly type: 'ClassTail';
1972
+ readonly ClassHeritage: ClassHeritage | null;
1973
+ readonly ClassBody: ClassBody | null;
1974
+ }
1975
+
1976
+ // ClassHeritage :
1977
+ // `extends` LeftHandSideExpression
1978
+ export type ClassHeritage =
1979
+ | LeftHandSideExpression;
1980
+
1981
+ // ClassBody :
1982
+ // ClassElementList
1983
+ export type ClassBody =
1984
+ | ClassElementList;
1985
+
1986
+ // ClassElementList :
1987
+ // ClassElement
1988
+ // ClassElementList ClassElement
1989
+ export type ClassElementList = readonly ClassElement[];
1990
+
1991
+ // ClassElement :
1992
+ // DecoratorList? MethodDefinition
1993
+ // DecoratorList? `static` MethodDefinition
1994
+ // DecoratorList? FieldDefinition `;`
1995
+ // DecoratorList? `static` FieldDefinition `;`
1996
+ // ClassStaticBlock
1997
+ // `;`
1998
+ export type ClassElement =
1999
+ | MethodDefinitionLike
2000
+ | FieldDefinition
2001
+ | ClassStaticBlock;
2002
+
2003
+ // FieldDefinition :
2004
+ // ClassElementName Initializer?
2005
+ // accessor [nLTh] ClassElementName Initializer?
2006
+ export interface FieldDefinition extends BaseParseNode {
2007
+ readonly Decorators?: readonly Decorator[] | null;
2008
+ readonly accessor?: boolean;
2009
+ readonly type: 'FieldDefinition';
2010
+ readonly static?: boolean;
2011
+ readonly ClassElementName: ClassElementName;
2012
+ readonly Initializer: Initializer | null;
2013
+ }
2014
+
2015
+ // ClassElementName :
2016
+ // PropertyName
2017
+ // PrivateIdentifier
2018
+ export type ClassElementName =
2019
+ | PropertyNameLike
2020
+ | PrivateIdentifier;
2021
+
2022
+ // ClassStaticBlock :
2023
+ // `static` `{` ClassStaticBlockBody `}`
2024
+ export interface ClassStaticBlock extends BaseParseNode {
2025
+ readonly type: 'ClassStaticBlock';
2026
+ readonly static: true;
2027
+ readonly ClassStaticBlockBody: ClassStaticBlockBody;
2028
+ }
2029
+
2030
+ // ClassStaticBlockBody :
2031
+ // ClassStaticBlockStatementList
2032
+ export interface ClassStaticBlockBody extends BaseParseNode {
2033
+ readonly type: 'ClassStaticBlockBody';
2034
+ readonly ClassStaticBlockStatementList: ClassStaticBlockStatementList;
2035
+ }
2036
+
2037
+ // ClassStaticBlockStatementList :
2038
+ // StatementList?
2039
+ export type ClassStaticBlockStatementList =
2040
+ | StatementList;
2041
+
2042
+
2043
+ // A.5 Scripts and Modules
2044
+ // https://tc39.es/ecma262/#sec-scripts-and-modules
2045
+
2046
+ // Script :
2047
+ // ScriptBody?
2048
+ export interface Script extends BaseParseNode {
2049
+ readonly type: 'Script';
2050
+ readonly ScriptBody: ScriptBody | null;
2051
+ }
2052
+
2053
+ // ScriptBody :
2054
+ // StatementList
2055
+ export interface ScriptBody extends BaseParseNode {
2056
+ readonly type: 'ScriptBody';
2057
+ readonly StatementList: StatementList;
2058
+ }
2059
+
2060
+ // Module :
2061
+ // ModuleBody?
2062
+ export interface Module extends BaseParseNode {
2063
+ readonly type: 'Module';
2064
+ readonly ModuleBody: ModuleBody | null;
2065
+ readonly hasTopLevelAwait: boolean;
2066
+ }
2067
+
2068
+ // ModuleBody :
2069
+ // ModuleItemList
2070
+ export interface ModuleBody extends BaseParseNode {
2071
+ readonly type: 'ModuleBody';
2072
+ readonly ModuleItemList: ModuleItemList;
2073
+ }
2074
+
2075
+ // ModuleItemList :
2076
+ // ModuleItem
2077
+ // ModuleItemList ModuleItem
2078
+ export type ModuleItemList = readonly ModuleItem[];
2079
+
2080
+ // ModuleItem :
2081
+ // ImportDeclaration
2082
+ // ExportDeclaration
2083
+ // StatementListItem
2084
+ export type ModuleItem =
2085
+ | ImportDeclaration
2086
+ | ExportDeclaration
2087
+ | StatementListItem;
2088
+
2089
+ // ModuleExportName :
2090
+ // IdentifierName
2091
+ // StringLiteral
2092
+ export type ModuleExportName =
2093
+ | IdentifierName
2094
+ | StringLiteral;
2095
+
2096
+ // ImportDeclaration :
2097
+ // `import` ImportClause FromClause WithClause? `;`
2098
+ // `import` ModuleSpecifier WithClause? `;`
2099
+ // `import` `source` ImportedBinding FromClause WithClause? `;`
2100
+ export interface ImportDeclaration extends BaseParseNode {
2101
+ readonly type: 'ImportDeclaration';
2102
+ readonly ModuleSpecifier?: PrimaryExpression;
2103
+ readonly Phase: 'source' | 'defer' | 'evaluation';
2104
+ readonly ImportClause?: ImportClause;
2105
+ readonly ImportedBinding?: ImportedBinding;
2106
+ readonly FromClause?: FromClause;
2107
+ readonly WithClause?: WithClause;
2108
+ }
2109
+
2110
+ // ImportClause :
2111
+ // ImportedDefaultBinding
2112
+ // NameSpaceImport
2113
+ // NamedImports
2114
+ // ImportedDefaultBinding `,` NameSpaceImport
2115
+ // ImportedDefaultBinding `,` NamedImports
2116
+ export interface ImportClause extends BaseParseNode {
2117
+ readonly type: 'ImportClause';
2118
+ readonly ImportedDefaultBinding?: ImportedDefaultBinding;
2119
+ readonly NameSpaceImport?: NameSpaceImport;
2120
+ readonly NamedImports?: NamedImports;
2121
+ }
2122
+
2123
+ // ImportedDefaultBinding :
2124
+ // ImportedBinding
2125
+ export interface ImportedDefaultBinding extends BaseParseNode {
2126
+ readonly type: 'ImportedDefaultBinding';
2127
+ readonly ImportedBinding: ImportedBinding;
2128
+ }
2129
+
2130
+ // NameSpaceImport :
2131
+ // `*` `as` ImportedBinding
2132
+ export interface NameSpaceImport extends BaseParseNode {
2133
+ readonly type: 'NameSpaceImport';
2134
+ /** Present for `import { x, y } as ns from "mod"`. */
2135
+ readonly NamedImports?: NamedImports;
2136
+ readonly ImportedBinding: ImportedBinding;
2137
+ }
2138
+
2139
+ // NamedImports :
2140
+ // `{` `}`
2141
+ // `{` ImportsList `}`
2142
+ // `{` ImportsList `,` `}`
2143
+ export interface NamedImports extends BaseParseNode {
2144
+ readonly type: 'NamedImports';
2145
+ readonly ImportsList: ImportsList;
2146
+ }
2147
+
2148
+ // FromClause :
2149
+ // `from` ModuleSpecifier
2150
+ export type FromClause =
2151
+ | ModuleSpecifier;
2152
+
2153
+ // ImportsList :
2154
+ // ImportSpecifier
2155
+ // ImportsList `,` ImportSpecifier
2156
+ export type ImportsList = readonly ImportSpecifier[];
2157
+
2158
+ // ImportSpecifier :
2159
+ // ImportedBinding
2160
+ // ModuleExportName `as` ImportedBinding
2161
+ export interface ImportSpecifier extends BaseParseNode {
2162
+ readonly type: 'ImportSpecifier';
2163
+ readonly ModuleExportName?: ModuleExportName;
2164
+ readonly ImportedBinding: ImportedBinding;
2165
+ }
2166
+
2167
+ // ModuleSpecifier :
2168
+ // StringLiteral
2169
+ export type ModuleSpecifier =
2170
+ | StringLiteral;
2171
+
2172
+ // ImportedBinding :
2173
+ // BindingIdentifier
2174
+ export type ImportedBinding =
2175
+ | BindingIdentifier;
2176
+
2177
+ // WithClause :
2178
+ // `with` `{` `}`
2179
+ // `with` `{` WithEntries `,`? `}`
2180
+ export interface WithClause extends BaseParseNode {
2181
+ readonly type: 'WithClause';
2182
+ readonly WithEntries: WithEntries;
2183
+ }
2184
+
2185
+ // WithEntries :
2186
+ // AttributeKey `:` StringLiteral
2187
+ // AttributeKey `:` StringLiteral `,` WithEntries
2188
+ export type WithEntries = readonly WithEntry[];
2189
+ export interface WithEntry extends BaseParseNode {
2190
+ readonly type: 'WithEntry';
2191
+ readonly AttributeKey: AttributeKey;
2192
+ readonly AttributeValue: StringLiteral;
2193
+ }
2194
+
2195
+ // AttributeKey :
2196
+ // IdentifierName
2197
+ // StringLiteral
2198
+ export type AttributeKey =
2199
+ | IdentifierName
2200
+ | StringLiteral;
2201
+
2202
+ export type ExportDeclaration =
2203
+ | ExportDeclaration_Declaration
2204
+ | ExportDeclaration_DefaultClass
2205
+ | ExportDeclaration_DefaultDeclaration
2206
+ | ExportDeclaration_DefaultExpression
2207
+ | ExportDeclaration_NamedExports
2208
+ | ExportDeclaration_NamedFrom
2209
+ | ExportDeclaration_VariableStatement;
2210
+
2211
+ // `export` ExportFromClause FromClause WithClause?;
2212
+ export interface ExportDeclaration_NamedFrom extends BaseParseNode {
2213
+ readonly type: 'ExportDeclaration';
2214
+ readonly ExportFromClause: ExportFromClauseLike;
2215
+ readonly FromClause: FromClause;
2216
+ readonly WithClause: undefined | WithClause;
2217
+ readonly Phase: 'defer' | 'evaluation';
2218
+
2219
+ readonly AssignmentExpression?: undefined;
2220
+ readonly ClassDeclaration?: undefined;
2221
+ readonly Declaration?: null;
2222
+ readonly Decorators?: null;
2223
+ readonly default?: boolean;
2224
+ readonly HoistableDeclaration?: undefined;
2225
+ readonly NamedExports?: undefined;
2226
+ readonly VariableStatement?: undefined;
2227
+ }
2228
+
2229
+ // `export` NamedExports `;`
2230
+ export interface ExportDeclaration_NamedExports extends BaseParseNode {
2231
+ readonly type: 'ExportDeclaration';
2232
+ readonly NamedExports: NamedExports;
2233
+
2234
+ readonly AssignmentExpression?: undefined;
2235
+ readonly ClassDeclaration?: undefined;
2236
+ readonly Declaration?: null;
2237
+ readonly Decorators?: null;
2238
+ readonly default?: boolean;
2239
+ readonly ExportFromClause?: undefined;
2240
+ readonly FromClause?: undefined;
2241
+ readonly HoistableDeclaration?: undefined;
2242
+ readonly VariableStatement?: undefined;
2243
+ readonly WithClause?: undefined;
2244
+ }
2245
+
2246
+ // `export` VariableStatement
2247
+ export interface ExportDeclaration_VariableStatement extends BaseParseNode {
2248
+ readonly type: 'ExportDeclaration';
2249
+ readonly VariableStatement: VariableStatement;
2250
+
2251
+ readonly AssignmentExpression?: undefined;
2252
+ readonly ClassDeclaration?: undefined;
2253
+ readonly Declaration?: null;
2254
+ readonly Decorators?: null;
2255
+ readonly default?: boolean;
2256
+ readonly ExportFromClause?: undefined;
2257
+ readonly FromClause?: undefined;
2258
+ readonly HoistableDeclaration?: undefined;
2259
+ readonly NamedExports?: undefined;
2260
+ readonly WithClause?: undefined;
2261
+ }
2262
+
2263
+ // DecoratorList? `export` Declaration
2264
+ export interface ExportDeclaration_Declaration extends BaseParseNode {
2265
+ readonly type: 'ExportDeclaration';
2266
+ readonly Decorators: readonly Decorator[] | null;
2267
+ readonly Declaration: Declaration;
2268
+
2269
+ readonly AssignmentExpression?: undefined;
2270
+ readonly ClassDeclaration?: undefined;
2271
+ readonly default?: boolean;
2272
+ readonly ExportFromClause?: undefined;
2273
+ readonly FromClause?: undefined;
2274
+ readonly HoistableDeclaration?: undefined;
2275
+ readonly NamedExports?: undefined;
2276
+ readonly VariableStatement?: undefined;
2277
+ readonly WithClause?: undefined;
2278
+ }
2279
+
2280
+ // `export` `default` HoistableDeclaration
2281
+ export interface ExportDeclaration_DefaultDeclaration extends BaseParseNode {
2282
+ readonly type: 'ExportDeclaration';
2283
+ readonly default: true;
2284
+ readonly HoistableDeclaration: HoistableDeclaration;
2285
+
2286
+ readonly AssignmentExpression?: undefined;
2287
+ readonly ClassDeclaration?: undefined;
2288
+ readonly Declaration?: null;
2289
+ readonly Decorators?: null;
2290
+ readonly ExportFromClause?: undefined;
2291
+ readonly FromClause?: undefined;
2292
+ readonly NamedExports?: undefined;
2293
+ readonly VariableStatement?: undefined;
2294
+ readonly WithClause?: undefined;
2295
+ }
2296
+
2297
+ // DecoratorList? `export` `default` ClassDeclaration
2298
+ export interface ExportDeclaration_DefaultClass extends BaseParseNode {
2299
+ readonly type: 'ExportDeclaration';
2300
+ readonly Decorators: readonly Decorator[] | null;
2301
+ readonly default: true;
2302
+ readonly ClassDeclaration: ClassDeclaration;
2303
+
2304
+ readonly AssignmentExpression?: undefined;
2305
+ readonly Declaration?: null;
2306
+ readonly ExportFromClause?: undefined;
2307
+ readonly FromClause?: undefined;
2308
+ readonly HoistableDeclaration?: undefined;
2309
+ readonly NamedExports?: undefined;
2310
+ readonly VariableStatement?: undefined;
2311
+ readonly WithClause?: undefined;
2312
+ }
2313
+
2314
+ // `export` `default` AssignmentExpression `;`
2315
+ export interface ExportDeclaration_DefaultExpression extends BaseParseNode {
2316
+ readonly type: 'ExportDeclaration';
2317
+ readonly default: true;
2318
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
2319
+
2320
+ readonly ClassDeclaration?: undefined;
2321
+ readonly Declaration?: null;
2322
+ readonly Decorators?: null;
2323
+ readonly ExportFromClause?: undefined;
2324
+ readonly FromClause?: undefined;
2325
+ readonly HoistableDeclaration?: undefined;
2326
+ readonly NamedExports?: undefined;
2327
+ readonly VariableStatement?: undefined;
2328
+ readonly WithClause?: undefined;
2329
+ }
2330
+
2331
+ // ExportFromClause :
2332
+ // `*`
2333
+ // `*` as ModuleExportName
2334
+ // NamedExports
2335
+ export type ExportFromClauseLike =
2336
+ | NamedExports
2337
+ | ExportFromClause;
2338
+
2339
+ // ExportFromClause (partial) :
2340
+ // `*`
2341
+ // `*` as ModuleExportName
2342
+ export interface ExportFromClause extends BaseParseNode {
2343
+ readonly type: 'ExportFromClause';
2344
+ readonly ModuleExportName?: ModuleExportName;
2345
+ }
2346
+
2347
+ // NamedExports :
2348
+ // `{` `}`
2349
+ // `{` ExportsList `}`
2350
+ // `{` ExportsList `,` `}`
2351
+ export interface NamedExports extends BaseParseNode {
2352
+ readonly type: 'NamedExports';
2353
+ readonly ExportsList: ExportsList;
2354
+ /** Present for `export { x, y } as ns from "mod"`. */
2355
+ readonly NamespaceExportName?: ModuleExportName;
2356
+ }
2357
+
2358
+ // ExportsList :
2359
+ // ExportSpecifier
2360
+ // ExportsList `,` ExportSpecifier
2361
+ export type ExportsList = readonly ExportSpecifier[];
2362
+
2363
+ // ExportSpecifier :
2364
+ // ModuleExportName
2365
+ // ModuleExportName `as` ModuleExportName
2366
+ export interface ExportSpecifier extends BaseParseNode {
2367
+ readonly type: 'ExportSpecifier';
2368
+ readonly localName: ModuleExportName;
2369
+ readonly exportName: ModuleExportName;
2370
+ }
2371
+
2372
+ export type AssignmentPattern = ObjectAssignmentPattern | ArrayAssignmentPattern | AssignmentProperty | AssignmentElement | ParseNode.Elision;
2373
+ export type ObjectAssignmentPattern = {
2374
+ type: 'ObjectAssignmentPattern';
2375
+ AssignmentPropertyList: (AssignmentProperty | AssignmentPattern)[];
2376
+ AssignmentRestProperty: AssignmentRestProperty | undefined;
2377
+ }
2378
+ export type AssignmentProperty = {
2379
+ type: 'AssignmentProperty';
2380
+ IdentifierReference: ParseNode.IdentifierReference;
2381
+ Initializer?: ParseNode.Initializer | null | undefined;
2382
+ } | {
2383
+ type: 'AssignmentProperty';
2384
+ PropertyName: ParseNode.PropertyNameLike | null;
2385
+ AssignmentElement: AssignmentElement;
2386
+ }
2387
+ export type AssignmentElement = {
2388
+ type: 'AssignmentElement';
2389
+ DestructuringAssignmentTarget: ParseNode.AssignmentExpressionOrHigher;
2390
+ Initializer: ParseNode.Initializer | undefined | null;
2391
+ }
2392
+
2393
+ export type ArrayAssignmentPattern = {
2394
+ type: 'ArrayAssignmentPattern';
2395
+ AssignmentElementList: AssignmentElisionElement[];
2396
+ AssignmentRestElement: AssignmentRestElement | undefined;
2397
+ }
2398
+ export type AssignmentElisionElement = ParseNode.Elision | AssignmentElement | AssignmentPattern;
2399
+ export type AssignmentRestProperty = {
2400
+ type: 'AssignmentRestProperty';
2401
+ DestructuringAssignmentTarget: ParseNode.AssignmentExpressionOrHigher;
2402
+ }
2403
+
2404
+ // Helpers
2405
+ // NON-SPEC
2406
+
2407
+ // Gets all keys of all constituents of a union
2408
+ type AllKeysOf<T> = T extends unknown ? keyof T : never;
2409
+
2410
+ // Gets all values for a given key for all constituents of a union
2411
+ type AllValuesOf<T, K extends AllKeysOf<T>> = T extends unknown ? K extends keyof T ? T[K] : never : never;
2412
+
2413
+ // NON-SPEC
2414
+ /**
2415
+ * Used internally to describe a node that is still in the process of being parsed. Unfinished nodes may not yet be
2416
+ * fully defined.
2417
+ */
2418
+ export type Unfinished<T extends ParseNode = ParseNode> = (
2419
+ // An unfinished node...
2420
+
2421
+ // ...includes all properties of BaseParseNode
2422
+ & {
2423
+ type?: T['type'] & ParseNode['type'];
2424
+ location: {
2425
+ startIndex: number;
2426
+ endIndex: number;
2427
+ start: { line: number, column: number };
2428
+ end: { line: number, column: number };
2429
+ };
2430
+ strict: boolean;
2431
+ sourceText: string;
2432
+ }
2433
+
2434
+ // ...includes all properties of all potential types, with each property marked as optional
2435
+ & {
2436
+ -readonly [K in Exclude<AllKeysOf<T>, 'location' | 'strict' | 'sourceText'>]?: AllValuesOf<T, K>;
2437
+ }
2438
+ );
2439
+
2440
+ // NON-SPEC
2441
+ /**
2442
+ * Used internally to indicate a node that has finished parsing.
2443
+ */
2444
+ export type Finished<T extends BaseParseNode | Unfinished<ParseNode>, K extends T['type'] & ParseNode['type']> =
2445
+ T extends Unfinished<ParseNode> ? Extract<ParseNodesByType[K], T> :
2446
+ T;
2447
+ }
2448
+
2449
+ // eslint-disable-next-line @typescript-eslint/no-namespace
2450
+ export namespace ParseNode {
2451
+ export type WithStatementListChild =
2452
+ | ModuleBody
2453
+ | ScriptBody
2454
+ | Block
2455
+ | CaseClause
2456
+ | DefaultClause
2457
+ | ClassStaticBlockBody
2458
+ | FunctionBody
2459
+ | GeneratorBody
2460
+ | AsyncBody
2461
+ | AsyncGeneratorBody;
2462
+ }
2463
+
2464
+ /** https://tc39.es/ecma262/multipage/text-processing.html#sec-patterns */
2465
+ // eslint-disable-next-line @typescript-eslint/no-namespace
2466
+ export namespace ParseNode.RegExp {
2467
+ export interface NodeWithPosition {
2468
+ readonly position: number;
2469
+ }
2470
+ export interface Pattern {
2471
+ readonly type: 'Pattern';
2472
+ readonly Disjunction: Disjunction;
2473
+ readonly capturingGroups: readonly { readonly GroupName: string | undefined, readonly position: number }[];
2474
+ }
2475
+ export interface Disjunction {
2476
+ readonly type: 'Disjunction';
2477
+ readonly Alternative: Alternative;
2478
+ readonly Disjunction: Disjunction | undefined;
2479
+ }
2480
+ export interface Alternative {
2481
+ readonly type: 'Alternative';
2482
+ readonly Term: readonly Term[];
2483
+ }
2484
+ export type Term = Term_Assertion | Term_Atom;
2485
+ export interface Term_Assertion {
2486
+ readonly type: 'Term';
2487
+ readonly production: 'Assertion';
2488
+ readonly Assertion: Assertion;
2489
+ }
2490
+ export interface Term_Atom {
2491
+ readonly type: 'Term';
2492
+ readonly production: 'Atom';
2493
+ readonly Atom: Atom;
2494
+ readonly Quantifier: Quantifier | undefined;
2495
+ readonly leftCapturingParenthesesBefore: number;
2496
+ readonly capturingParenthesesWithin: number;
2497
+ }
2498
+ export type Assertion = Assertion_Plain | Assertion_LookaheadOrLookbehind;
2499
+ export interface Assertion_Plain {
2500
+ readonly type: 'Assertion';
2501
+ readonly production: '^' | '$' | 'b' | 'B' | 'A' | 'z';
2502
+ }
2503
+ export interface Assertion_LookaheadOrLookbehind {
2504
+ readonly type: 'Assertion';
2505
+ readonly production: '?=' | '?!' | '?<=' | '?<!';
2506
+ readonly Disjunction: Disjunction;
2507
+ }
2508
+ export interface Quantifier {
2509
+ readonly type: 'Quantifier';
2510
+ readonly QuantifierPrefix: QuantifierPrefix;
2511
+ readonly QuestionMark: boolean;
2512
+ }
2513
+ export type QuantifierPrefix = QuantifierPrefix_Plain | QuantifierPrefix_Count;
2514
+ export interface QuantifierPrefix_Plain {
2515
+ readonly type: 'QuantifierPrefix';
2516
+ readonly production: '*' | '+' | '?';
2517
+ }
2518
+ export interface QuantifierPrefix_Count {
2519
+ readonly type: 'QuantifierPrefix';
2520
+ readonly production: '{}';
2521
+ readonly DecimalDigits_a: number;
2522
+ readonly DecimalDigits_b: number | undefined;
2523
+ }
2524
+ export type Atom = Atom_PatternCharacter | Atom_Dot | Atom_AtomEscape | Atom_CharacterClass | Atom_Group | Atom_Modifier;
2525
+ export interface Atom_PatternCharacter {
2526
+ readonly type: 'Atom';
2527
+ readonly production: 'PatternCharacter'
2528
+ readonly PatternCharacter: Character;
2529
+ }
2530
+ export interface Atom_Dot {
2531
+ readonly type: 'Atom';
2532
+ readonly production: '.';
2533
+ }
2534
+ export interface Atom_AtomEscape {
2535
+ readonly type: 'Atom';
2536
+ readonly production: 'AtomEscape';
2537
+ readonly AtomEscape: AtomEscape;
2538
+ }
2539
+ export interface Atom_CharacterClass {
2540
+ readonly type: 'Atom';
2541
+ readonly production: 'CharacterClass';
2542
+ readonly CharacterClass: CharacterClass;
2543
+ }
2544
+ export interface Atom_Group {
2545
+ readonly type: 'Atom';
2546
+ readonly production: 'Group';
2547
+ readonly leftCapturingParenthesesBefore: number;
2548
+ readonly GroupSpecifier: string | undefined;
2549
+ readonly Disjunction: Disjunction;
2550
+ }
2551
+ export interface Atom_Modifier {
2552
+ readonly type: 'Atom';
2553
+ readonly production: 'Modifier';
2554
+ readonly leftCapturingParenthesesBefore: number;
2555
+ readonly Disjunction: Disjunction;
2556
+ readonly AddModifiers: RegularExpressionModifiers | undefined;
2557
+ readonly RemoveModifiers: RegularExpressionModifiers | undefined;
2558
+ }
2559
+ export type RegularExpressionModifier = 'i' | 'm' | 's';
2560
+ export type RegularExpressionModifiers = readonly RegularExpressionModifier[];
2561
+ export type AtomEscape = AtomEscape_DecimalEscape | AtomEscape_CharacterClassEscape | AtomEscape_CharacterEscape | AtomEscape_CaptureGroupName;
2562
+ export interface AtomEscape_DecimalEscape {
2563
+ readonly type: 'AtomEscape';
2564
+ readonly production: 'DecimalEscape';
2565
+ readonly DecimalEscape: DecimalEscape;
2566
+ }
2567
+ export interface AtomEscape_CharacterClassEscape {
2568
+ readonly type: 'AtomEscape';
2569
+ readonly production: 'CharacterClassEscape';
2570
+ readonly CharacterClassEscape: CharacterClassEscape;
2571
+ }
2572
+ export interface AtomEscape_CharacterEscape {
2573
+ readonly type: 'AtomEscape';
2574
+ readonly production: 'CharacterEscape';
2575
+ readonly CharacterEscape: CharacterEscape;
2576
+ }
2577
+ export interface AtomEscape_CaptureGroupName extends NodeWithPosition {
2578
+ readonly type: 'AtomEscape';
2579
+ readonly production: 'CaptureGroupName';
2580
+ readonly GroupName: string;
2581
+ readonly groupSpecifiersThatMatchSelf: readonly ParseNode.RegExp.Atom_Group[];
2582
+ }
2583
+ export type CharacterEscape = CharacterEscape_ControlEscape | CharacterEscape_AsciiLetter | CharacterEscape_0 | CharacterEscape_HexEscapeSequence | CharacterEscape_RegExpUnicodeEscapeSequence | CharacterEscape_IdentityEscape;
2584
+ export interface CharacterEscape_ControlEscape {
2585
+ readonly type: 'CharacterEscape';
2586
+ readonly production: 'ControlEscape';
2587
+ readonly ControlEscape: 'f' | 'n' | 'r' | 't' | 'v';
2588
+ }
2589
+ export interface CharacterEscape_AsciiLetter {
2590
+ readonly type: 'CharacterEscape';
2591
+ readonly production: 'AsciiLetter';
2592
+ readonly AsciiLetter: string;
2593
+ }
2594
+ export interface CharacterEscape_0 {
2595
+ readonly type: 'CharacterEscape';
2596
+ readonly production: '0';
2597
+ }
2598
+ export interface CharacterEscape_HexEscapeSequence {
2599
+ readonly type: 'CharacterEscape';
2600
+ readonly production: 'HexEscapeSequence';
2601
+ readonly HexEscapeSequence: HexEscapeSequence;
2602
+ }
2603
+ export interface CharacterEscape_RegExpUnicodeEscapeSequence {
2604
+ readonly type: 'CharacterEscape';
2605
+ readonly production: 'RegExpUnicodeEscapeSequence';
2606
+ readonly RegExpUnicodeEscapeSequence: RegExpUnicodeEscapeSequence;
2607
+ }
2608
+ export interface CharacterEscape_IdentityEscape {
2609
+ readonly type: 'CharacterEscape';
2610
+ readonly production: 'IdentityEscape';
2611
+ readonly IdentityEscape: Character;
2612
+ }
2613
+ export interface RegExpUnicodeEscapeSequence {
2614
+ readonly type: 'RegExpUnicodeEscapeSequence';
2615
+ readonly CodePoint?: number;
2616
+ readonly HexLeadSurrogate?: number | undefined;
2617
+ readonly HexTrailSurrogate?: number | undefined;
2618
+ readonly Hex4Digits?: number | undefined;
2619
+ }
2620
+ export interface DecimalEscape {
2621
+ readonly type: 'DecimalEscape';
2622
+ readonly position: number;
2623
+ readonly value: number;
2624
+ }
2625
+ export type CharacterClassEscape = CharacterClassEscape_Plain | CharacterClassEscape_UnicodePropertyValue;
2626
+ export interface CharacterClassEscape_Plain {
2627
+ readonly type: 'CharacterClassEscape';
2628
+ readonly production: 'd' | 'D' | 's' | 'S' | 'w' | 'W';
2629
+ }
2630
+ export interface CharacterClassEscape_UnicodePropertyValue {
2631
+ readonly type: 'CharacterClassEscape';
2632
+ readonly production: 'p' | 'P';
2633
+ readonly UnicodePropertyValueExpression: UnicodePropertyValueExpression;
2634
+ }
2635
+ export type UnicodePropertyValueExpression = UnicodePropertyValueExpression_Eq | UnicodePropertyValueExpression_Lone;
2636
+ export interface UnicodePropertyValueExpression_Eq {
2637
+ readonly type: 'UnicodePropertyValueExpression';
2638
+ readonly production: '=';
2639
+ readonly UnicodePropertyName: string;
2640
+ readonly UnicodePropertyValue: string;
2641
+ }
2642
+ export interface UnicodePropertyValueExpression_Lone {
2643
+ readonly type: 'UnicodePropertyValueExpression';
2644
+ readonly production: 'Lone';
2645
+ readonly LoneUnicodePropertyNameOrValue: string;
2646
+ }
2647
+ export interface CharacterClass {
2648
+ readonly type: 'CharacterClass';
2649
+ readonly invert: boolean;
2650
+ readonly ClassContents: ClassContents;
2651
+ }
2652
+ export type ClassContents = ClassContents_Empty | ClassContents_NonUnicodeSetMode | ClassContents_UnicodeSetMode;
2653
+ export interface ClassContents_Empty {
2654
+ readonly type: 'ClassContents';
2655
+ readonly production: 'Empty';
2656
+ }
2657
+ export interface ClassContents_UnicodeSetMode {
2658
+ readonly type: 'ClassContents';
2659
+ readonly production: 'ClassSetExpression';
2660
+ readonly ClassSetExpression: ClassSetExpression;
2661
+ }
2662
+ export interface ClassContents_NonUnicodeSetMode {
2663
+ readonly type: 'ClassContents';
2664
+ readonly production: 'NonEmptyClassRanges';
2665
+ readonly NonemptyClassRanges: NonEmptyClassRanges;
2666
+ }
2667
+ export type NonEmptyClassRanges = readonly ClassRange[];
2668
+ /** NON-SPEC */
2669
+ export type ClassRange = ClassAtom | readonly [start: ClassAtom, end: ClassAtom];
2670
+ export type ClassAtom = ClassAtom_Dash | ClassAtom_SourceCharacter | ClassAtom_ClassEscape;
2671
+ export interface ClassAtom_Dash {
2672
+ readonly type: 'ClassAtom';
2673
+ readonly production: '-';
2674
+ }
2675
+ export interface ClassAtom_SourceCharacter {
2676
+ readonly type: 'ClassAtom';
2677
+ readonly production: 'SourceCharacter';
2678
+ readonly SourceCharacter: string;
2679
+ }
2680
+ export interface ClassAtom_ClassEscape {
2681
+ readonly type: 'ClassAtom';
2682
+ readonly production: 'ClassEscape';
2683
+ readonly ClassEscape: ClassEscape;
2684
+ }
2685
+ export type ClassEscape = ClassEscape_Plain | ClassEscape_CharacterClassEscape | ClassEscape_CharacterEscape;
2686
+ export interface ClassEscape_Plain {
2687
+ readonly type: 'ClassEscape';
2688
+ readonly production: 'b' | '-';
2689
+ }
2690
+ export interface ClassEscape_CharacterClassEscape {
2691
+ readonly type: 'ClassEscape';
2692
+ readonly production: 'CharacterClassEscape';
2693
+ readonly CharacterClassEscape: CharacterClassEscape;
2694
+ }
2695
+ export interface ClassEscape_CharacterEscape {
2696
+ readonly type: 'ClassEscape';
2697
+ readonly production: 'CharacterEscape';
2698
+ readonly CharacterEscape: CharacterEscape;
2699
+ }
2700
+ export type ClassSetExpression = ClassUnion | ClassIntersection | ClassSubtraction;
2701
+ export interface ClassUnion {
2702
+ readonly type: 'ClassUnion';
2703
+ readonly union: readonly (ClassSetRange | ClassSetOperand)[];
2704
+ }
2705
+ export interface ClassIntersection {
2706
+ readonly type: 'ClassIntersection';
2707
+ readonly operands: readonly ClassSetOperand[];
2708
+ }
2709
+ export interface ClassSubtraction {
2710
+ readonly type: 'ClassSubtraction';
2711
+ readonly operands: readonly ClassSetOperand[];
2712
+ }
2713
+ export interface ClassSetRange {
2714
+ readonly type: 'ClassSetRange';
2715
+ readonly left: ClassSetCharacter;
2716
+ readonly right: ClassSetCharacter;
2717
+ }
2718
+ export type ClassSetOperand = ClassSetOperand_NestedClass | ClassSetOperand_ClassStringDisjunction | ClassSetOperand_ClassSetCharacter;
2719
+ export interface ClassSetOperand_NestedClass {
2720
+ readonly type: 'ClassSetOperand';
2721
+ readonly production: 'NestedClass';
2722
+ readonly NestedClass: NestedClass;
2723
+ }
2724
+ export interface ClassSetOperand_ClassStringDisjunction {
2725
+ readonly type: 'ClassSetOperand';
2726
+ readonly production: 'ClassStringDisjunction';
2727
+ readonly ClassStringDisjunction: ClassStringDisjunction;
2728
+ }
2729
+ export interface ClassSetOperand_ClassSetCharacter {
2730
+ readonly type: 'ClassSetOperand';
2731
+ readonly production: 'ClassSetCharacter';
2732
+ readonly ClassSetCharacter: ClassSetCharacter;
2733
+ }
2734
+ export type NestedClass = NestedClass_ClassContents | NestedClass_CharacterClassEscape;
2735
+ export interface NestedClass_ClassContents {
2736
+ readonly type: 'NestedClass';
2737
+ readonly production: 'ClassContents';
2738
+ readonly ClassContents: ClassContents;
2739
+ readonly invert: boolean;
2740
+ }
2741
+ export interface NestedClass_CharacterClassEscape {
2742
+ readonly type: 'NestedClass';
2743
+ readonly production: 'CharacterClassEscape';
2744
+ readonly CharacterClassEscape: CharacterClassEscape;
2745
+ }
2746
+ export interface ClassStringDisjunction {
2747
+ readonly type: 'ClassStringDisjunction';
2748
+ readonly ClassString: ClassSetCharacter[][];
2749
+ }
2750
+ export type ClassString = string;
2751
+
2752
+ // For UnicodeCharacter:
2753
+ // [lookahead ∉ ClassSetReservedDoublePunctuator] SourceCharacter but not ClassSetSyntaxCharacter
2754
+ // \ ClassSetReservedPunctuator
2755
+ // \b
2756
+ // For CharacterEscape:
2757
+ // \ CharacterEscape[+UnicodeMode]
2758
+ export type ClassSetCharacter = ClassSetCharacter_UnicodeCharacter | ClassSetCharacter_CharacterEscape;
2759
+ export interface ClassSetCharacter_UnicodeCharacter {
2760
+ readonly type: 'ClassSetCharacter';
2761
+ readonly production: 'UnicodeCharacter';
2762
+ readonly UnicodeCharacter: UnicodeCharacter;
2763
+ }
2764
+ export interface ClassSetCharacter_CharacterEscape {
2765
+ readonly type: 'ClassSetCharacter';
2766
+ readonly production: 'CharacterEscape';
2767
+ readonly CharacterEscape: CharacterEscape;
2768
+ }
2769
+
2770
+ // Not in RegExp section
2771
+ export interface HexEscapeSequence {
2772
+ readonly type: 'HexEscapeSequence';
2773
+ readonly HexDigit_a: string;
2774
+ readonly HexDigit_b: string;
2775
+ }
2776
+ }
2777
+
2778
+ export type ParseNode =
2779
+ | ParseNode.PrivateIdentifier
2780
+ | ParseNode.IdentifierName
2781
+ | ParseNode.IdentifierReference
2782
+ | ParseNode.BindingIdentifier
2783
+ | ParseNode.LabelIdentifier
2784
+ | ParseNode.PropertyName
2785
+ | ParseNode.ThisExpression
2786
+ | ParseNode.NullLiteral
2787
+ | ParseNode.BooleanLiteral
2788
+ | ParseNode.NumericLiteral
2789
+ | ParseNode.StringLiteral
2790
+ | ParseNode.Elision
2791
+ | ParseNode.ArrayLiteral
2792
+ | ParseNode.SpreadElement
2793
+ | ParseNode.ObjectLiteral
2794
+ | ParseNode.PropertyDefinition
2795
+ | ParseNode.CoverInitializedName
2796
+ | ParseNode.MethodDefinition
2797
+ | ParseNode.FunctionDeclaration
2798
+ | ParseNode.FunctionExpression
2799
+ | ParseNode.FunctionBody
2800
+ | ParseNode.ArrowFunction
2801
+ | ParseNode.ExpressionBody
2802
+ | ParseNode.ConciseBody
2803
+ | ParseNode.GeneratorDeclaration
2804
+ | ParseNode.GeneratorExpression
2805
+ | ParseNode.GeneratorMethod
2806
+ | ParseNode.GeneratorBody
2807
+ | ParseNode.YieldExpression
2808
+ | ParseNode.AsyncGeneratorDeclaration
2809
+ | ParseNode.AsyncGeneratorExpression
2810
+ | ParseNode.AsyncGeneratorMethod
2811
+ | ParseNode.AsyncGeneratorBody
2812
+ | ParseNode.Decorator
2813
+ | ParseNode.ClassDeclaration
2814
+ | ParseNode.ClassExpression
2815
+ | ParseNode.ClassTail
2816
+ | ParseNode.FieldDefinition
2817
+ | ParseNode.ClassStaticBlock
2818
+ | ParseNode.ClassStaticBlockBody
2819
+ | ParseNode.AsyncFunctionDeclaration
2820
+ | ParseNode.AsyncFunctionExpression
2821
+ | ParseNode.AsyncMethod
2822
+ | ParseNode.AsyncBody
2823
+ | ParseNode.AsyncArrowFunction
2824
+ | ParseNode.AsyncConciseBody
2825
+ | ParseNode.RegularExpressionLiteral
2826
+ | ParseNode.CoverParenthesizedExpressionAndArrowParameterList
2827
+ | ParseNode.ParenthesizedExpression
2828
+ | ParseNode.SuperProperty
2829
+ | ParseNode.SuperProperty
2830
+ | ParseNode.NewTarget
2831
+ | ParseNode.ImportMeta
2832
+ | ParseNode.MemberExpression
2833
+ | ParseNode.NewExpression
2834
+ | ParseNode.SuperCall
2835
+ | ParseNode.ImportCall
2836
+ | ParseNode.CallExpression
2837
+ | ParseNode.TemplateLiteral
2838
+ | ParseNode.TaggedTemplateExpression
2839
+ | ParseNode.OptionalExpression
2840
+ | ParseNode.OptionalChain
2841
+ | ParseNode.AssignmentRestElement
2842
+ | ParseNode.UpdateExpression
2843
+ | ParseNode.AwaitExpression
2844
+ | ParseNode.UnaryExpression
2845
+ | ParseNode.ExponentiationExpression
2846
+ | ParseNode.MultiplicativeExpression
2847
+ | ParseNode.AdditiveExpression
2848
+ | ParseNode.ShiftExpression
2849
+ | ParseNode.RelationalExpression
2850
+ | ParseNode.EqualityExpression
2851
+ | ParseNode.BitwiseANDExpression
2852
+ | ParseNode.BitwiseXORExpression
2853
+ | ParseNode.BitwiseORExpression
2854
+ | ParseNode.LogicalANDExpression
2855
+ | ParseNode.LogicalORExpression
2856
+ | ParseNode.CoalesceExpression
2857
+ | ParseNode.ConditionalExpression
2858
+ | ParseNode.AssignmentExpression
2859
+ | ParseNode.CommaOperator
2860
+ | ParseNode.LexicalDeclaration
2861
+ | ParseNode.UsingDeclaration
2862
+ | ParseNode.AwaitUsingDeclaration
2863
+ | ParseNode.LexicalBinding
2864
+ | ParseNode.ObjectBindingPattern
2865
+ | ParseNode.ArrayBindingPattern
2866
+ | ParseNode.BindingRestProperty
2867
+ | ParseNode.BindingProperty
2868
+ | ParseNode.BindingRestElement
2869
+ | ParseNode.BindingElement
2870
+ | ParseNode.SingleNameBinding
2871
+ | ParseNode.Block
2872
+ | ParseNode.VariableStatement
2873
+ | ParseNode.VariableDeclaration
2874
+ | ParseNode.EmptyStatement
2875
+ | ParseNode.ExpressionStatement
2876
+ | ParseNode.IfStatement
2877
+ | ParseNode.DoWhileStatement
2878
+ | ParseNode.WhileStatement
2879
+ | ParseNode.ForStatement
2880
+ | ParseNode.ForInStatement
2881
+ | ParseNode.ForOfStatement
2882
+ | ParseNode.ForDeclaration
2883
+ | ParseNode.ForBinding
2884
+ | ParseNode.ForAwaitStatement
2885
+ | ParseNode.SwitchStatement
2886
+ | ParseNode.CaseBlock
2887
+ | ParseNode.CaseClause
2888
+ | ParseNode.DefaultClause
2889
+ | ParseNode.ContinueStatement
2890
+ | ParseNode.BreakStatement
2891
+ | ParseNode.ReturnStatement
2892
+ | ParseNode.WithStatement
2893
+ | ParseNode.LabelledStatement
2894
+ | ParseNode.ThrowStatement
2895
+ | ParseNode.TryStatement
2896
+ | ParseNode.Catch
2897
+ | ParseNode.DebuggerStatement
2898
+ | ParseNode.ImportDeclaration
2899
+ | ParseNode.ImportClause
2900
+ | ParseNode.ImportedDefaultBinding
2901
+ | ParseNode.NameSpaceImport
2902
+ | ParseNode.NamedImports
2903
+ | ParseNode.ImportSpecifier
2904
+ | ParseNode.WithClause
2905
+ | ParseNode.WithEntry
2906
+ | ParseNode.ExportDeclaration
2907
+ | ParseNode.ExportFromClause
2908
+ | ParseNode.NamedExports
2909
+ | ParseNode.ExportSpecifier
2910
+ | ParseNode.Script
2911
+ | ParseNode.ScriptBody
2912
+ | ParseNode.Module
2913
+ | ParseNode.ModuleBody;
2914
+
2915
+ /**
2916
+ * A type that contains a mapping of {@link ParseNode} type names to their corresponding {@link ParseNode} type.
2917
+ *
2918
+ * You can use `ParseNodesByType[T]` instead of a conditional type like `Extract<ParseNode, { type: T }>` which is often
2919
+ * more expensive and can complicate assignability checks.
2920
+ */
2921
+ export type ParseNodesByType = {
2922
+ [N in ParseNode as N['type']]: N;
2923
+ };