Skip to content

AngelScript preprocessor: Import/export statements forbid trailing characters #15

@DaloLorn

Description

@DaloLorn

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:

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

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions