functionalscript 0.1.608 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/Cargo.lock +4 -0
  3. package/Cargo.toml +4 -2
  4. package/README.md +1 -1
  5. package/com/cpp/module.f.d.mts +4 -8
  6. package/com/cpp/module.f.mjs +20 -25
  7. package/com/cpp/testlib.f.mjs +3 -4
  8. package/com/cs/module.f.d.mts +4 -8
  9. package/com/cs/module.f.mjs +18 -23
  10. package/com/cs/testlib.f.mjs +3 -5
  11. package/com/rust/module.f.d.mts +3 -7
  12. package/com/rust/module.f.mjs +25 -30
  13. package/com/rust/nanocom/src/cobject.rs +1 -1
  14. package/com/rust/testlib.f.mjs +3 -5
  15. package/com/test/build.f.d.mts +2 -2
  16. package/com/test/build.f.mjs +2 -2
  17. package/com/test/build.mjs +4 -4
  18. package/com/test/rust/src/lib.rs +4 -4
  19. package/com/types/module.f.d.mts +5 -10
  20. package/com/types/module.f.mjs +5 -12
  21. package/commonjs/build/module.f.d.mts +13 -17
  22. package/commonjs/build/module.f.mjs +23 -28
  23. package/commonjs/build/test.f.mjs +4 -4
  24. package/commonjs/module/function/module.f.d.mts +0 -2
  25. package/commonjs/module/function/module.f.mjs +0 -2
  26. package/commonjs/module/module.f.d.mts +16 -21
  27. package/commonjs/module/module.f.mjs +2 -9
  28. package/commonjs/module.d.mts +1 -5
  29. package/commonjs/module.f.d.mts +0 -2
  30. package/commonjs/module.f.mjs +0 -2
  31. package/commonjs/module.mjs +2 -7
  32. package/commonjs/package/dependencies/module.f.d.mts +3 -7
  33. package/commonjs/package/dependencies/module.f.mjs +5 -10
  34. package/commonjs/package/dependencies/test.f.mjs +1 -1
  35. package/commonjs/package/module.f.d.mts +12 -18
  36. package/commonjs/package/module.f.mjs +6 -13
  37. package/commonjs/package/test.f.mjs +1 -1
  38. package/commonjs/path/module.f.d.mts +25 -32
  39. package/commonjs/path/module.f.mjs +12 -23
  40. package/commonjs/path/test.f.mjs +11 -11
  41. package/commonjs/test.mjs +1 -1
  42. package/dev/module.f.d.mts +1 -4
  43. package/dev/module.f.mjs +1 -4
  44. package/dev/module.mjs +1 -1
  45. package/dev/test/module.f.d.mts +2 -3
  46. package/dev/test/module.f.mjs +5 -7
  47. package/djs/module.f.d.mts +13 -18
  48. package/djs/module.f.mjs +12 -19
  49. package/djs/parser/module.f.d.mts +53 -37
  50. package/djs/parser/module.f.mjs +278 -131
  51. package/djs/parser/test.f.d.mts +4 -0
  52. package/djs/parser/test.f.mjs +186 -70
  53. package/djs/test.f.mjs +4 -4
  54. package/djs/tokenizer/module.f.d.mts +6 -10
  55. package/djs/tokenizer/module.f.mjs +19 -22
  56. package/djs/tokenizer/test.f.mjs +7 -7
  57. package/doc/LANGUAGE.md +17 -16
  58. package/doc/README.md +14 -50
  59. package/fsc/README.md +0 -3
  60. package/fsc/module.f.d.mts +4 -9
  61. package/fsc/module.f.mjs +17 -24
  62. package/fsc/test.f.mjs +3 -3
  63. package/fsm/README.md +1 -1
  64. package/fsm/module.f.d.mts +13 -20
  65. package/fsm/module.f.mjs +27 -38
  66. package/fsm/test.f.mjs +8 -8
  67. package/html/README.md +24 -0
  68. package/html/module.f.d.mts +7 -12
  69. package/html/module.f.mjs +14 -23
  70. package/html/test.f.mjs +4 -4
  71. package/issues/01-test-debug.md +3 -0
  72. package/issues/{publish.md → 05-publish.md} +8 -8
  73. package/issues/17-djs-extension.md +6 -0
  74. package/issues/README.md +20 -13
  75. package/issues/lang/1000-json.md +38 -0
  76. package/issues/lang/2110-default-export.md +2 -2
  77. package/issues/lang/2310-undefined.md +1 -1
  78. package/issues/lang/2330-property-accessor.md +225 -0
  79. package/issues/lang/2360-built-in.md +54 -47
  80. package/issues/lang/3240-export.md +44 -0
  81. package/issues/lang/README.md +64 -22
  82. package/issues/test.f.d.mts +16 -0
  83. package/issues/test.f.mjs +57 -0
  84. package/js/tokenizer/module.f.d.mts +18 -17
  85. package/js/tokenizer/module.f.mjs +80 -61
  86. package/js/tokenizer/test.f.mjs +15 -12
  87. package/json/module.f.d.mts +18 -26
  88. package/json/module.f.mjs +18 -31
  89. package/json/parser/module.f.d.mts +9 -13
  90. package/json/parser/module.f.mjs +9 -14
  91. package/json/parser/test.f.mjs +7 -7
  92. package/json/serializer/module.f.d.mts +11 -20
  93. package/json/serializer/module.f.mjs +14 -29
  94. package/json/serializer/test.f.mjs +2 -2
  95. package/json/test.f.mjs +3 -3
  96. package/json/tokenizer/module.f.d.mts +6 -10
  97. package/json/tokenizer/module.f.mjs +16 -20
  98. package/json/tokenizer/test.f.mjs +6 -6
  99. package/jsr.json +1 -1
  100. package/nanvm-lib/Cargo.toml +6 -0
  101. package/nanvm-lib/src/extension.rs +119 -0
  102. package/nanvm-lib/src/interface.rs +136 -0
  103. package/nanvm-lib/src/lib.rs +7 -0
  104. package/nanvm-lib/src/naive.rs +229 -0
  105. package/nanvm-lib/src/nanenum.rs +230 -0
  106. package/nanvm-lib/src/nullish.rs +7 -0
  107. package/nanvm-lib/src/sign.rs +5 -0
  108. package/nanvm-lib/src/simple.rs +32 -0
  109. package/nanvm-lib/tests/test.f.d.mts +36 -0
  110. package/nanvm-lib/tests/test.f.mjs +79 -0
  111. package/nanvm-lib/tests/test.rs +108 -0
  112. package/nodejs/version/main.mjs +1 -1
  113. package/nodejs/version/module.f.d.mts +4 -9
  114. package/nodejs/version/module.f.mjs +2 -7
  115. package/nodejs/version/test.f.mjs +3 -3
  116. package/package.json +1 -1
  117. package/prime_field/module.f.d.mts +20 -23
  118. package/prime_field/module.f.mjs +9 -12
  119. package/prime_field/test.f.mjs +1 -1
  120. package/secp/module.f.d.mts +27 -28
  121. package/secp/module.f.mjs +38 -39
  122. package/secp/test.f.mjs +4 -4
  123. package/sha2/module.f.d.mts +8 -16
  124. package/sha2/module.f.mjs +7 -20
  125. package/sha2/test.f.mjs +4 -4
  126. package/text/README.md +2 -2
  127. package/text/ascii/module.f.d.mts +69 -72
  128. package/text/ascii/module.f.mjs +5 -10
  129. package/text/ascii/test.f.mjs +3 -3
  130. package/text/module.f.d.mts +9 -14
  131. package/text/module.f.mjs +7 -14
  132. package/text/sgr/module.f.d.mts +7 -9
  133. package/text/sgr/module.f.mjs +2 -4
  134. package/text/test.f.mjs +3 -3
  135. package/text/utf16/module.f.d.mts +8 -15
  136. package/text/utf16/module.f.mjs +17 -28
  137. package/text/utf16/test.f.mjs +5 -5
  138. package/text/utf8/module.f.d.mts +4 -9
  139. package/text/utf8/module.f.mjs +9 -16
  140. package/text/utf8/test.f.mjs +4 -4
  141. package/types/array/module.f.d.mts +14 -24
  142. package/types/array/module.f.mjs +8 -25
  143. package/types/array/test.f.mjs +3 -3
  144. package/types/bigfloat/module.f.d.mts +4 -9
  145. package/types/bigfloat/module.f.mjs +3 -10
  146. package/types/bigfloat/test.f.mjs +1 -1
  147. package/types/bigint/module.f.d.mts +16 -64
  148. package/types/bigint/module.f.mjs +11 -30
  149. package/types/bigint/test.f.mjs +1 -1
  150. package/types/btree/find/module.f.d.mts +20 -26
  151. package/types/btree/find/module.f.mjs +8 -17
  152. package/types/btree/find/test.f.mjs +7 -7
  153. package/types/btree/module.f.d.mts +4 -8
  154. package/types/btree/module.f.mjs +6 -11
  155. package/types/btree/remove/module.f.d.mts +7 -12
  156. package/types/btree/remove/module.f.mjs +10 -17
  157. package/types/btree/remove/test.f.mjs +5 -5
  158. package/types/btree/set/module.f.d.mts +3 -7
  159. package/types/btree/set/module.f.mjs +4 -9
  160. package/types/btree/set/test.f.mjs +4 -4
  161. package/types/btree/test.f.mjs +9 -9
  162. package/types/btree/types/module.f.d.mts +0 -2
  163. package/types/btree/types/module.f.mjs +0 -2
  164. package/types/byte_set/module.f.d.mts +16 -29
  165. package/types/byte_set/module.f.mjs +14 -39
  166. package/types/byte_set/test.f.mjs +5 -5
  167. package/types/function/compare/module.f.d.mts +9 -15
  168. package/types/function/compare/module.f.mjs +3 -12
  169. package/types/function/compare/test.f.mjs +1 -1
  170. package/types/function/module.f.d.mts +20 -27
  171. package/types/function/module.f.mjs +4 -15
  172. package/types/function/operator/module.f.d.mts +28 -43
  173. package/types/function/operator/module.f.mjs +14 -41
  174. package/types/function/test.f.mjs +1 -1
  175. package/types/list/module.f.d.mts +56 -91
  176. package/types/list/module.f.mjs +45 -114
  177. package/types/list/test.f.mjs +10 -10
  178. package/types/map/module.f.d.mts +15 -24
  179. package/types/map/module.f.mjs +15 -30
  180. package/types/map/test.f.mjs +2 -2
  181. package/types/nibble_set/module.f.d.mts +10 -20
  182. package/types/nibble_set/module.f.mjs +7 -24
  183. package/types/nibble_set/test.f.mjs +2 -2
  184. package/types/nullable/module.f.d.mts +3 -8
  185. package/types/nullable/module.f.mjs +2 -9
  186. package/types/nullable/test.f.mjs +1 -1
  187. package/types/number/module.f.d.mts +7 -13
  188. package/types/number/module.f.mjs +8 -19
  189. package/types/number/test.f.mjs +1 -1
  190. package/types/object/module.f.d.mts +11 -18
  191. package/types/object/module.f.mjs +9 -20
  192. package/types/object/test.f.mjs +1 -1
  193. package/types/range/module.f.d.mts +3 -8
  194. package/types/range/module.f.mjs +2 -9
  195. package/types/range/test.f.mjs +1 -1
  196. package/types/range_map/module.f.d.mts +9 -15
  197. package/types/range_map/module.f.mjs +9 -18
  198. package/types/range_map/test.f.mjs +32 -32
  199. package/types/result/module.d.mts +3 -3
  200. package/types/result/module.f.d.mts +6 -12
  201. package/types/result/module.f.mjs +3 -12
  202. package/types/result/module.mjs +2 -2
  203. package/types/sorted_list/module.f.d.mts +22 -28
  204. package/types/sorted_list/module.f.mjs +10 -19
  205. package/types/sorted_list/test.f.mjs +7 -7
  206. package/types/sorted_set/module.f.d.mts +6 -12
  207. package/types/sorted_set/module.f.mjs +7 -16
  208. package/types/sorted_set/test.f.mjs +7 -7
  209. package/types/string/module.f.d.mts +8 -14
  210. package/types/string/module.f.mjs +10 -21
  211. package/types/string/test.f.mjs +2 -2
  212. package/types/string_set/module.f.d.mts +8 -16
  213. package/types/string_set/module.f.mjs +12 -27
  214. package/types/string_set/test.f.mjs +1 -1
  215. package/issues/lang/2351-property-accessor.md +0 -44
  216. package/issues/lang/2352-property-call.md +0 -43
  217. package/issues/lang/2353-property-at.md +0 -19
  218. package/issues/test-debug.md +0 -12
  219. /package/issues/{esm.md → 02-esm.md} +0 -0
  220. /package/issues/{djs.md → 03-djs.md} +0 -0
  221. /package/issues/{fs-load.md → 11-fs-load.md} +0 -0
  222. /package/issues/lang/{2330-grouping.md → 2350-grouping.md} +0 -0
