Skip to content

[Bug]: Invalid regex in Ada TextMate grammar #1229

@slevithan

Description

@slevithan

Environment

  • OS and Version: N/A
  • IDE Version: N/A
  • Ada & SPARK Extension Version: Latest

Bug Summary and Reproducer

Bug Summary:

This line is an invalid regex pattern ("(?=(;|\\))"), since it contains an unclosed group. It should include a third ) at the end, since the second-last closing paren is escaped and matches a literal ).

(Note that the correctly-closed version of this pattern ("(?=(;|\\)))") appears four other times in the same file. It is only this one instance that is missing the final closing paren.)

The result of this bug is that the pattern is an invalid Oniguruma regex, and it fails silently in vscode-textmate. It also causes the Ada grammar to error when using Shiki's JavaScript engine, since by default its JS engine doesn't silence regex errors.

Configuration and Logs

N/A

Other VS Code Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions