Page MenuHomePhabricator

The parser should be more lenient
Closed, ResolvedPublic

Description

Currently, the parser is very context-sensitive. This means various errors will appear as parsing errors. For instance, a(1) results in

Syntax error detected: Unexpected "T_BRACE" at character 2.

even though it is intuitively "parsable", and could give a better error message, saying that the function a doesn't exist.

Therefore, the parser should be more lenient and defers various checks to later phases (at compile-time)

Event Timeline

Change 551966 had a related patch set uploaded (by Nullzero; owner: Nullzero):
[mediawiki/extensions/AbuseFilter@master] [DO NOT MERGE] Add a static analyzer for the filter language

https://gerrit.wikimedia.org/r/551966

Change 551966 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Add a static analyzer for the filter language

https://gerrit.wikimedia.org/r/551966