@@ -1,5 +1,9 @@
1
1
  # FunctionalScript Language
2
2
 
3
+ Two main FunctionsScript princples:
4
+ 1. if FS code pass validation/compilation, then it doesn't have side-effects,
5
+ 2. the code that passed validation/compilation should behave on FunctionalScript VM the same way as on any other modern JavaScript engine.
6
+
3
7
  When we implement features of FunctionalScript, the first priority is a simplification of the VM.
4
8
 
5
9
  File Types:
@@ -16,44 +20,67 @@ File Types:
16
20
 
17
21
  - [ ] [JSON](./1000-json.md).
18
22
 
23
+ **VM**:
24
+
25
+ We are introducing new commands in the order that every new command depends only on previous commands.
26
+
27
+ |format|any |Tag| |
28
+ |------|--------------|---|----------|
29
+ |JSON |null | 00| |
30
+ | |number | 01|u64 |
31
+ | |false | 02| |
32
+ | |true | 03| |
33
+ | |string | 04|String |
34
+ | |array | 05|Array<Any>|
35
+ | |object | 06|Object |
36
+
19
37
  ## 2. DJS
20
38
 
21
39
  The DJS form a graph of values. It can be serialized without additional run-time information.
22
40
 
23
41
  File extensions: `.d.js` and `.d.mjs`.
