antlr / antlr/jetbrains-plugin-sample

No string highlighting with \n

Open
#16 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
120
Forks
35
PR merge metrics
No merged PRs in 30d

Description

I have this code:
```
func f() {
var s = "abc \n"
}
```
The problem is that `"abc \n"` is black (should be green because it is string). Problem appears if I use special symbols like `\n`.
When I set cursor before this string and then type backspace and space string is highlighted correctly.
However the parsing seems to be correctly in both cases.
Any ideas why this may happen?

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no source files, tests, or entry points. Reproduce the highlighting problem in the sample JetBrains plugin with a string containing \n, then trace the syntax-highlighting path and compare it with the correctly parsed string; done means the string is highlighted consistently without requiring an edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.