summary refs log tree commit diff stats
path: root/nimsuggest
diff options
context:
space:
mode:
authoralaviss <alaviss@users.noreply.github.com>2019-01-24 18:22:19 +0700
committerAndreas Rumpf <rumpf_a@web.de>2019-01-24 12:22:19 +0100
commitd72921ecf6b3c62fdc0be2c179752ee08b4169b8 (patch)
treefd6aae6121a4323e855dfabbd93a394bb2306d4a /nimsuggest
parent6555d89c2c7f403a45800903457ee62a62ff327a (diff)
downloadNim-d72921ecf6b3c62fdc0be2c179752ee08b4169b8.tar.gz
compiler/sem: correct macros lineinfo (#10438)
The compiler believes these are where a macro call starts (marked with
`^`):

    m "string"
    ^ ^

This commit addresses that.
Diffstat (limited to 'nimsuggest')
-rw-r--r--nimsuggest/tests/tmacro_highlight.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/nimsuggest/tests/tmacro_highlight.nim b/nimsuggest/tests/tmacro_highlight.nim
new file mode 100644
index 000000000..6f5b5e8a7
--- /dev/null
+++ b/nimsuggest/tests/tmacro_highlight.nim
@@ -0,0 +1,13 @@
+macro a(b: string): untyped = discard
+
+a "string"#[!]#
+
+discard """
+$nimsuggest --tester $file
+>highlight $1
+highlight;;skMacro;;1;;6;;1
+highlight;;skType;;1;;11;;6
+highlight;;skType;;1;;20;;7
+highlight;;skMacro;;3;;0;;1
+highlight;;skMacro;;3;;0;;1
+"""