public override ConstraintViolation VisitVariableNode(VariableNode varNode) { var value = varNode.Variable.Value; if (!this.variables.Any(v => this.comparison.Equals(value, v))) { return new ConstraintViolation(varNode, "The variable name '" + value + "' is not allowed."); } return null; }
public override ConstraintViolation VisitVariableNode(VariableNode varNode) { return null; }
private Nodes.ParseTreeNode ParseVariable(IEnumerator<Token> tokenStream) { if (tokenStream.Current.TokenType == TokenType.Variable) { var varNode = new Nodes.VariableNode { Variable = tokenStream.Current }; tokenStream.MoveNext(); return varNode; } else { throw ThrowHelper(tokenStream); } }
public abstract ConstraintViolation VisitVariableNode(VariableNode varNode);