Refine highlighting of '@'
- Do not highlight '@' as separate token. - Highlight '@' the same way as element where it's located: annotation, label or modifier. - Extend text range when positioning unresolved reference in annotation with '@'. Note that currently '@' is collapsed with modifiers tokens
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
fun <info descr="null">bar</info>(<info descr="null">block</info>: () -> <info descr="null">Int</info>) = <info descr="null"><info descr="null">block</info></info>()
|
||||
|
||||
fun <info descr="null">foo</info>(): <info descr="null">Int</info> {
|
||||
<info descr="null"><info descr="null">bar</info></info> <info descr="null" textAttributesKey="KOTLIN_LABEL">label@</info> {
|
||||
return<info descr="null" textAttributesKey="KOTLIN_LABEL">@label</info> 2
|
||||
}
|
||||
|
||||
<info descr="null" textAttributesKey="KOTLIN_LABEL">loop@</info> for (<info descr="null">i</info> in 1..100) {
|
||||
break<info descr="null" textAttributesKey="KOTLIN_LABEL">@loop</info>
|
||||
}
|
||||
|
||||
<info descr="null" textAttributesKey="KOTLIN_LABEL">loop2@</info> for (<info descr="null">i</info> in 1..100) {
|
||||
break<error descr="There should be no space or comments before '@' in label reference"> </error><info descr="null" textAttributesKey="KOTLIN_LABEL">@loop2</info>
|
||||
}
|
||||
|
||||
return 1
|
||||
}
|
||||
Reference in New Issue
Block a user