private void WaddlePrintStmt(PrintStmtSyntax printStmt) { foreach (var printStmtArgument in printStmt.Arguments) { var exprType = WaddleExpression(printStmtArgument); if (exprType == TypeSymbol.Void) { throw new SemanticErrorException("Can not print void-value."); } } }
public bool EnterPrintStmt(PrintStmtSyntax syntax, WaddleContext ctx) { foreach (var printStmtArgument in syntax.Arguments) { var exprType = printStmtArgument.Accept(TypeVisitor); if (exprType == TypeSymbol.Void) { throw new SemanticErrorException("Can not print void-value."); } } return(true); }
public virtual TResult Visit(PrintStmtSyntax syntax) { return(DefaultResult); }
public void LeavePrintStmt(PrintStmtSyntax syntax, WaddleContext ctx) { }