Closed envp closed 4 years ago
Hello @envp .
I've found where the problem is. I'm not very familiar with Rust, so forgive me if I am not quite accurate.
The issue is with meta item. It seems that tree-sitter-rust follows the specification and requires right part to be literal . So expressions like from_str=parse_regex
breaks syntax parser.
If we replace e.g. parse_regex
by "parse_regex"
(string instead of what looks like variable/constant/property) everything will work as expected.
So highlighting is broken not by field attributes, but only after from_str=parse_regex
item and until next recovery poit that is }
.
Ah, I see. Thanks for the clarifying link. I haven't gone through it yet, but I'm commenting here so I don't miss the notification. Will get back to you on this.
Source of issue
VSCode extension
What was expected
Consistent syntax highlighting within structs that have field attributes, for the following code:
The code in question:
What was observed:
The attribute markers seem to trip up the highlighter, with it failing to highlight the field attributes after the 2nd item, here's some screenshots where I progressively delete the markers. The final one seems to "expected"
Original issue
Test 1: Delete the last decorator, the same issue moves 1 field up
Test 2: This seems to be working as expected.