diff options
-rw-r--r-- | compiler/semcall.nim | 3 | ||||
-rw-r--r-- | nimsuggest/tests/tcallstrlit_highlight.nim | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim index f9f547c47..be9d9ebde 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -474,7 +474,8 @@ proc updateDefaultParams(call: PNode) = proc getCallLineInfo(n: PNode): TLineInfo = case n.kind - of nkAccQuoted, nkBracketExpr, nkCall, nkCommand: getCallLineInfo(n.sons[0]) + of nkAccQuoted, nkBracketExpr, nkCall, nkCallStrLit, nkCommand: + getCallLineInfo(n.sons[0]) of nkDotExpr: getCallLineInfo(n.sons[1]) else: n.info diff --git a/nimsuggest/tests/tcallstrlit_highlight.nim b/nimsuggest/tests/tcallstrlit_highlight.nim new file mode 100644 index 000000000..6f5b0f792 --- /dev/null +++ b/nimsuggest/tests/tcallstrlit_highlight.nim @@ -0,0 +1,11 @@ +func foo(s: string) = discard + +foo"string"#[!]# + +discard """ +$nimsuggest --tester $file +>highlight $1 +highlight;;skFunc;;1;;5;;3 +highlight;;skType;;1;;12;;6 +highlight;;skFunc;;3;;0;;3 +""" |