public override SemanticCheckResult VisitBoolNot(ASTBoolNotNode BoolNode) { var exp = BoolNode.Expresion.Accept(this); BoolNode.SemanticCheckResult.Ensure(exp, exp.Type == CompilationUnit.TypeEnvironment.Bool, new Lazy <Error>(() => new Error("Expresion must be of tipe Bool", ErrorKind.TypeError, BoolNode.NotToken.Line, BoolNode.NotToken.Column))); BoolNode.SemanticCheckResult.EnsureReturnType(CompilationUnit.TypeEnvironment.Bool); return(BoolNode.SemanticCheckResult); }
public override ASTNode VisitBoolNot([NotNull] SuperCOOLParser.BoolNotContext context) { var result = new ASTBoolNotNode(); var expresion = (ASTExpressionNode)context.expression().Accept(this); AssignSymbolTable(expresion); result.Expresion = expresion; result.NotToken = context.NOT().Symbol; return(result); }
public ASTCILNode VisitBoolNot(ASTBoolNotNode BoolNot) { return(new ASTCILBoolNotNode((ASTCILExpressionNode)BoolNot.Expresion.Accept(this))); }
public virtual T VisitBoolNot(ASTBoolNotNode BoolNot) { BoolNot.Expresion.Accept(this); return(default(T)); }