public virtual T VisitBlock(ASTBlockNode Block) { foreach (var item in Block.Expresions) { item.Accept(this); } return(default(T)); }
public override SemanticCheckResult VisitBlock(ASTBlockNode Block) { foreach (var item in Block.Expresions) { var sem = item.Accept(this); Block.SemanticCheckResult.Ensure(sem); Block.SemanticCheckResult.EnsureReturnType(sem.Type); } return(Block.SemanticCheckResult); }
public override ASTNode VisitBlock([NotNull] SuperCOOLParser.BlockContext context) { var result = new ASTBlockNode(); var exps = context.expression(); ASTExpressionNode[] exp = new ASTExpressionNode[exps.Length]; for (int i = 0; i < exps.Length; i++) { exp[i] = (ASTExpressionNode)exps[i].Accept(this); AssignSymbolTable(exp[i]); } result.Expresions = exp; return(result); }
public ASTCILNode VisitBlock(ASTBlockNode Block) { return(new ASTCILBlockNode(Block.Expresions.Select(x => (ASTCILExpressionNode)x.Accept(this)))); }