24
42
 
43
+ |format|any |Tag| |Notes |
44
+ |------|------------------------|---|----------|------------------------------------------------|
45
+ |DJS |const_ref | 07|u32 |[const](./2120-const.md) |
46
+ | |bigint_plus | 08|Array<u64>|[bigint](./2320-bigint.md) |
47
+ | |bigint_minus | 09|Array<u64>|[bigint](./2320-bigint.md) |
48
+ | |undefined | 0A| |[undefined](./2310-undefined.md) |
49
+ | |own_property | 0B| |[property-accessor](./2330-property-accessor.md)|
50
+ | |instance_property | 0C| |[property-accessor](./2330-property-accessor.md)|
51
+ | |instance_method_call | 0D| |[property-accessor](./2330-property-accessor.md)|
52
+ | |at | 0E| |[property-accessor](./2330-property-accessor.md)|
53
+ | |operators | | |[operators](./2340-operators.md) |
54
+
25
55
  ### 2.1. Required
26
56
 
27
- 1. [ ] [default-export](./2110-default-export.md)
28
- 2. [ ] [const](./2120-const.md)
29
- 3. [ ] [default-import](./2130-default-import.md)
57
+ 1. [ ] [default-export](./2110-default-export.md),
58
+ 2. [ ] [const](./2120-const.md),
59
+ 3. [ ] [default-import](./2130-default-import.md).
30
60
 
