public Expression Visit(ParserPair pair) { Expression left = pair.Left.Accept(this); Expression right = pair.Right.Accept(this); // this might cause problems later return(new PairExpression <Expression, Expression>(left, right)); }
public ParserType Visit(ParserPair pair) { var leftType = pair.Left.Accept(this); var rightType = pair.Right.Accept(this); ParserType prodType = new ParserProdType(leftType, rightType); pair.Type = prodType; return(prodType); }