compiler/sem: correct macros lineinfo (#10438)

The compiler believes these are where a macro call starts (marked with
`^`):

    m "string"
    ^ ^

This commit addresses that.
This commit is contained in:
alaviss 2019-01-24 18:22:19 +07:00 • committed by Andreas Rumpf
commit d72921ecf6
2 changed files with 18 additions and 4 deletions

View file

@ -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
"""