Documentation
¶
Overview ¶
Package reference is the reference evaluator of the query grammar: it walks the parse tree with the ANTLR visitor, the way the evaluator worked before rules were compiled. It exists to check the compiled evaluator of package parser against: the differential tests and fuzz targets compare the result, the error and the debug error of both. Production does not evaluate with it.
The package keeps its own copies of the small helpers it needs (the type assertions, the string literal reader, the keys of the debug error), so that the oracle does not share code with the evaluator it checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
// Err is the error of the rule.
Err error
// DebugErr is the error that the rule recorded for debugging, with the values that it was evaluated on.
DebugErr error
// Match is the result of the rule: false when Err is set.
Match bool
}
Result is what Evaluate returns.