@kolanut/language-packs 0.1.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 (74) hide show
  1. package/CONTRIBUTING.md +119 -0
  2. package/LICENSE +17 -0
  3. package/README.md +237 -0
  4. package/badges/coverage.json +6 -0
  5. package/badges/packs.json +6 -0
  6. package/badges/targets.json +6 -0
  7. package/badges/tokens.json +6 -0
  8. package/dist/index.d.ts +2 -0
  9. package/dist/index.js +1 -0
  10. package/dist/load-pack.d.ts +6 -0
  11. package/dist/load-pack.js +31 -0
  12. package/dist/types.d.ts +33 -0
  13. package/dist/types.js +1 -0
  14. package/pack.schema.json +86 -0
  15. package/package.json +61 -0
  16. package/packs/PACK_SCOPE.md +68 -0
  17. package/packs/afrikaans/keywords.json +329 -0
  18. package/packs/afrikaans/pack.json +361 -0
  19. package/packs/amharic/keywords.json +329 -0
  20. package/packs/amharic/pack.json +359 -0
  21. package/packs/arabic/keywords.json +329 -0
  22. package/packs/arabic/pack.json +369 -0
  23. package/packs/bambara/keywords.json +299 -0
  24. package/packs/bambara/pack.json +332 -0
  25. package/packs/by-country.json +183 -0
  26. package/packs/by-region.json +49 -0
  27. package/packs/coverage-summary.json +424 -0
  28. package/packs/french/keywords.json +329 -0
  29. package/packs/french/pack.json +381 -0
  30. package/packs/fulfulde/keywords.json +299 -0
  31. package/packs/fulfulde/pack.json +336 -0
  32. package/packs/hausa/keywords.json +329 -0
  33. package/packs/hausa/pack.json +363 -0
  34. package/packs/igbo/keywords.json +329 -0
  35. package/packs/igbo/pack.json +360 -0
  36. package/packs/index.json +397 -0
  37. package/packs/kinyarwanda/keywords.json +329 -0
  38. package/packs/kinyarwanda/pack.json +359 -0
  39. package/packs/languages-roadmap.json +28 -0
  40. package/packs/lingala/keywords.json +329 -0
  41. package/packs/lingala/pack.json +360 -0
  42. package/packs/logical-tokens.json +120 -0
  43. package/packs/luganda/keywords.json +329 -0
  44. package/packs/luganda/pack.json +359 -0
  45. package/packs/nigerian-pidgin/keywords.json +332 -0
  46. package/packs/nigerian-pidgin/pack.json +362 -0
  47. package/packs/official-target-keywords.json +166 -0
  48. package/packs/oromo/keywords.json +329 -0
  49. package/packs/oromo/pack.json +360 -0
  50. package/packs/portuguese-africa/keywords.json +299 -0
  51. package/packs/portuguese-africa/pack.json +334 -0
  52. package/packs/sesotho/keywords.json +299 -0
  53. package/packs/sesotho/pack.json +330 -0
  54. package/packs/setswana/keywords.json +299 -0
  55. package/packs/setswana/pack.json +331 -0
  56. package/packs/shona/keywords.json +329 -0
  57. package/packs/shona/pack.json +359 -0
  58. package/packs/somali/keywords.json +329 -0
  59. package/packs/somali/pack.json +362 -0
  60. package/packs/swahili/keywords.json +329 -0
  61. package/packs/swahili/pack.json +365 -0
  62. package/packs/target-coverage.json +1083 -0
  63. package/packs/tigrinya/keywords.json +329 -0
  64. package/packs/tigrinya/pack.json +360 -0
  65. package/packs/twi/keywords.json +329 -0
  66. package/packs/twi/pack.json +360 -0
  67. package/packs/wolof/keywords.json +329 -0
  68. package/packs/wolof/pack.json +361 -0
  69. package/packs/xhosa/keywords.json +329 -0
  70. package/packs/xhosa/pack.json +360 -0
  71. package/packs/yoruba/keywords.json +329 -0
  72. package/packs/yoruba/pack.json +363 -0
  73. package/packs/zulu/keywords.json +329 -0
  74. package/packs/zulu/pack.json +360 -0
