-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In manager.cpp, the regexes pre_import_all, pre_import_from, and pre_export do not accept trailing characters after the semicolon, potentially leading to confusing errors if a scripter accidentally leaves whitespace (or deliberately leaves comments) on the same line as an import/export statement.
There is no backwards-compatible fix. However, the current preprocessor implementation offers no useful feedback when this error occurs, and could unnecessarily confuse modders.
Proposed solution:
- Extend the regexes (or whatever ends up replacing them as part of AngelScript compiler: Update to latest version, add support for OpenSR-only scripts. #10) to tolerate trailing characters (or at least whitespace). They won't be included in the compiled script anyway.
- When trailing characters are detected, log a warning to let the modder know this will break compatibility with the legacy preprocessor.
An alternative solution, if it proves easier to implement:
- Throw a more appropriate error when trailing characters are detected on an import/export statement.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working