Lightweight test capability should look for `syntax_error`
The rpl that defines rpl includes a definition for syntax_error
. A match can succeed and have within the returned data structure a syntax_error
node.
I expect this to be a common idiom among Rosie users (to define some kind of error pattern).
Wrt running tests: when a match succeeds, but the match contains an error node, this is a 3rd kind of result. I.e. we could have "match failed", "match succeeded with no error nodes", and "match succeeded with one or more error nodes in the output".
Design questions:
- Which error nodes should the test system look for? Just
syntax_error
? (Leaning to YES.) - Should the names of error nodes be configurable? If so, then how? (Prob should defer this.)
- Should a new verb be introduced for the detection of
syntax_error
? (Leaning to YES and perhaps it should be 'errors' or 'errors_on', as intest language_decl errors_on "rpl 1.a"
.