Parsing trees can get quite large, even with simple
subexpressions. It might be nice to be able to test
just the first few levels of a tree and ignore the rest.
So, for example, I might have
"(DEFINITION(\\foo)(LAMBDA(PARAMS(\\bar))(WS_LEXPR(foobar)(
( )))))"
as a preorder traversal. But the assertPreorder()
allows me to use
"(DEFINITION(\\foo)(LAMBDA...))"
instead to ensure the first two levels of the tree.
With this approach, each subtree could be tested to
different levels. I don't know what the rules would be
for specifying a preorder traversal with ignored
subtrees, but perhaps the example above is a good
starting point.