cashc 0.7.3 → 0.7.5
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.
- package/dist/main/ast/AST.d.ts +2 -2
- package/dist/main/ast/AstBuilder.js +2 -3
- package/dist/main/grammar/CashScriptParser.d.ts +2 -1
- package/dist/main/grammar/CashScriptParser.js +296 -284
- package/dist/main/index.d.ts +1 -1
- package/dist/main/index.js +1 -1
- package/dist/main/semantic/SymbolTableTraversal.js +9 -6
- package/dist/main/semantic/TypeCheckTraversal.js +1 -1
- package/dist/module/ast/AST.d.ts +2 -2
- package/dist/module/ast/AstBuilder.js +2 -3
- package/dist/module/grammar/CashScriptParser.d.ts +2 -1
- package/dist/module/grammar/CashScriptParser.js +296 -284
- package/dist/module/index.d.ts +1 -1
- package/dist/module/index.js +1 -1
- package/dist/module/semantic/SymbolTableTraversal.js +9 -6
- package/dist/module/semantic/TypeCheckTraversal.js +1 -1
- package/package.json +4 -3
package/dist/main/ast/AST.d.ts
CHANGED
|
@@ -47,10 +47,10 @@ export declare abstract class StatementNode extends Node {
|
|
|
47
47
|
}
|
|
48
48
|
export declare class VariableDefinitionNode extends StatementNode implements Named, Typed {
|
|
49
49
|
type: Type;
|
|
50
|
-
modifier: string;
|
|
50
|
+
modifier: string[];
|
|
51
51
|
name: string;
|
|
52
52
|
expression: ExpressionNode;
|
|
53
|
-
constructor(type: Type, modifier: string, name: string, expression: ExpressionNode);
|
|
53
|
+
constructor(type: Type, modifier: string[], name: string, expression: ExpressionNode);
|
|
54
54
|
accept<T>(visitor: AstVisitor<T>): T;
|
|
55
55
|
}
|
|
56
56
|
export declare class TupleAssignmentNode extends StatementNode {
|
|
@@ -73,12 +73,11 @@ class AstBuilder extends AbstractParseTreeVisitor_js_1.AbstractParseTreeVisitor
|
|
|
73
73
|
return parameter;
|
|
74
74
|
}
|
|
75
75
|
visitVariableDefinition(ctx) {
|
|
76
|
-
var _a, _b;
|
|
77
76
|
const type = (0, utils_1.parseType)(ctx.typeName().text);
|
|
78
|
-
const
|
|
77
|
+
const modifiers = ctx.modifier().map((modifier) => modifier.text);
|
|
79
78
|
const name = ctx.Identifier().text;
|
|
80
79
|
const expression = this.visit(ctx.expression());
|
|
81
|
-
const variableDefinition = new AST_js_1.VariableDefinitionNode(type,
|
|
80
|
+
const variableDefinition = new AST_js_1.VariableDefinitionNode(type, modifiers, name, expression);
|
|
82
81
|
variableDefinition.location = Location_js_1.Location.fromCtx(ctx);
|
|
83
82
|
return variableDefinition;
|
|
84
83
|
}
|
|
@@ -263,7 +263,8 @@ export declare class VariableDefinitionContext extends ParserRuleContext {
|
|
|
263
263
|
typeName(): TypeNameContext;
|
|
264
264
|
Identifier(): TerminalNode;
|
|
265
265
|
expression(): ExpressionContext;
|
|
266
|
-
modifier(): ModifierContext
|
|
266
|
+
modifier(): ModifierContext[];
|
|
267
|
+
modifier(i: number): ModifierContext;
|
|
267
268
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
268
269
|
get ruleIndex(): number;
|
|
269
270
|
enterRule(listener: CashScriptListener): void;
|