A internal class that validates QilExpression graphs.
QilValidationVisitor traverses the QilExpression graph once to enforce the following constraints: No circular references No duplicate nodes (except for references) No out-of-scope references Type constraints on operands Type constraints on operators No null objects (except where allowed) No Unknown node types

When an error occurs, it marks the offending node with an annotation and continues checking, allowing the detection of multiple errors at once and printing the structure after validation. (In the case of circular references, it breaks the loop at the circular reference to allow the graph to print correctly.)

Inheritance: QilScopedVisitor
Exemplo n.º 1
0
 private void Check(bool value, QilNode node, string message)
 {
     if (!value)
     {
         QilValidationVisitor.SetError(node, message);
     }
 }