dburkart / check-sieve

Syntax checker for mail sieves.
MIT License
34 stars 7 forks source link

Can't distinguish between single-item test-list and single test #48

Closed dburkart closed 2 years ago

dburkart commented 2 years ago

While investigating Issue #47, I found this small sieve script which validates, but really shouldn't:

if not (address :is "Foo") {
    discard;
}

The problem is that there is no ASTNode to indicate the existence of a test-list; it is simply implied by sibling tests in the syntax tree. So a single-item list validates fine, because all the verifier sees is a single test.