Re: [PATCH v10 0/3] MR10897: vbscript: Handle declaration scope in the parser.
On Sun May 31 08:55:09 2026 +0000, Jacek Caban wrote:
It's still adding checks that could be handled by grammar rules instead. For example, a simple change like: ``` - | SourceElements StatementNl { source_add_statement(ctx, $2); } + | SourceElements Statement StSep { source_add_statement(ctx, $2); } ``` is enough to allow parsing the problematic script. A precise error reporting could be probably done by changing other rules too. Limited this to Class. Sub/Function follow the same global-only rule, but a global If/Select hoists them while a loop or procedure body does not - that context-sensitivity needs a much larger grammar change, so I left it out and added todo_wine tests for those cases for a follow-up.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10897#note_141791
participants (1)
-
Francis De Brabandere (@francisdb)