31
61
  ### 2.2. Priority 1
32
62
 
33
63
  We need it to use JSDoc and TypeScript.
34
64
 
35
- 1. [ ] [block-comment](./2210-block-comment.md)
36
- 2. [ ] [namespace-import](./2220-namespace-import.md)
65
+ 1. [ ] [block-comment](./2210-block-comment.md),
66
+ 2. [ ] [namespace-import](./2220-namespace-import.md).
37
67
 
38
68
  ### 2.3. Priority 2
39
69
 
40
- 1. [ ] [undefined](./231-undefined.md)
41
- 2. [ ] [bigint](./232-bigint.md)
42
- 3. [ ] [grouping](./233-grouping.md)
43
- 4. [ ] [operators](./234-operators.md)
44
- 5. [ ] Property Accessors:
45
- 1. [ ] [property-accessor](./2351-property-accessor.md)
46
- 2. [ ] [property-call](./2352-property-call.md)
47
- 3. [ ] [at](./2353-at.md)
48
- 6. [ ] [global](./2360-built-in.md)
70
+ 1. [ ] [undefined](./2310-undefined.md),
71
+ 2. [ ] [bigint](./2320-bigint.md),
72
+ 3. [ ] [property-accessor](./2330-property-accessor.md),
73
+ 4. [ ] [operators](./2340-operators.md),
74
+ 5. [ ] [grouping](./2350-grouping.md),
75
+ 6. [ ] [built-in](./2360-built-in.md).
49
76
 