@@ -0,0 +1,166 @@
1
+ {
2
+ "version": "1.1.0",
3
+ "description": "Official reserved keywords per transpile target (from language specs). Each keyword maps to exactly one logical token in logical-tokens.json.",
4
+ "sources": {
5
+ "javascript": {
6
+ "name": "ECMA-262 Edition 15",
7
+ "url": "https://tc39.es/ecma262/#sec-keywords-and-reserved-words"
8
+ },
9
+ "python": {
10
+ "name": "Python 3.12 Language Reference",
11
+ "url": "https://docs.python.org/3/reference/lexical_analysis.html#keywords"
12
+ },
13
+ "typescript": {
14
+ "name": "TypeScript — tracked reserved tokens (practical set)",
15
+ "url": "https://www.typescriptlang.org/docs/handbook/intro.html"
16
+ },
17
+ "go": {
18
+ "name": "The Go Programming Language Specification",
19
+ "url": "https://go.dev/ref/spec#Keywords"
20
+ },
21
+ "rust": {
22
+ "name": "The Rust Reference — Keywords",
23
+ "url": "https://doc.rust-lang.org/reference/keywords.html"
24
+ }
25
+ },
26
+ "targets": {
27
+ "javascript": [
28
+ "await", "break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "function", "if", "import", "in", "instanceof", "new", "null", "return", "super", "switch", "this", "throw", "true", "try", "typeof", "var", "void", "while", "with", "yield"
29
+ ],
30
+ "python": [
31
+ "False", "None", "True", "and", "as", "assert", "async", "await", "break", "class", "continue", "def", "del", "elif", "else", "except", "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "nonlocal", "not", "or", "pass", "raise", "return", "try", "while", "with", "yield", "_", "case", "match", "type"
32
+ ],
33
+ "typescript": [
34
+ "abstract", "as", "asserts", "async", "await", "break", "case", "catch", "class", "const", "continue", "debugger", "declare", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "from", "function", "get", "if", "implements", "import", "in", "instanceof", "interface", "is", "keyof", "let", "module", "namespace", "new", "null", "package", "private", "protected", "public", "readonly", "return", "set", "static", "super", "switch", "this", "throw", "true", "try", "typeof", "undefined", "unique", "var", "void", "while", "with", "yield", "type", "infer", "satisfies"
35
+ ],
36
+ "go": [
37
+ "break", "case", "chan", "const", "continue", "default", "defer", "else", "fallthrough", "for", "func", "go", "goto", "if", "import", "interface", "map", "package", "range", "return", "select", "struct", "switch", "type", "var"
38
+ ],
39
+ "rust": [
40
+ "_", "as", "async", "await", "break", "const", "continue", "crate", "dyn", "else", "enum", "extern", "false", "fn", "for", "if", "impl", "in", "let", "loop", "match", "mod", "move", "mut", "pub", "ref", "return", "self", "Self", "static", "struct", "super", "trait", "true", "type", "unsafe", "use", "where", "while"
41
+ ]
42
+ },
43
+ "keywordToLogical": {
44
+ "if": "IF",
45
+ "else": "ELSE",
46
+ "elif": "ELIF",
47
+ "for": "FOR",
48
+ "while": "WHILE",
49
+ "loop": "LOOP",
50
+ "break": "BREAK",
51
+ "continue": "CONTINUE",
52
+ "switch": "SWITCH",
53
+ "match": "MATCH",
54
+ "case": "CASE",
55
+ "default": "DEFAULT",
56
+ "_": "DEFAULT",
57
+ "goto": "GOTO",
58
+ "fallthrough": "FALLTHROUGH",
59
+ "select": "SELECT",
60
+ "range": "RANGE",
61
+ "function": "FUNCTION",
62
+ "def": "FUNCTION",
63
+ "func": "FUNCTION",
64
+ "fn": "FUNCTION",
65
+ "return": "RETURN",
66
+ "async": "ASYNC",
67
+ "await": "AWAIT",
68
+ "yield": "YIELD",
69
+ "lambda": "LAMBDA",
70
+ "defer": "DEFER",
71
+ "go": "GO",
72
+ "try": "TRY",
73
+ "catch": "CATCH",
74
+ "except": "CATCH",
75
+ "finally": "FINALLY",
76
+ "throw": "THROW",
77
+ "raise": "THROW",
78
+ "let": "LET",
79
+ "const": "CONST",
80
+ "var": "VAR",
81
+ "mut": "MUT",
82
+ "global": "GLOBAL",
83
+ "nonlocal": "NONLOCAL",
84
+ "class": "CLASS",
85
+ "struct": "STRUCT",
86
+ "trait": "TRAIT",
87
+ "impl": "IMPL",
88
+ "interface": "INTERFACE",
89
+ "enum": "ENUM",
90
+ "type": "TYPE",
91
+ "extends": "EXTENDS",
92
+ "implements": "IMPLEMENTS",
93
+ "new": "NEW",
94
+ "this": "THIS",
95
+ "self": "SELF",
96
+ "Self": "SELF",
97
+ "super": "SUPER",
98
+ "static": "STATIC",
99
+ "import": "IMPORT",
100
+ "export": "EXPORT",
101
+ "from": "FROM",
102
+ "as": "AS",
103
+ "namespace": "NAMESPACE",
104
+ "module": "MODULE",
105
+ "mod": "MODULE",
106
+ "package": "PACKAGE",
107
+ "use": "USE",
108
+ "pub": "PUB",
109
+ "public": "PUBLIC",
110
+ "crate": "CRATE",
111
+ "with": "WITH",
112
+ "pass": "PASS",
113
+ "assert": "ASSERT",
114
+ "asserts": "ASSERTS",
115
+ "and": "AND",
116
+ "or": "OR",
117
+ "not": "NOT",
118
+ "del": "DEL",
119
+ "delete": "DEL",
120
+ "in": "IN",
121
+ "is": "IS",
122
+ "debugger": "DEBUGGER",
123
+ "do": "DO",
124
+ "typeof": "TYPEOF",
125
+ "void": "VOID",
126
+ "instanceof": "INSTANCEOF",
127
+ "private": "PRIVATE",
128
+ "protected": "PROTECTED",
129
+ "abstract": "ABSTRACT",
130
+ "readonly": "READONLY",
131
+ "declare": "DECLARE",
132
+ "get": "GET",
133
+ "set": "SET",
134
+ "infer": "INFER",
135
+ "keyof": "KEYOF",
136
+ "unique": "UNIQUE",
137
+ "satisfies": "SATISFIES",
138
+ "unsafe": "UNSAFE",
139
+ "extern": "EXTERN",
140
+ "chan": "CHAN",
141
+ "map": "MAP",
142
+ "dyn": "DYN",
143
+ "move": "MOVE",
144
+ "ref": "REF",
145
+ "where": "WHERE",
146
+ "true": "TRUE",
147
+ "True": "TRUE",
148
+ "false": "FALSE",
149
+ "False": "FALSE",
150
+ "null": "NULL",
151
+ "None": "NULL",
152
+ "nil": "NIL",
153
+ "undefined": "UNDEFINED",
154
+ "print": "PRINT"
155
+ },
156
+ "notes": {
157
+ "javascript": "ECMA-262 §12.7.2 ReservedWord: 38 tokens (includes null, true, false). Excludes strict-mode future reserved words (let, implements, interface, package, private, protected, public, static) and contextual keywords such as async.",
158
+ "python": "Python 3.12: 35 hard keywords (keyword.kwlist) + 4 soft keywords (keyword.softkwlist: _, case, match, type) = 39 total.",
159
+ "typescript": "The TypeScript Handbook does not publish a single official keyword count. This list tracks 64 reserved/type-modifier tokens for transpilation coverage (JS superset + TS-only modifiers).",
160
+ "go": "Go spec §Keywords: exactly 25 keywords.",
161
+ "rust": "Rust Reference strict keywords: 39 tokens (includes _).",
162
+ "print": "print is a Python builtin, not a keyword — mapped via PRINT logical token for transpilation.",
163
+ "console.log": "console.log is not a keyword — PRINT logical token emits console.log for JS/TS.",
164
+ "macros": "Rust panic! and assert! are macros — THROW/ASSERT logical tokens emit macro forms."
165
+ }
166
+ }
@@ -0,0 +1,329 @@
1
+ {
2
+ "IF": [
3
+ "yoo",
4
+ "if"
5
+ ],
6
+ "ELSE": [
7
+ "kana malee",
8
+ "else"
9
+ ],
10
+ "FOR": [
11
+ "waan",
12
+ "for"
13
+ ],
14
+ "WHILE": [
15
+ "yeroo",
16
+ "while"
17
+ ],
18
+ "BREAK": [
19
+ "cabsi",
20
+ "break"
21
+ ],
22
+ "CONTINUE": [
23
+ "itti fufi",
24
+ "continue"
25
+ ],
26
+ "SWITCH": [
27
+ "filadhu",
28
+ "switch"
29
+ ],
30
+ "CASE": [
31
+ "dhimma",
32
+ "case"
33
+ ],
34
+ "DEFAULT": [
35
+ "baramaa",
36
+ "default"
37
+ ],
38
+ "FUNCTION": [
39
+ "hojii",
40
+ "function"
41
+ ],
42
+ "RETURN": [
43
+ "deebisi",
44
+ "return"
45
+ ],
46
+ "ASYNC": [
47
+ "async",
48
+ "async"
49
+ ],
50
+ "AWAIT": [
51
+ "eegi",
52
+ "await"
53
+ ],
54
+ "TRY": [
55
+ "yaali",
56
+ "try"
57
+ ],
58
+ "CATCH": [
59
+ "qabachuu",
60
+ "catch"
61
+ ],
62
+ "FINALLY": [
63
+ "dhumarratti",
64
+ "finally"
65
+ ],
66
+ "THROW": [
67
+ "darbi",
68
+ "throw"
69
+ ],
70
+ "LET": [
71
+ "hayyami",
72
+ "let"
73
+ ],
74
+ "CONST": [
75
+ "dhabbataa",
76
+ "const"
77
+ ],
78
+ "CLASS": [
79
+ "garee",
80
+ "class"
81
+ ],
82
+ "EXTENDS": [
83
+ "dabalata",
84
+ "extends"
85
+ ],
86
+ "NEW": [
87
+ "haaraa",
88
+ "new"
89
+ ],
90
+ "THIS": [
91
+ "kana",
92
+ "this"
93
+ ],
94
+ "IMPORT": [
95
+ "galchi",
96
+ "import"
97
+ ],
98
+ "EXPORT": [
99
+ "ergi",
100
+ "export"
101
+ ],
102
+ "PRINT": [
103
+ "maxxansi",
104
+ "print"
105
+ ],
106
+ "TRUE": [
107
+ "dhugaa",
108
+ "true"
109
+ ],
110
+ "FALSE": [
111
+ "soba",
112
+ "false"
113
+ ],
114
+ "NULL": [
115
+ "homaa",
116
+ "null"
117
+ ],
118
+ "UNDEFINED": [
119
+ "hin ibsamne",
120
+ "undefined"
121
+ ],
122
+ "ELIF": [
123
+ "else"
124
+ ],
125
+ "LOOP": [
126
+ "loop"
127
+ ],
128
+ "MATCH": [
129
+ "match"
130
+ ],
131
+ "GOTO": [
132
+ "goto"
133
+ ],
134
+ "FALLTHROUGH": [
135
+ "fallthrough"
136
+ ],
137
+ "SELECT": [
138
+ "select"
139
+ ],
140
+ "RANGE": [
141
+ "range"
142
+ ],
143
+ "YIELD": [
144
+ "yield"
145
+ ],
146
+ "LAMBDA": [
147
+ "lambda"
148
+ ],
149
+ "DEFER": [
150
+ "defer"
151
+ ],
152
+ "GO": [
153
+ "go"
154
+ ],
155
+ "VAR": [
156
+ "var"
157
+ ],
158
+ "MUT": [
159
+ "mut"
160
+ ],
161
+ "GLOBAL": [
162
+ "global"
163
+ ],
164
+ "NONLOCAL": [
165
+ "nonlocal"
166
+ ],
167
+ "STRUCT": [
168
+ "struct"
169
+ ],
170
+ "TRAIT": [
171
+ "trait"
172
+ ],
173
+ "IMPL": [
174
+ "impl"
175
+ ],
176
+ "INTERFACE": [
177
+ "interface"
178
+ ],
179
+ "ENUM": [
180
+ "enum"
181
+ ],
182
+ "TYPE": [
183
+ "type"
184
+ ],
185
+ "IMPLEMENTS": [
186
+ "implements"
187
+ ],
188
+ "SELF": [
189
+ "self"
190
+ ],
191
+ "SUPER": [
192
+ "super"
193
+ ],
194
+ "STATIC": [
195
+ "static"
196
+ ],
197
+ "FROM": [
198
+ "from"
199
+ ],
200
+ "AS": [
201
+ "as"
202
+ ],
203
+ "MODULE": [
204
+ "module"
205
+ ],
206
+ "NAMESPACE": [
207
+ "namespace"
208
+ ],
209
+ "PACKAGE": [
210
+ "package"
211
+ ],
212
+ "USE": [
213
+ "use"
214
+ ],
215
+ "PUB": [
216
+ "public"
217
+ ],
218
+ "CRATE": [
219
+ "crate"
220
+ ],
221
+ "WITH": [
222
+ "with"
223
+ ],
224
+ "PASS": [
225
+ "pass"
226
+ ],
227
+ "ASSERT": [
228
+ "assert"
229
+ ],
230
+ "ASSERTS": [
231
+ "asserts"
232
+ ],
233
+ "NIL": [
234
+ "null"
235
+ ],
236
+ "UNSAFE": [
237
+ "unsafe"
238
+ ],
239
+ "EXTERN": [
240
+ "declare"
241
+ ],
242
+ "CHAN": [
243
+ "chan"
244
+ ],
245
+ "MAP": [
246
+ "map"
247
+ ],
248
+ "AND": [
249
+ "and"
250
+ ],
251
+ "OR": [
252
+ "or"
253
+ ],
254
+ "NOT": [
255
+ "not"
256
+ ],
257
+ "IN": [
258
+ "in"
259
+ ],
260
+ "IS": [
261
+ "is"
262
+ ],
263
+ "DEL": [
264
+ "del"
265
+ ],
266
+ "DO": [
267
+ "do"
268
+ ],
269
+ "DEBUGGER": [
270
+ "debugger"
271
+ ],
272
+ "TYPEOF": [
273
+ "typeof"
274
+ ],
275
+ "VOID": [
276
+ "void"
277
+ ],
278
+ "INSTANCEOF": [
279
+ "instanceof"
280
+ ],
281
+ "PRIVATE": [
282
+ "private"
283
+ ],
284
+ "PROTECTED": [
285
+ "protected"
286
+ ],
287
+ "PUBLIC": [
288
+ "public"
289
+ ],
290
+ "READONLY": [
291
+ "readonly"
292
+ ],
293
+ "ABSTRACT": [
294
+ "abstract"
295
+ ],
296
+ "DECLARE": [
297
+ "declare"
298
+ ],
299
+ "GET": [
300
+ "get"
301
+ ],
302
+ "SET": [
303
+ "set"
304
+ ],
305
+ "INFER": [
306
+ "infer"
307
+ ],
308
+ "KEYOF": [
309
+ "keyof"
310
+ ],
311
+ "UNIQUE": [
312
+ "unique"
313
+ ],
314
+ "SATISFIES": [
315
+ "satisfies"
316
+ ],
317
+ "DYN": [
318
+ "dyn"
319
+ ],
320
+ "MOVE": [
321
+ "move"
322
+ ],
323
+ "REF": [
324
+ "ref"
325
+ ],
326
+ "WHERE": [
327
+ "where"
328
+ ]
329
+ }