implement visitors for null atom

This commit is contained in:
2020-02-14 14:11:26 +01:00
parent 2f425944e5
commit 80deae6971
6 changed files with 33 additions and 0 deletions

View File

@@ -668,6 +668,15 @@ public class ContextAnalysis extends KlangBaseVisitor<Node> {
return n;
}
@Override
public Node visitNullAtom(KlangParser.NullAtomContext ctx) {
Node n = new NullExpression();
n.type = Type.getNullType();
n.line = ctx.start.getLine();
n.col = ctx.start.getCharPositionInLine();
return n;
}
@Override
public Node visitFunctionDef(KlangParser.FunctionDefContext ctx) {
String name = ctx.funcName.getText();