50
77
  ### 2.4. Syntactic Sugar
51
78
 
52
- 1. [ ] [identifier-property](./2410-identifier-property.md)
53
- 2. [ ] [line-comment](./2420-line-comment.md)
54
- 3. [ ] [trailing-comma](./2430-trailing-comma.md)
55
- 4. [ ] [shorthand](./2440-shorthand.md)
56
- 5. [ ] [destructuring](./2450-destructuring.md)
79
+ 1. [ ] [identifier-property](./2410-identifier-property.md),
80
+ 2. [ ] [line-comment](./2420-line-comment.md),
81
+ 3. [ ] [trailing-comma](./2430-trailing-comma.md),
82
+ 4. [ ] [shorthand](./2440-shorthand.md),
83
+ 5. [ ] [destructuring](./2450-destructuring.md).
57
84
 
58
85
  ## 3. FJS
59
86
 
@@ -61,6 +88,10 @@ The FJS can have functions. The format requires additional run-time information
61
88
 
62
89
  File extensions: `.f.js` and `.f.mjs`.
63
90
 
91
+ |format|any |Tag| |Notes |
92
+ |------|--------|---|----|--------------------------------|
93
+ |FJS |function| |Func|[function](./3110-function.md) |
94
+
64
95
  ### 3.1. Required
65
96
 
66
97
  1. [ ] [function](./3110-function.md)
@@ -69,12 +100,23 @@ File extensions: `.f.js` and `.f.mjs`.
69
100
 
70
101
  ### 3.2. Priority 1
71
102
 
72
- 1. [ ] `if`
103
+ 1. [ ] `if`. See https://developer.mozilla.org/en-US/docs/Glossary/Falsy
73
104
  2. [ ] [let](./3220-let.md)
74
105
  3. [ ] `while`
106
+ 4. [ ] [export](./3240-export.md)
75
107
 
76
108
  ### 3.3. Syntactic Sugar
77
109
 
