@@ -18,7 +18,7 @@ class Stmt is Node end
18
18
class Expr is Node end
19
19
20
20
class AstModule is Node
21
- fun new (statements)
21
+ construct (statements)
22
22
this.statements = statements
23
23
end
24
24
@@ -32,7 +32,7 @@ class AstModule is Node
32
32
end
33
33
34
34
static class Decl is Stmt
35
- fun new ()
35
+ construct ()
36
36
this._static = false
37
37
end
38
38
@@ -46,7 +46,7 @@ static class Decl is Stmt
46
46
end
47
47
48
48
class FuncDecl is Decl
49
- fun new (funTok, name, leftBracket, arguments, defaults, vararg, rightBracket, body)
49
+ construct (funTok, name, leftBracket, arguments, defaults, vararg, rightBracket, body)
50
50
super()
51
51
this.funTok = funTok
52
52
this.name = name
@@ -68,7 +68,7 @@ class FuncDecl is Decl
68
68
end
69
69
70
70
class NativeDecl is Decl
71
- fun new (nativeTok, name, leftBracket, arguments, defaults, vararg, rightBracket)
71
+ construct (nativeTok, name, leftBracket, arguments, defaults, vararg, rightBracket)
72
72
super()
73
73
this.nativeTok = nativeTok
74
74
this.name = name
@@ -89,7 +89,7 @@ class NativeDecl is Decl
89
89
end
90
90
91
91
class ClassDecl is Decl
92
- fun new (classTok, name, superClass, methods)
92
+ construct (classTok, name, superClass, methods)
93
93
super()
94
94
this.classTok = classTok
95
95
this.name = name
@@ -107,7 +107,7 @@ class ClassDecl is Decl
107
107
end
108
108
109
109
class VarDecl is Decl
110
- fun new (varTok, names, equal, init, unpack)
110
+ construct (varTok, names, equal, init, unpack)
111
111
super()
112
112
this.varTok = varTok
113
113
this.names = names
@@ -126,7 +126,7 @@ class VarDecl is Decl
126
126
end
127
127
128
128
class BlockStmt is Stmt
129
- fun new (statements)
129
+ construct (statements)
130
130
this.statements = statements
131
131
end
132
132
@@ -140,7 +140,7 @@ class BlockStmt is Stmt
140
140
end
141
141
142
142
class IfStmt is Stmt
143
- fun new (ifTok, cond, thenBody, elseBody)
143
+ construct (ifTok, cond, thenBody, elseBody)
144
144
this.ifTok = ifTok
145
145
this.cond = cond
146
146
this.thenBody = thenBody
@@ -157,7 +157,7 @@ class IfStmt is Stmt
157
157
end
158
158
159
159
class ForStmt is Stmt
160
- fun new (forTok, init, cond, action, body)
160
+ construct (forTok, init, cond, action, body)
161
161
this.forTok = forTok
162
162
this.init = init
163
163
this.cond = cond
@@ -175,7 +175,7 @@ class ForStmt is Stmt
175
175
end
176
176
177
177
class ForEachStmt is Stmt
178
- fun new (forTok, variable, inTok, iter, body)
178
+ construct (forTok, variable, inTok, iter, body)
179
179
this.forTok = forTok
180
180
this.variable, this.iter = variable, iter
181
181
this.inTok = inTok
@@ -192,7 +192,7 @@ class ForEachStmt is Stmt
192
192
end
193
193
194
194
class WhileStmt is Stmt
195
- fun new (whileTok, cond, body)
195
+ construct (whileTok, cond, body)
196
196
this.whileTok = whileTok
197
197
this.cond = cond
198
198
this.body = body
@@ -208,7 +208,7 @@ class WhileStmt is Stmt
208
208
end
209
209
210
210
class ReturnStmt is Stmt
211
- fun new (returnTok, expr)
211
+ construct (returnTok, expr)
212
212
this.returnTok = returnTok
213
213
this.expr = expr
214
214
end
@@ -223,7 +223,7 @@ class ReturnStmt is Stmt
223
223
end
224
224
225
225
class ImportStmt is Stmt
226
- fun new (importTok, modules, asName, names)
226
+ construct (importTok, modules, asName, names)
227
227
this.importTok = importTok
228
228
this.modules = modules
229
229
this.asName = asName
@@ -240,7 +240,7 @@ class ImportStmt is Stmt
240
240
end
241
241
242
242
class TryStmt is Stmt
243
- fun new (tokTry, tryBlock, excepts, ensureBlock)
243
+ construct (tokTry, tryBlock, excepts, ensureBlock)
244
244
this.tokTry = tokTry
245
245
this.tryBlock = tryBlock
246
246
this.excepts = excepts
@@ -257,7 +257,7 @@ class TryStmt is Stmt
257
257
end
258
258
259
259
class ExceptStmt is Stmt
260
- fun new (exceptTok, expression, name, body)
260
+ construct (exceptTok, expression, name, body)
261
261
this.exceptTok = exceptTok
262
262
this.expression = expression
263
263
this.name = name
@@ -274,7 +274,7 @@ class ExceptStmt is Stmt
274
274
end
275
275
276
276
class RaiseStmt is Stmt
277
- fun new (raiseTok, expression)
277
+ construct (raiseTok, expression)
278
278
this.raiseTok = raiseTok
279
279
this.expression = expression
280
280
end
@@ -289,7 +289,7 @@ class RaiseStmt is Stmt
289
289
end
290
290
291
291
class WithStmt is Stmt
292
- fun new (withTok, expression, name, body)
292
+ construct (withTok, expression, name, body)
293
293
this.withTok = withTok
294
294
this.expression = expression
295
295
this.name = name
@@ -306,7 +306,7 @@ class WithStmt is Stmt
306
306
end
307
307
308
308
class BreakStmt is Stmt
309
- fun new (token)
309
+ construct (token)
310
310
this.token = token
311
311
end
312
312
@@ -320,7 +320,7 @@ class BreakStmt is Stmt
320
320
end
321
321
322
322
class ContinueStmt is Stmt
323
- fun new (token)
323
+ construct (token)
324
324
this.token = token
325
325
end
326
326
@@ -334,7 +334,7 @@ class ContinueStmt is Stmt
334
334
end
335
335
336
336
class AssignmentExpr is Expr
337
- fun new (lvals, equal, rval)
337
+ construct (lvals, equal, rval)
338
338
this.lvals = lvals
339
339
this.equal = equal
340
340
this.rval = rval
@@ -350,7 +350,7 @@ class AssignmentExpr is Expr
350
350
end
351
351
352
352
class CompoundAssExpr is Expr
353
- fun new (lval, op, rval)
353
+ construct (lval, op, rval)
354
354
this.lval = lval
355
355
this.op = op
356
356
this.rval = rval
@@ -366,7 +366,7 @@ class CompoundAssExpr is Expr
366
366
end
367
367
368
368
class BinaryExpr is Expr
369
- fun new (l, op, r)
369
+ construct (l, op, r)
370
370
this.op = op
371
371
this.l, this.r = l ,r
372
372
end
@@ -381,7 +381,7 @@ class BinaryExpr is Expr
381
381
end
382
382
383
383
class UnaryExpr is Expr
384
- fun new (op, operand)
384
+ construct (op, operand)
385
385
this.op = op
386
386
this.operand = operand
387
387
end
@@ -396,7 +396,7 @@ class UnaryExpr is Expr
396
396
end
397
397
398
398
class ExponentExpr is Expr
399
- fun new (base, pow, exponent)
399
+ construct (base, pow, exponent)
400
400
this.base = base
401
401
this.pow = pow
402
402
this.exponent = exponent
@@ -412,7 +412,7 @@ class ExponentExpr is Expr
412
412
end
413
413
414
414
class TernaryExpr is Expr
415
- fun new (thenExp, ifTok, cond, elseTok, elseExp)
415
+ construct (thenExp, ifTok, cond, elseTok, elseExp)
416
416
this.ifTok, this.elseTok = ifTok, elseTok
417
417
this.cond = cond
418
418
this.thenExp = thenExp
@@ -429,7 +429,7 @@ class TernaryExpr is Expr
429
429
end
430
430
431
431
class FuncLit is Expr
432
- fun new (funTok, leftBracket, arguments, defaults, vararg, rightBracket, body)
432
+ construct (funTok, leftBracket, arguments, defaults, vararg, rightBracket, body)
433
433
this.funTok = funTok
434
434
this.name = null
435
435
this.leftBracket = leftBracket
@@ -450,7 +450,7 @@ class FuncLit is Expr
450
450
end
451
451
452
452
class AttributeExpr is Expr
453
- fun new (l, dot, name)
453
+ construct (l, dot, name)
454
454
this.l, this.dot, this.name = l, dot, name
455
455
end
456
456
@@ -464,7 +464,7 @@ class AttributeExpr is Expr
464
464
end
465
465
466
466
class CallExpr is Expr
467
- fun new (l, leftBracket, expressions, rightBracket, isUnpack=false)
467
+ construct (l, leftBracket, expressions, rightBracket, isUnpack=false)
468
468
this.l = l
469
469
this.leftBracket = leftBracket
470
470
this.expressions = expressions
@@ -482,7 +482,7 @@ class CallExpr is Expr
482
482
end
483
483
484
484
class ArrayAccessExpr is Expr
485
- fun new (l, leftBracket, expression, rightBracket)
485
+ construct (l, leftBracket, expression, rightBracket)
486
486
this.l = l
487
487
this.leftBracket = leftBracket
488
488
this.expression = expression
@@ -499,7 +499,7 @@ class ArrayAccessExpr is Expr
499
499
end
500
500
501
501
class NumLit is Expr
502
- fun new (num)
502
+ construct (num)
503
503
this.num = num
504
504
end
505
505
@@ -513,7 +513,7 @@ class NumLit is Expr
513
513
end
514
514
515
515
class StringLit is Expr
516
- fun new (str)
516
+ construct (str)
517
517
this.str = str
518
518
end
519
519
@@ -527,7 +527,7 @@ class StringLit is Expr
527
527
end
528
528
529
529
class BoolLit is Expr
530
- fun new (bool)
530
+ construct (bool)
531
531
this.bool = bool
532
532
end
533
533
@@ -541,7 +541,7 @@ class BoolLit is Expr
541
541
end
542
542
543
543
class NullLit is Expr
544
- fun new (nil)
544
+ construct (nil)
545
545
this.nil = nil
546
546
end
547
547
@@ -555,7 +555,7 @@ class NullLit is Expr
555
555
end
556
556
557
557
class VarLit is Expr
558
- fun new (id)
558
+ construct (id)
559
559
this.id = id
560
560
end
561
561
@@ -569,7 +569,7 @@ class VarLit is Expr
569
569
end
570
570
571
571
class SuperLit is Expr
572
- fun new (superTok, name, leftBracket, arguments, rightBracket, isUnpack = false)
572
+ construct (superTok, name, leftBracket, arguments, rightBracket, isUnpack = false)
573
573
this.superTok = superTok
574
574
this.name = name
575
575
this.leftBracket = leftBracket
@@ -588,7 +588,7 @@ class SuperLit is Expr
588
588
end
589
589
590
590
class ListLit is Expr
591
- fun new (leftBracket, expressions, rightBracket)
591
+ construct (leftBracket, expressions, rightBracket)
592
592
this.leftBracket = leftBracket
593
593
this.expressions = expressions
594
594
this.rightBracket = rightBracket
@@ -604,7 +604,7 @@ class ListLit is Expr
604
604
end
605
605
606
606
class TupleLit is Expr
607
- fun new (expressions, leftBracket=null, rightBracket=null)
607
+ construct (expressions, leftBracket=null, rightBracket=null)
608
608
this.expressions = expressions
609
609
this.leftBracket, this.rightBracket = leftBracket, rightBracket
610
610
end
@@ -619,13 +619,13 @@ class TupleLit is Expr
619
619
end
620
620
621
621
class TableEntry
622
- fun new (key, val)
622
+ construct (key, val)
623
623
this.key, this.val = key, val
624
624
end
625
625
end
626
626
627
627
class TableLit is Expr
628
- fun new (leftBracket, entries, rightBracket)
628
+ construct (leftBracket, entries, rightBracket)
629
629
this.leftBracket = leftBracket
630
630
this.entries = entries
631
631
this.rightBracket = rightBracket
0 commit comments