luau2ts 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 (142) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -0
  3. package/dist/cli/args.d.ts +19 -0
  4. package/dist/cli/args.d.ts.map +1 -0
  5. package/dist/cli/args.js +130 -0
  6. package/dist/cli/args.js.map +1 -0
  7. package/dist/cli/bin.d.ts +3 -0
  8. package/dist/cli/bin.d.ts.map +1 -0
  9. package/dist/cli/bin.js +65 -0
  10. package/dist/cli/bin.js.map +1 -0
  11. package/dist/cli/modes.d.ts +17 -0
  12. package/dist/cli/modes.d.ts.map +1 -0
  13. package/dist/cli/modes.js +134 -0
  14. package/dist/cli/modes.js.map +1 -0
  15. package/dist/compile/class-shape.d.ts +31 -0
  16. package/dist/compile/class-shape.d.ts.map +1 -0
  17. package/dist/compile/class-shape.js +291 -0
  18. package/dist/compile/class-shape.js.map +1 -0
  19. package/dist/compile/context.d.ts +86 -0
  20. package/dist/compile/context.d.ts.map +1 -0
  21. package/dist/compile/context.js +144 -0
  22. package/dist/compile/context.js.map +1 -0
  23. package/dist/compile/index.d.ts +43 -0
  24. package/dist/compile/index.d.ts.map +1 -0
  25. package/dist/compile/index.js +2028 -0
  26. package/dist/compile/index.js.map +1 -0
  27. package/dist/compile/macros/datatypes.d.ts +2 -0
  28. package/dist/compile/macros/datatypes.d.ts.map +1 -0
  29. package/dist/compile/macros/datatypes.js +76 -0
  30. package/dist/compile/macros/datatypes.js.map +1 -0
  31. package/dist/compile/macros/index.d.ts +33 -0
  32. package/dist/compile/macros/index.d.ts.map +1 -0
  33. package/dist/compile/macros/index.js +71 -0
  34. package/dist/compile/macros/index.js.map +1 -0
  35. package/dist/compile/macros/instance.d.ts +2 -0
  36. package/dist/compile/macros/instance.d.ts.map +1 -0
  37. package/dist/compile/macros/instance.js +58 -0
  38. package/dist/compile/macros/instance.js.map +1 -0
  39. package/dist/compile/macros/stdlib.d.ts +2 -0
  40. package/dist/compile/macros/stdlib.d.ts.map +1 -0
  41. package/dist/compile/macros/stdlib.js +140 -0
  42. package/dist/compile/macros/stdlib.js.map +1 -0
  43. package/dist/compile/rbxts-runtime.d.ts +2 -0
  44. package/dist/compile/rbxts-runtime.d.ts.map +1 -0
  45. package/dist/compile/rbxts-runtime.js +163 -0
  46. package/dist/compile/rbxts-runtime.js.map +1 -0
  47. package/dist/compile/sourcemap.d.ts +25 -0
  48. package/dist/compile/sourcemap.d.ts.map +1 -0
  49. package/dist/compile/sourcemap.js +71 -0
  50. package/dist/compile/sourcemap.js.map +1 -0
  51. package/dist/compile/type.d.ts +6 -0
  52. package/dist/compile/type.d.ts.map +1 -0
  53. package/dist/compile/type.js +122 -0
  54. package/dist/compile/type.js.map +1 -0
  55. package/dist/compile/util.d.ts +38 -0
  56. package/dist/compile/util.d.ts.map +1 -0
  57. package/dist/compile/util.js +153 -0
  58. package/dist/compile/util.js.map +1 -0
  59. package/dist/index.d.ts +3 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +7 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/parser/index.d.ts +4 -0
  64. package/dist/parser/index.d.ts.map +1 -0
  65. package/dist/parser/index.js +227 -0
  66. package/dist/parser/index.js.map +1 -0
  67. package/dist/parser/types.d.ts +430 -0
  68. package/dist/parser/types.d.ts.map +1 -0
  69. package/dist/parser/types.js +14 -0
  70. package/dist/parser/types.js.map +1 -0
  71. package/dist/parser/wasm/luau-parser.d.mts +21 -0
  72. package/dist/parser/wasm/luau-parser.mjs +2 -0
  73. package/dist/parser/wasm/luau-parser.wasm +0 -0
  74. package/dist/rojo/index.d.ts +4 -0
  75. package/dist/rojo/index.d.ts.map +1 -0
  76. package/dist/rojo/index.js +3 -0
  77. package/dist/rojo/index.js.map +1 -0
  78. package/dist/rojo/load-project.d.ts +12 -0
  79. package/dist/rojo/load-project.d.ts.map +1 -0
  80. package/dist/rojo/load-project.js +35 -0
  81. package/dist/rojo/load-project.js.map +1 -0
  82. package/dist/rojo/types.d.ts +39 -0
  83. package/dist/rojo/types.d.ts.map +1 -0
  84. package/dist/rojo/types.js +2 -0
  85. package/dist/rojo/types.js.map +1 -0
  86. package/dist/rojo/walk-tree.d.ts +40 -0
  87. package/dist/rojo/walk-tree.d.ts.map +1 -0
  88. package/dist/rojo/walk-tree.js +164 -0
  89. package/dist/rojo/walk-tree.js.map +1 -0
  90. package/dist/runtime/arith.d.ts +13 -0
  91. package/dist/runtime/arith.d.ts.map +1 -0
  92. package/dist/runtime/arith.js +151 -0
  93. package/dist/runtime/arith.js.map +1 -0
  94. package/dist/runtime/index-helper.d.ts +3 -0
  95. package/dist/runtime/index-helper.d.ts.map +1 -0
  96. package/dist/runtime/index-helper.js +40 -0
  97. package/dist/runtime/index-helper.js.map +1 -0
  98. package/dist/runtime/index.d.ts +13 -0
  99. package/dist/runtime/index.d.ts.map +1 -0
  100. package/dist/runtime/index.js +13 -0
  101. package/dist/runtime/index.js.map +1 -0
  102. package/dist/runtime/iterator.d.ts +58 -0
  103. package/dist/runtime/iterator.d.ts.map +1 -0
  104. package/dist/runtime/iterator.js +181 -0
  105. package/dist/runtime/iterator.js.map +1 -0
  106. package/dist/runtime/length.d.ts +2 -0
  107. package/dist/runtime/length.d.ts.map +1 -0
  108. package/dist/runtime/length.js +15 -0
  109. package/dist/runtime/length.js.map +1 -0
  110. package/dist/runtime/lua-stdlib.d.ts +186 -0
  111. package/dist/runtime/lua-stdlib.d.ts.map +1 -0
  112. package/dist/runtime/lua-stdlib.js +502 -0
  113. package/dist/runtime/lua-stdlib.js.map +1 -0
  114. package/dist/runtime/metatable.d.ts +16 -0
  115. package/dist/runtime/metatable.d.ts.map +1 -0
  116. package/dist/runtime/metatable.js +129 -0
  117. package/dist/runtime/metatable.js.map +1 -0
  118. package/dist/runtime/pattern.d.ts +21 -0
  119. package/dist/runtime/pattern.d.ts.map +1 -0
  120. package/dist/runtime/pattern.js +375 -0
  121. package/dist/runtime/pattern.js.map +1 -0
  122. package/dist/runtime/pcall.d.ts +12 -0
  123. package/dist/runtime/pcall.d.ts.map +1 -0
  124. package/dist/runtime/pcall.js +54 -0
  125. package/dist/runtime/pcall.js.map +1 -0
  126. package/dist/runtime/string-lib.d.ts +31 -0
  127. package/dist/runtime/string-lib.d.ts.map +1 -0
  128. package/dist/runtime/string-lib.js +296 -0
  129. package/dist/runtime/string-lib.js.map +1 -0
  130. package/dist/runtime/table-lib.d.ts +18 -0
  131. package/dist/runtime/table-lib.d.ts.map +1 -0
  132. package/dist/runtime/table-lib.js +133 -0
  133. package/dist/runtime/table-lib.js.map +1 -0
  134. package/dist/runtime/tostring.d.ts +3 -0
  135. package/dist/runtime/tostring.d.ts.map +1 -0
  136. package/dist/runtime/tostring.js +82 -0
  137. package/dist/runtime/tostring.js.map +1 -0
  138. package/dist/runtime/truthy.d.ts +13 -0
  139. package/dist/runtime/truthy.d.ts.map +1 -0
  140. package/dist/runtime/truthy.js +26 -0
  141. package/dist/runtime/truthy.js.map +1 -0
  142. package/package.json +70 -0
