Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust] Highlighting with multiple union on a line #3821

Closed
dementive opened this issue Aug 9, 2023 · 0 comments · Fixed by #3822
Closed

[Rust] Highlighting with multiple union on a line #3821

dementive opened this issue Aug 9, 2023 · 0 comments · Fixed by #3822
Assignees
Labels
T: bug A bug in an existing language feature

Comments

@dementive
Copy link

dementive commented Aug 9, 2023

What happened?

The rust syntax has some bugs when using multiple union() functions in one line. This entirely breaks highlighting for the rest of the file. As a temporary fix I've added this line to the end of the "union-body" section in the Rust syntax so my files don't look so bad, there is definitely a better way but this works for me for now.

- match: '\)'
    pop: true

Here is the rust code causing the issue, the lines after the union() functions do not get highlighted correctly in sublime.

    (Scopes::Character.union(Scopes::Unit).union(Scopes::Legion), "add_legion_history", Unchecked), // -tdb-
    (Scopes::Character.union(Scopes::Unit), "add_to_legion", Scope(Scopes::Legion)),
    (Scopes::Character, "disband_legion", Boolean),
    (Scopes::Character, "add_charisma", Integer),
    (Scopes::Character, "add_finesse", Integer),
    (Scopes::Character, "add_martial", Integer),
@dementive dementive changed the title Rust Syntax highlighing issue and fix Rust Syntax highlighting issue and fix Aug 9, 2023
@michaelblyons michaelblyons changed the title Rust Syntax highlighting issue and fix [Rust] Highlighting with multiple union on a line Aug 9, 2023
@keith-hall keith-hall added the T: bug A bug in an existing language feature label Aug 9, 2023
@keith-hall keith-hall self-assigned this Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug A bug in an existing language feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants