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

Zig syntax highlighting for operators breaks after strings #2463

Closed
Andriamanitra opened this issue Jun 18, 2022 · 1 comment
Closed

Zig syntax highlighting for operators breaks after strings #2463

Andriamanitra opened this issue Jun 18, 2022 · 1 comment

Comments

@Andriamanitra
Copy link
Contributor

To reproduce open a file z.zig and paste this code in:

const std = @import("std");

pub fn main() void {
    var num: i32 = 42 + 24; // this + gets colored as it should
    std.debug.print("num = {d}\n", .{num + 3}); // this + doesn't
}

This is another issue caused by the weird behavior of highlighter when there are ^ or $ characters inside regular expressions (here it is used inside a character group so it should mean literal ^, but highlighter still tries to find a beginning of a line):

- symbol.operator: "[-!|=;%.+^*:&?<>~]"

Commit hash: 03ae049

@Andriamanitra
Copy link
Contributor Author

Unsure when this was fixed but it works correctly now in the latest version (2.0.13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant