Skip to content

LuaParseException prints tokens in wrong case (ie 'Then' rather than 'then') #113

Closed

Description

Example:

if true print() end

Throws:

LuaParseException: chunk:(1,8): 'Then' expected

It should print 'then' instead.

It should suffice to call .ToLower() on the token when printing it even though 'greaterthanorequal' may be hard to read (if it ever gets printed), but it beats confusing the user by suggesting to add incorrect tokens and then bouncing the 'suggested' token with a "syntax error near 'Then'" .

Activity

  1. akeit0 commented on Oct 10, 2026

    @akeit0
    Collaborator

    Fixed by #351 (merged).

    Expected tokens now use Lua spelling/categories and include the offending token or EOF. Missing closers include opening-line context where appropriate; the execution compiler's reserved-token truncation is also fixed.

    Validation: 397 runtime tests and 24 source generator tests passed; four Release targets build without warnings/errors; PR CI passed. Execution-compiler benchmarks were within about -1% to +2% of main. Public AST parser optimizations are deferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions