public override ASTN VisitProperty([NotNull] PropertyContext context) { PropertyNode node = new PropertyNode(context) { formal = VisitFormal(context.formal()) as FormalNode }; if (context.expr() != null) { node.expr_body = VisitExpr(context.expr()) as ExprNode; } else if (node.formal.type.Text == "Int") { node.expr_body = new IntNode(context, "0"); } else if (node.formal.type.Text == "String") { node.expr_body = new StringNode(context, ""); } else if (node.formal.type.Text == "Bool") { node.expr_body = new BoolNode(context, "false"); } else { node.expr_body = new VoidNode(context); (node.expr_body as VoidNode).getStaticType = node.formal.type.Text; } return(node); }