78
- 1. [ ] [expression](./321-expression.md)
79
- 2. [ ] [one-parameter](./322-one-parameter.md)
110
+ 1. [ ] [expression](./3210-expression.md)
111
+ 2. [ ] [one-parameter](./3220-one-parameter.md)
80
112
  3. [ ] [assignments](./3330-assignments.md)
113
+
114
+ ## 4. ECMAScript Proposals
115
+
116
+ 1. [ ] [Type Annotations](https://github.com/tc39/proposal-type-annotations), Stage 1:
117
+ - [Node.js](https://nodejs.org/en/learn/typescript/run-natively),
118
+ - `Deno` supports TypeScript,
119
+ - `Bun` supports TypeScript,
120
+ - most browsers don't support the feature.
121
+ 2. [ ] [Pipe Operator `|>`](https://github.com/tc39/proposal-pipeline-operator), Stage 2.
122
+ 3. [ ] [Records and Tuples](https://github.com/tc39/proposal-record-tuple), Stage 2.
@@ -0,0 +1,16 @@
1
+ declare namespace _default {
2
+ namespace ownProperty {
3
+ function nullish(): void;
4
+ function bool(): void;
5
+ function array(): void;
6
+ namespace object {
7
+ export function _null(): void;
8
+ export { _null as null };
9
+ export function undefined(): void;
10
+ }
11
+ namespace string {
12
+ function number(): void;
13
+ }
14
+ }
15
+ }
16
+ export default _default;
@@ -0,0 +1,57 @@
1
+ /** @type {(a: unknown) => (i: any) =>unknown} */
2
+ const at = a => i => Object.getOwnPropertyDescriptor(a, i)?.value
3
+
4
+ export default {
5
+ ownProperty: {
6
+ nullish: () => {
7
+ /* // panic
8
+ const v = Object.getOwnPropertyDescriptor(null, 0)
9
+ if (v !== undefined) {
10
+ throw v
11
+ }
12
+ */
13
+ /* // panic
14
+ const v = Object.getOwnPropertyDescriptor(undefined, 0)
15
+ if (v !== undefined) {
16
+ throw v
17
+ }
18
+ */
19
+ },
20
+ bool: () => {
21
+ const v = at(true)('x')
22
+ if (v !== undefined) {
23
+ throw v
24
+ }
25
+ },
26
+ array: () => {
27
+ const a = ['42']
28
+ {
29
+ const v = at(a)('0')
30
+ if (v !== '42') { throw v }
31
+ }
32
+ {
33
+ const v = at(a)(0)
34
+ if (v !== '42') { throw v }
35
+ }
36
+ },
37
+ object: {
38
+ null: () => {
39
+ const o = { null: 'hello' }
40
+ const v = at(o)(null)
41
+ if (v !== 'hello') { throw v }
42
+ },
43
+ undefined: () => {
44
+ const o = { undefined: 'hello' }
45
+ const v = at(o)(undefined)
46
+ if (v !== 'hello') { throw v }
47
+ }
48
+ },
49
+ string: {
50
+ number: () => {
51
+ const o = 'hello'
52
+ const v = at(o)(1)
53
+ if (v !== 'e') { throw v }
54
+ }
55
+ }
56
+ }
57
+ }
@@ -1,8 +1,7 @@
1
- declare namespace _default {
2
- export { tokenize };
3
- export { isKeywordToken };
4
- }
5
- export default _default;
1
+ /** @type {(token: JsToken) => Boolean} */
2
+ export const isKeywordToken: (token: JsToken) => boolean;
3
+ /** @type {(input: list.List<number>) => list.List<JsToken>} */
4
+ export const tokenize: (input: list.List<number>) => list.List<JsToken>;
6
5
  export type StringToken = {
7
6
  readonly kind: "string";
8
7
  readonly value: string;
@@ -23,6 +22,9 @@ export type ErrorToken = {
23
22
  export type WhitespaceToken = {
24
23
  readonly kind: "ws";
25
24
  };
25
+ export type NewLineToken = {
26
+ readonly kind: "nl";
27
+ };
26
28
  export type TrueToken = {
27
29
  readonly kind: "true";
28
30
  };
@@ -72,8 +74,8 @@ export type OperatorToken = {
72
74
  } | {
73
75
  readonly kind: "?" | "?." | "=>";
74
76
  };
75
- export type JsToken = KeywordToken | TrueToken | FalseToken | NullToken | WhitespaceToken | StringToken | NumberToken | ErrorToken | IdToken | BigIntToken | OperatorToken;
76
- export type TokenizerState = InitialState | ParseIdState | ParseStringState | ParseEscapeCharState | ParseUnicodeCharState | ParseNumberState | InvalidNumberState | ParseOperatorState | ParseMinusState | ParseWhitespaceState | EofState;
77
+ export type JsToken = KeywordToken | TrueToken | FalseToken | NullToken | WhitespaceToken | NewLineToken | StringToken | NumberToken | ErrorToken | IdToken | BigIntToken | OperatorToken;
78
+ export type TokenizerState = InitialState | ParseIdState | ParseStringState | ParseEscapeCharState | ParseUnicodeCharState | ParseNumberState | InvalidNumberState | ParseOperatorState | ParseMinusState | ParseWhitespaceState | ParseNewLineState | EofState;
77
79
  export type ErrorMessage = "\" are missing" | "unescaped character" | "invalid hex value" | "unexpected character" | "invalid number" | "invalid token" | "eof";
78
80
  export type InitialState = {
79
81
  readonly kind: "initial";
@@ -85,6 +87,9 @@ export type ParseIdState = {
85
87
  export type ParseWhitespaceState = {
86
88
  readonly kind: "ws";
87
89
  };
90
+ export type ParseNewLineState = {
91
+ readonly kind: "nl";
92
+ };
88
93
  export type ParseStringState = {
89
94
  readonly kind: "string";
90
95
  readonly value: string;
@@ -126,12 +131,12 @@ export type EofState = {
126
131
  readonly kind: "eof";
127
132
  };
128
133
  export type CharCodeOrEof = number | null;
129
- export type ToToken = (input: number) => readonly [List.List<JsToken>, TokenizerState];
134
+ export type ToToken = (input: number) => readonly [list.List<JsToken>, TokenizerState];
130
135
  /**
131
136
  * <T>
132
137
  */
133
138
  export type CreateToToken<T> = (state: T) => ToToken;
134
- export type RangeSet = List.List<Range.Range>;
139
+ export type RangeSet = list.List<_range.Range>;
135
140
  /**
136
141
  * <T>
137
142
  */
@@ -139,12 +144,8 @@ export type RangeFunc<T> = (def: CreateToToken<T>) => (RangeMapToToken<T>);
139
144
  /**
140
145
  * <T>
141
146
  */
142
- export type RangeMapToToken<T> = RangeMap.RangeMapArray<CreateToToken<T>>;
143
- /** @type {(input: List.List<number>) => List.List<JsToken>} */
144
- declare const tokenize: (input: List.List<number>) => List.List<JsToken>;
145
- /** @type {(token: JsToken) => Boolean} */
146
- declare const isKeywordToken: (token: JsToken) => boolean;
147
+ export type RangeMapToToken<T> = range_map.RangeMapArray<CreateToToken<T>>;
148
+ import * as list from '../../types/list/module.f.mjs';
147
149
  import * as bigfloatT from '../../types/bigfloat/module.f.mjs';
148
- import * as List from '../../types/list/module.f.mjs';
149
- import * as Range from '../../types/range/module.f.mjs';
150
- import * as RangeMap from '../../types/range_map/module.f.mjs';
150
+ import * as _range from '../../types/range/module.f.mjs';
151
+ import * as range_map from '../../types/range_map/module.f.mjs';