private Nodes.ParseTreeNode ParseParenExpression(IEnumerator<Token> tokenStream) { if (tokenStream.Current.TokenType == TokenType.LeftParenthesis) { var parenNode = new Nodes.ParenthesisNode(); parenNode.LeftParenthesis = tokenStream.Current; tokenStream.MoveNext(); parenNode.Contained = ParseBinaryExpression(tokenStream, 0); if (tokenStream.Current.TokenType != TokenType.RightParenthesis) { throw ThrowHelper(tokenStream); } parenNode.RightParenthesis = tokenStream.Current; tokenStream.MoveNext(); return parenNode; } else { return this.ParseVariable(tokenStream); } }
public override ConstraintViolation VisitParenthesisNode(ParenthesisNode parenNode) { return null; }
public abstract ConstraintViolation VisitParenthesisNode(ParenthesisNode parenNode);