@@ -0,0 +1,430 @@
1
+ export interface Position {
2
+ line: number;
3
+ col: number;
4
+ }
5
+ export interface Loc {
6
+ start: Position;
7
+ end: Position;
8
+ }
9
+ interface NodeBase {
10
+ type: string;
11
+ loc: Loc;
12
+ }
13
+ export interface Local {
14
+ name: string;
15
+ isConst: boolean;
16
+ annotation: TypeNode | null;
17
+ loc: Loc;
18
+ }
19
+ export type TypeOrPack = {
20
+ kind: 'type';
21
+ value: TypeNode;
22
+ } | {
23
+ kind: 'typePack';
24
+ value: TypePack;
25
+ } | null;
26
+ export interface TypeList {
27
+ types: TypeNode[];
28
+ tailType: TypePack | null;
29
+ }
30
+ export interface ArgumentName {
31
+ name: string;
32
+ loc: Loc;
33
+ }
34
+ export type TableAccess = 'Read' | 'Write' | 'ReadWrite';
35
+ export interface TableProp {
36
+ name: string;
37
+ propType: TypeNode | null;
38
+ access: TableAccess;
39
+ accessLocation: Loc | null;
40
+ loc: Loc;
41
+ }
42
+ export interface TableIndexer {
43
+ indexType: TypeNode;
44
+ resultType: TypeNode;
45
+ access: TableAccess;
46
+ accessLocation: Loc | null;
47
+ loc: Loc;
48
+ }
49
+ export interface DeclaredExternProp {
50
+ name: string;
51
+ propType: TypeNode | null;
52
+ isMethod: boolean;
53
+ access: TableAccess;
54
+ loc: Loc;
55
+ }
56
+ export type AttrType = 'Checked' | 'Native' | 'Deprecated' | 'DebugNoinline' | 'Unknown';
57
+ export interface Attr {
58
+ type: 'Attr';
59
+ attrType: AttrType;
60
+ name: string;
61
+ args: Expr[];
62
+ loc: Loc;
63
+ }
64
+ export interface GenericType {
65
+ type: 'GenericType';
66
+ name: string;
67
+ defaultValue: TypeNode | null;
68
+ loc: Loc;
69
+ }
70
+ export interface GenericTypePack {
71
+ type: 'GenericTypePack';
72
+ name: string;
73
+ defaultValue: TypePack | null;
74
+ loc: Loc;
75
+ }
76
+ export type BinaryOp = '+' | '-' | '*' | '/' | '//' | '%' | '^' | '..' | '~=' | '==' | '<' | '<=' | '>' | '>=' | 'and' | 'or';
77
+ export type UnaryOp = 'not' | '-' | '#';
78
+ export type NumberParseResult = 'Ok' | 'Imprecise' | 'Malformed' | 'BinOverflow' | 'HexOverflow' | 'IntOverflow';
79
+ export type QuoteStyle = 'QuotedSimple' | 'QuotedSingle' | 'QuotedRaw' | 'Unquoted';
80
+ export type TableItemKind = 'List' | 'Record' | 'General';
81
+ export interface TableItem {
82
+ kind: TableItemKind;
83
+ key: Expr | null;
84
+ value: Expr;
85
+ }
86
+ export interface BlockStat extends NodeBase {
87
+ type: 'Block';
88
+ body: Stat[];
89
+ hasEnd: boolean;
90
+ }
91
+ export interface IfStat extends NodeBase {
92
+ type: 'If';
93
+ condition: Expr;
94
+ thenBody: Stat;
95
+ elseBody: Stat | null;
96
+ }
97
+ export interface WhileStat extends NodeBase {
98
+ type: 'While';
99
+ condition: Expr;
100
+ body: Stat;
101
+ hasDo: boolean;
102
+ }
103
+ export interface RepeatStat extends NodeBase {
104
+ type: 'Repeat';
105
+ body: Stat;
106
+ condition: Expr;
107
+ }
108
+ export interface BreakStat extends NodeBase {
109
+ type: 'Break';
110
+ }
111
+ export interface ContinueStat extends NodeBase {
112
+ type: 'Continue';
113
+ }
114
+ export interface ReturnStat extends NodeBase {
115
+ type: 'Return';
116
+ values: Expr[];
117
+ }
118
+ export interface ExprStat extends NodeBase {
119
+ type: 'Expr';
120
+ expr: Expr;
121
+ }
122
+ export interface LocalStat extends NodeBase {
123
+ type: 'Local';
124
+ vars: Local[];
125
+ values: Expr[];
126
+ isConst: boolean;
127
+ }
128
+ export interface ForStat extends NodeBase {
129
+ type: 'For';
130
+ var: Local;
131
+ from: Expr;
132
+ to: Expr;
133
+ step: Expr | null;
134
+ body: Stat;
135
+ }
136
+ export interface ForInStat extends NodeBase {
137
+ type: 'ForIn';
138
+ vars: Local[];
139
+ values: Expr[];
140
+ body: Stat;
141
+ }
142
+ export interface AssignStat extends NodeBase {
143
+ type: 'Assign';
144
+ vars: Expr[];
145
+ values: Expr[];
146
+ }
147
+ export interface CompoundAssignStat extends NodeBase {
148
+ type: 'CompoundAssign';
149
+ op: BinaryOp;
150
+ var: Expr;
151
+ value: Expr;
152
+ }
153
+ export interface FunctionStat extends NodeBase {
154
+ type: 'Function';
155
+ name: Expr;
156
+ func: FunctionExpr;
157
+ }
158
+ export interface LocalFunctionStat extends NodeBase {
159
+ type: 'LocalFunction';
160
+ name: Local;
161
+ func: FunctionExpr;
162
+ isConst: boolean;
163
+ }
164
+ export interface TypeAliasStat extends NodeBase {
165
+ type: 'TypeAlias';
166
+ name: string;
167
+ generics: GenericType[];
168
+ genericPacks: GenericTypePack[];
169
+ aliasType: TypeNode;
170
+ exported: boolean;
171
+ }
172
+ export interface TypeFunctionStat extends NodeBase {
173
+ type: 'TypeFunction';
174
+ name: string;
175
+ body: FunctionExpr | null;
176
+ exported: boolean;
177
+ hasErrors: boolean;
178
+ }
179
+ export interface DeclareGlobalStat extends NodeBase {
180
+ type: 'DeclareGlobal';
181
+ name: string;
182
+ declType: TypeNode;
183
+ }
184
+ export interface DeclareFunctionStat extends NodeBase {
185
+ type: 'DeclareFunction';
186
+ attributes: Attr[];
187
+ name: string;
188
+ generics: GenericType[];
189
+ genericPacks: GenericTypePack[];
190
+ params: TypeList;
191
+ paramNames: ArgumentName[];
192
+ vararg: boolean;
193
+ retTypes: TypePack | null;
194
+ }
195
+ export interface DeclareExternTypeStat extends NodeBase {
196
+ type: 'DeclareExternType';
197
+ name: string;
198
+ superName: string | null;
199
+ props: DeclaredExternProp[];
200
+ indexer: TableIndexer | null;
201
+ }
202
+ export interface StatErrorStat extends NodeBase {
203
+ type: 'StatError';
204
+ expressions: Expr[];
205
+ statements: Stat[];
206
+ messageIndex: number;
207
+ }
208
+ export interface UnknownStat extends NodeBase {
209
+ type: 'UnknownStat';
210
+ classIndex: number;
211
+ }
212
+ export type Stat = BlockStat | IfStat | WhileStat | RepeatStat | BreakStat | ContinueStat | ReturnStat | ExprStat | LocalStat | ForStat | ForInStat | AssignStat | CompoundAssignStat | FunctionStat | LocalFunctionStat | TypeAliasStat | TypeFunctionStat | DeclareGlobalStat | DeclareFunctionStat | DeclareExternTypeStat | StatErrorStat | UnknownStat;
213
+ export interface GroupExpr extends NodeBase {
214
+ type: 'Group';
215
+ expr: Expr;
216
+ }
217
+ export interface ConstantNilExpr extends NodeBase {
218
+ type: 'ConstantNil';
219
+ }
220
+ export interface ConstantBoolExpr extends NodeBase {
221
+ type: 'ConstantBool';
222
+ value: boolean;
223
+ }
224
+ export interface ConstantNumberExpr extends NodeBase {
225
+ type: 'ConstantNumber';
226
+ value: number;
227
+ parseResult: NumberParseResult;
228
+ }
229
+ export interface ConstantIntegerExpr extends NodeBase {
230
+ type: 'ConstantInteger';
231
+ value: number;
232
+ parseResult: NumberParseResult;
233
+ }
234
+ export interface ConstantStringExpr extends NodeBase {
235
+ type: 'ConstantString';
236
+ value: string;
237
+ quoteStyle: QuoteStyle;
238
+ }
239
+ export interface LocalExpr extends NodeBase {
240
+ type: 'Local';
241
+ name: string;
242
+ upvalue: boolean;
243
+ }
244
+ export interface GlobalExpr extends NodeBase {
245
+ type: 'Global';
246
+ name: string;
247
+ }
248
+ export interface VarargsExpr extends NodeBase {
249
+ type: 'Varargs';
250
+ }
251
+ export interface CallExpr extends NodeBase {
252
+ type: 'Call';
253
+ func: Expr;
254
+ typeArguments: TypeOrPack[];
255
+ args: Expr[];
256
+ self: boolean;
257
+ argLocation: Loc;
258
+ }
259
+ export interface IndexNameExpr extends NodeBase {
260
+ type: 'IndexName';
261
+ expr: Expr;
262
+ index: string;
263
+ op: '.' | ':';
264
+ }
265
+ export interface IndexExprExpr extends NodeBase {
266
+ type: 'IndexExpr';
267
+ expr: Expr;
268
+ index: Expr;
269
+ }
270
+ export interface FunctionExpr extends NodeBase {
271
+ type: 'Function';
272
+ attributes: Attr[];
273
+ generics: GenericType[];
274
+ genericPacks: GenericTypePack[];
275
+ self: Local | null;
276
+ args: Local[];
277
+ vararg: boolean;
278
+ varargAnnotation: TypePack | null;
279
+ returnAnnotation: TypePack | null;
280
+ body: BlockStat;
281
+ debugname: string;
282
+ }
283
+ export interface TableExpr extends NodeBase {
284
+ type: 'Table';
285
+ items: TableItem[];
286
+ }
287
+ export interface UnaryExpr extends NodeBase {
288
+ type: 'Unary';
289
+ op: UnaryOp;
290
+ expr: Expr;
291
+ }
292
+ export interface BinaryExpr extends NodeBase {
293
+ type: 'Binary';
294
+ op: BinaryOp;
295
+ left: Expr;
296
+ right: Expr;
297
+ }
298
+ export interface TypeAssertionExpr extends NodeBase {
299
+ type: 'TypeAssertion';
300
+ expr: Expr;
301
+ annotation: TypeNode;
302
+ }
303
+ export interface IfElseExpr extends NodeBase {
304
+ type: 'IfElse';
305
+ condition: Expr;
306
+ hasThen: boolean;
307
+ trueExpr: Expr;
308
+ hasElse: boolean;
309
+ falseExpr: Expr;
310
+ }
311
+ export interface InterpStringExpr extends NodeBase {
312
+ type: 'InterpString';
313
+ strings: string[];
314
+ expressions: Expr[];
315
+ }
316
+ export interface InstantiateExpr extends NodeBase {
317
+ type: 'Instantiate';
318
+ expr: Expr;
319
+ typeArguments: TypeOrPack[];
320
+ }
321
+ export interface ExprErrorExpr extends NodeBase {
322
+ type: 'ExprError';
323
+ expressions: Expr[];
324
+ messageIndex: number;
325
+ }
326
+ export interface UnknownExpr extends NodeBase {
327
+ type: 'UnknownExpr';
328
+ classIndex: number;
329
+ }
330
+ export type Expr = GroupExpr | ConstantNilExpr | ConstantBoolExpr | ConstantNumberExpr | ConstantIntegerExpr | ConstantStringExpr | LocalExpr | GlobalExpr | VarargsExpr | CallExpr | IndexNameExpr | IndexExprExpr | FunctionExpr | TableExpr | UnaryExpr | BinaryExpr | TypeAssertionExpr | IfElseExpr | InterpStringExpr | InstantiateExpr | ExprErrorExpr | UnknownExpr;
331
+ export interface TypeReferenceNode extends NodeBase {
332
+ type: 'TypeReference';
333
+ prefix: string | null;
334
+ prefixLocation: Loc | null;
335
+ name: string;
336
+ hasParameterList: boolean;
337
+ parameters: TypeOrPack[];
338
+ }
339
+ export interface TypeTableNode extends NodeBase {
340
+ type: 'TypeTable';
341
+ props: TableProp[];
342
+ indexer: TableIndexer | null;
343
+ }
344
+ export interface TypeFunctionNode extends NodeBase {
345
+ type: 'TypeFunction';
346
+ attributes: Attr[];
347
+ generics: GenericType[];
348
+ genericPacks: GenericTypePack[];
349
+ argTypes: TypeList;
350
+ argNames: (ArgumentName | null)[];
351
+ returnTypes: TypePack | null;
352
+ }
353
+ export interface TypeTypeofNode extends NodeBase {
354
+ type: 'TypeTypeof';
355
+ expr: Expr;
356
+ }
357
+ export interface TypeOptionalNode extends NodeBase {
358
+ type: 'TypeOptional';
359
+ }
360
+ export interface TypeUnionNode extends NodeBase {
361
+ type: 'TypeUnion';
362
+ types: TypeNode[];
363
+ }
364
+ export interface TypeIntersectionNode extends NodeBase {
365
+ type: 'TypeIntersection';
366
+ types: TypeNode[];
367
+ }
368
+ export interface TypeErrorNode extends NodeBase {
369
+ type: 'TypeError';
370
+ types: TypeNode[];
371
+ isMissing: boolean;
372
+ messageIndex: number;
373
+ }
374
+ export interface TypeSingletonBoolNode extends NodeBase {
375
+ type: 'TypeSingletonBool';
376
+ value: boolean;
377
+ }
378
+ export interface TypeSingletonStringNode extends NodeBase {
379
+ type: 'TypeSingletonString';
380
+ value: string;
381
+ }
382
+ export interface TypeGroupNode extends NodeBase {
383
+ type: 'TypeGroup';
384
+ groupType: TypeNode;
385
+ }
386
+ export interface UnknownTypeNode extends NodeBase {
387
+ type: 'UnknownType';
388
+ classIndex: number;
389
+ }
390
+ export type TypeNode = TypeReferenceNode | TypeTableNode | TypeFunctionNode | TypeTypeofNode | TypeOptionalNode | TypeUnionNode | TypeIntersectionNode | TypeErrorNode | TypeSingletonBoolNode | TypeSingletonStringNode | TypeGroupNode | UnknownTypeNode;
391
+ export interface TypePackExplicit extends NodeBase {
392
+ type: 'TypePackExplicit';
393
+ typeList: TypeList;
394
+ }
395
+ export interface TypePackVariadic extends NodeBase {
396
+ type: 'TypePackVariadic';
397
+ variadicType: TypeNode;
398
+ }
399
+ export interface TypePackGeneric extends NodeBase {
400
+ type: 'TypePackGeneric';
401
+ genericName: string;
402
+ }
403
+ export interface UnknownTypePack extends NodeBase {
404
+ type: 'UnknownTypePack';
405
+ classIndex: number;
406
+ }
407
+ export type TypePack = TypePackExplicit | TypePackVariadic | TypePackGeneric | UnknownTypePack;
408
+ export interface ParseError {
409
+ message: string;
410
+ loc: Loc;
411
+ }
412
+ export interface HotComment {
413
+ header: boolean;
414
+ content: string;
415
+ loc: Loc;
416
+ }
417
+ export type CommentKind = 'Comment' | 'BlockComment' | 'BrokenComment';
418
+ export interface Comment {
419
+ kind: CommentKind;
420
+ loc: Loc;
421
+ }
422
+ export interface ParseResult {
423
+ errors: ParseError[];
424
+ hotcomments: HotComment[];
425
+ comments: Comment[];
426
+ root: BlockStat | null;
427
+ lines: number;
428
+ }
429
+ export {};
430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IAChD,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,IAAI,EAAE,kBAAkB,CAAC;IACzB,YAAY,EAAE,QAAQ,CAAC;CACxB;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,IAAI,EAAE,iBAAiB,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,QAAQ,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,eAAe,GAAG,eAAe,CAAC;AAI/F,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,GAAG,CAAC;CACV;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,GAAG,CAAC;CACV;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,cAAc,GAAG,eAAe,CAAC;AAEvE,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,GAAG,CAAC;CACV;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,14 @@
1
+ // AST shapes emitted by wrapper.cpp. Tags match Luau's AstStat*/AstExpr*/AstType*/
2
+ // AstTypePack* class names, lowered to a discriminated union over `type`.
3
+ //
4
+ // Coverage parity with the wrapper: every Luau node kind emits a tagged shape
5
+ // here. Anything the wrapper genuinely cannot recognize surfaces as
6
+ // Unknown{Stat,Expr,Type,TypePack} with a numeric classIndex so callers can
7
+ // detect future Luau additions without crashing.
8
+ //
9
+ // Naming: an `AstStatLocal` (the `local x = 1` *statement*) becomes `LocalStat`;
10
+ // an `AstExprLocal` (the *expression* referencing a local) becomes `LocalExpr`;
11
+ // an `AstLocal` (the *binding info* for a local — name, isConst, annotation,
12
+ // location) becomes plain `Local`.
13
+ export {};
14
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/parser/types.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,0EAA0E;AAC1E,EAAE;AACF,8EAA8E;AAC9E,oEAAoE;AACpE,4EAA4E;AAC5E,iDAAiD;AACjD,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,6EAA6E;AAC7E,mCAAmC"}
@@ -0,0 +1,21 @@
1
+ // Hand-written shim for the Emscripten-generated luau-parser.mjs.
2
+ // The module exports a default factory that returns a Promise<EmModule>.
3
+ // We only declare the runtime methods our loader uses.
4
+
5
+ export interface EmModule {
6
+ HEAPU8: Uint8Array;
7
+ _malloc(size: number): number;
8
+ _free(ptr: number): void;
9
+ _luau_parse(srcPtr: number, srcLen: number): number;
10
+ _luau_free(ptr: number): void;
11
+ UTF8ToString(ptr: number): string;
12
+ }
13
+
14
+ export interface EmModuleConfig {
15
+ locateFile?: (path: string, prefix: string) => string;
16
+ print?: (msg: string) => void;
17
+ printErr?: (msg: string) => void;
18
+ }
19
+
20
+ declare const createLuauParserModule: (config?: EmModuleConfig) => Promise<EmModule>;
21
+ export default createLuauParserModule;
@@ -0,0 +1,2 @@
1
+ async function createLuauParserModule(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(ENVIRONMENT_IS_NODE){const{createRequire}=await import("node:module");var require=createRequire(import.meta.url)}var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("node:fs");if(_scriptName.startsWith("file:")){scriptDirectory=require("node:path").dirname(require("node:url").fileURLToPath(_scriptName))+"/"}readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var isFileURI=filename=>filename.startsWith("file://");class EmscriptenEH{}class EmscriptenSjLj extends EmscriptenEH{}class CppException extends EmscriptenEH{constructor(excPtr){super();this.excPtr=excPtr}}var readyPromiseResolve,readyPromiseReject;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAP32=new Int32Array(b);HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;wasmExports["__wasm_call_ctors"]()}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(onPostRuns)}function abort(what){Module["onAbort"]?.(what);what=`Aborted(${what})`;err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("luau-parser.wasm")}return new URL("luau-parser.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={env:wasmImports,wasi_snapshot_preview1:wasmImports};return imports}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){return new Promise((resolve,reject)=>{Module["instantiateWasm"](info,(inst,mod)=>{resolve(receiveInstance(inst,mod))})})}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var HEAP16;var HEAP32;var HEAP64;var HEAP8;var HEAPF32;var HEAPF64;var HEAPU16;var HEAPU32;var HEAPU64;var HEAPU8;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPostRuns=[];var addOnPostRun=cb=>onPostRuns.push(cb);var onPreRuns=[];var addOnPreRun=cb=>onPreRuns.push(cb);var noExitRuntime=true;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var exceptionCaught=[];var uncaughtExceptionCount=0;var ___cxa_begin_catch=ptr=>{var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);return ___cxa_get_exception_ptr(ptr)};var exceptionLast=null;var ___cxa_end_catch=()=>{_setThrew(0,0);var info=exceptionCaught.pop();___cxa_decrement_exception_refcount(info.excPtr);exceptionLast=null};class ExceptionInfo{constructor(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24}set_type(type){HEAPU32[this.ptr+4>>2]=type}get_type(){return HEAPU32[this.ptr+4>>2]}set_destructor(destructor){HEAPU32[this.ptr+8>>2]=destructor}get_destructor(){return HEAPU32[this.ptr+8>>2]}set_caught(caught){caught=caught?1:0;HEAP8[this.ptr+12]=caught}get_caught(){return HEAP8[this.ptr+12]!=0}set_rethrown(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13]=rethrown}get_rethrown(){return HEAP8[this.ptr+13]!=0}init(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)}set_adjusted_ptr(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>2]}}var setTempRet0=val=>__emscripten_tempret_set(val);var findMatchingCatch=args=>{var thrown=exceptionLast?.excPtr;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var caughtType of args){if(caughtType===0||caughtType===thrownType){break}var adjusted_ptr_addr=info.ptr+16;if(___cxa_can_catch(caughtType,thrownType,adjusted_ptr_addr)){setTempRet0(caughtType);return thrown}}setTempRet0(thrownType);return thrown};var ___cxa_find_matching_catch_2=()=>findMatchingCatch([]);var ___cxa_find_matching_catch_3=arg0=>findMatchingCatch([arg0]);var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);___cxa_increment_exception_refcount(ptr);exceptionLast=new CppException(ptr);uncaughtExceptionCount++;throw exceptionLast};var ___resumeException=ptr=>{if(!exceptionLast){exceptionLast=new CppException(ptr)}throw exceptionLast};var __abort_js=()=>abort("");var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _llvm_eh_typeid_for=type=>type;var wasmTableMirror=[];var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var UTF8Decoder=globalThis.TextDecoder&&new TextDecoder;var findStringEnd=(heapOrArray,idx,maxBytesToRead,ignoreNul)=>{var maxIdx=idx+maxBytesToRead;if(ignoreNul)return maxIdx;while(heapOrArray[idx]&&!(idx>=maxIdx))++idx;return idx};var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead,ignoreNul)=>{var endPtr=findStringEnd(heapOrArray,idx,maxBytesToRead,ignoreNul);if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead,ignoreNul)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead,ignoreNul):"";{if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].shift()()}}}Module["UTF8ToString"]=UTF8ToString;var _luau_parse,_malloc,_luau_free,_free,_setThrew,__emscripten_tempret_set,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___cxa_increment_exception_refcount,___cxa_decrement_exception_refcount,___cxa_can_catch,___cxa_get_exception_ptr,memory,__indirect_function_table,wasmMemory,wasmTable;function assignWasmExports(wasmExports){_luau_parse=Module["_luau_parse"]=wasmExports["luau_parse"];_malloc=Module["_malloc"]=wasmExports["malloc"];_luau_free=Module["_luau_free"]=wasmExports["luau_free"];_free=Module["_free"]=wasmExports["free"];_setThrew=wasmExports["setThrew"];__emscripten_tempret_set=wasmExports["_emscripten_tempret_set"];__emscripten_stack_restore=wasmExports["_emscripten_stack_restore"];__emscripten_stack_alloc=wasmExports["_emscripten_stack_alloc"];_emscripten_stack_get_current=wasmExports["emscripten_stack_get_current"];___cxa_increment_exception_refcount=wasmExports["__cxa_increment_exception_refcount"];___cxa_decrement_exception_refcount=wasmExports["__cxa_decrement_exception_refcount"];___cxa_can_catch=wasmExports["__cxa_can_catch"];___cxa_get_exception_ptr=wasmExports["__cxa_get_exception_ptr"];memory=wasmMemory=wasmExports["memory"];__indirect_function_table=wasmTable=wasmExports["__indirect_function_table"]}var wasmImports={__cxa_begin_catch:___cxa_begin_catch,__cxa_end_catch:___cxa_end_catch,__cxa_find_matching_catch_2:___cxa_find_matching_catch_2,__cxa_find_matching_catch_3:___cxa_find_matching_catch_3,__cxa_throw:___cxa_throw,__resumeException:___resumeException,_abort_js:__abort_js,emscripten_resize_heap:_emscripten_resize_heap,invoke_ii,invoke_iii,invoke_iiii,invoke_iiiii,invoke_iiiiii,invoke_iiiiiii,invoke_iiiiiiii,invoke_iiiiiiiii,invoke_iiiiiiiiii,invoke_iiiiiiiiiiiii,invoke_iiiiiiiiiiiiiiii,invoke_v,invoke_vi,invoke_vii,invoke_viii,invoke_viiii,invoke_viiiii,invoke_viiiiii,invoke_viiiiiiii,llvm_eh_typeid_for:_llvm_eh_typeid_for};function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(!(e instanceof EmscriptenEH))throw e;_setThrew(1,0)}}function run(){preRun();function doRun(){Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}var wasmExports;wasmExports=await (createWasm());run();if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}
2
+ ;return moduleRtn}export default createLuauParserModule;
@@ -0,0 +1,4 @@
1
+ export { loadProject } from './load-project.js';
2
+ export { classifyFile } from './walk-tree.js';
3
+ export type { LoadedProject, LuauScriptEntry, RojoProjectFile, RojoProjectNode, ScriptKind, } from './types.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rojo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,UAAU,GACX,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { loadProject } from './load-project.js';
2
+ export { classifyFile } from './walk-tree.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rojo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { LoadedProject } from './types.js';
2
+ /** Load a Rojo project file and produce the flat list of Luau scripts it
3
+ * describes, ready to feed to `compile()`. Accepts either a direct path
4
+ * to a `*.project.json` file or a directory containing
5
+ * `default.project.json`.
6
+ *
7
+ * This is intentionally a read-only walker: it does not synthesize JSON
8
+ * modules, does not produce a Roblox instance IR, and does not watch
9
+ * for file changes. For runtime / HMR use cases, depend on a separate
10
+ * package built on top of this one. */
11
+ export declare function loadProject(projectArg: string): Promise<LoadedProject>;
12
+ //# sourceMappingURL=load-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-project.d.ts","sourceRoot":"","sources":["../../src/rojo/load-project.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EAGd,MAAM,YAAY,CAAC;AAQpB;;;;;;;;wCAQwC;AACxC,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAuB5E"}
@@ -0,0 +1,35 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { defaultProjectName, projectDirOf, resolveProjectFile, walkNode, } from './walk-tree.js';
3
+ /** Load a Rojo project file and produce the flat list of Luau scripts it
4
+ * describes, ready to feed to `compile()`. Accepts either a direct path
5
+ * to a `*.project.json` file or a directory containing
6
+ * `default.project.json`.
7
+ *
8
+ * This is intentionally a read-only walker: it does not synthesize JSON
9
+ * modules, does not produce a Roblox instance IR, and does not watch
10
+ * for file changes. For runtime / HMR use cases, depend on a separate
11
+ * package built on top of this one. */
12
+ export async function loadProject(projectArg) {
13
+ const projectFile = await resolveProjectFile(projectArg);
14
+ const raw = await readFile(projectFile, 'utf8');
15
+ let parsed;
16
+ try {
17
+ parsed = JSON.parse(raw);
18
+ }
19
+ catch (err) {
20
+ const msg = err instanceof Error ? err.message : String(err);
21
+ throw new Error(`Failed to parse ${projectFile}: ${msg}`);
22
+ }
23
+ if (!parsed.tree || typeof parsed.tree !== 'object') {
24
+ throw new Error(`${projectFile}: missing or invalid "tree" property`);
25
+ }
26
+ const projectDir = projectDirOf(projectFile);
27
+ const scripts = [];
28
+ await walkNode(parsed.tree, [], projectDir, scripts);
29
+ return {
30
+ name: parsed.name ?? defaultProjectName(projectFile),
31
+ projectFile,
32
+ scripts,
33
+ };
34
+ }
35
+ //# sourceMappingURL=load-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-project.js","sourceRoot":"","sources":["../../src/rojo/load-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAM5C,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;wCAQwC;AACxC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,UAAkB;IAClD,MAAM,WAAW,GAAG,MAAM,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACzD,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAChD,IAAI,MAAuB,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAoB,CAAC;IAC9C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,MAAM,IAAI,KAAK,CAAC,mBAAmB,WAAW,KAAK,GAAG,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,GAAG,WAAW,sCAAsC,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,UAAU,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAsB,EAAE,CAAC;IACtC,MAAM,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAErD,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,kBAAkB,CAAC,WAAW,CAAC;QACpD,WAAW;QACX,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ export type ScriptKind = 'ModuleScript' | 'Script' | 'LocalScript';
2
+ export interface LuauScriptEntry {
3
+ /** Path components from the project's DataModel root to this script's
4
+ * parent instance, then ending with the script's own name. Example:
5
+ * `['ReplicatedStorage', 'Shared', 'Util']` for a ModuleScript
6
+ * `Util` at `ReplicatedStorage/Shared/Util.luau`. */
7
+ instancePath: string[];
8
+ /** Whether the source file is a server-only Script, a client-only
9
+ * LocalScript, or a shared ModuleScript. Determined by the
10
+ * `.server.luau` / `.client.luau` / `.luau` filename suffix
11
+ * (or by `$className` on the Rojo project node, when set). */
12
+ scriptKind: ScriptKind;
13
+ /** Absolute filesystem path of the .luau / .lua source. */
14
+ filePath: string;
15
+ /** UTF-8 file contents. Loaded eagerly so a single project read can be
16
+ * fed straight into the compiler without further IO. */
17
+ source: string;
18
+ }
19
+ export interface RojoProjectNode {
20
+ $className?: string;
21
+ $path?: string;
22
+ $properties?: Record<string, unknown>;
23
+ [childName: string]: unknown;
24
+ }
25
+ export interface RojoProjectFile {
26
+ name?: string;
27
+ tree: RojoProjectNode;
28
+ servePort?: number;
29
+ servePlaceIds?: number[];
30
+ }
31
+ export interface LoadedProject {
32
+ /** The project file's `name` field, or the project file's filename if absent. */
33
+ name: string;
34
+ /** Absolute path to the project file (e.g. `/foo/default.project.json`). */
35
+ projectFile: string;
36
+ /** All discovered .luau / .lua scripts, in deterministic depth-first order. */
37
+ scripts: LuauScriptEntry[];
38
+ }
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/rojo/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B;;;0DAGsD;IACtD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;mEAG+D;IAC/D,UAAU,EAAE,UAAU,CAAC;IACvB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB;6DACyD;IACzD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/rojo/types.ts"],"names":[],"mappings":""}