Skip to content

VS Code extension: block-closing > highlighted red (error-like), differs from opening < #33

Description

@assapir

Symptom

In the VS Code extension's syntax highlighting, the closing > of a < … > block renders in a different color from the opening < — specifically red, as if it were flagged as an error/invalid token.

Example

^ = () -> Num => <
  a = 5
  a
>          ~ this closing '>' shows red

Likely cause

The TextMate grammar (editors/vscode/syntaxes/quilon.tmLanguage.json) probably scopes the line-final block-closing > differently from the opening < — likely falling into an invalid/unmatched scope, or being treated as a stray comparison operator. Note the language's block-close rule is > at end-of-line (>\n); the grammar needs to scope that closing > consistently with the opening < (block punctuation), not as an operator/error.

Scope / priority

Low priority, deferred. Filed at the user's request while compiler token/overloading work is in progress — do NOT fix yet; finish the higher-priority language work first. Follow-on to the multi-char-operator grammar fix (#31).

Acceptance

  • Opening < and closing > of a block share the same (block-punctuation) scope/color.
  • The closing > is not rendered as an error/invalid.
  • Add a grammar tokenization test asserting the block-close > scope.

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