summary refs log tree commit diff stats
path: root/compiler/nimfix
diff options
context:
space:
mode:
authoralaviss <alaviss@users.noreply.github.com>2019-01-23 22:35:34 +0700
committerAndreas Rumpf <rumpf_a@web.de>2019-01-23 16:35:34 +0100
commit35d96d8749809863bbbb6ead1e8cf887a95a94e5 (patch)
tree922c9ddb1310ecb4f67006200c353505e9b17012 /compiler/nimfix
parentbad5ad6dc764e2b1505d27a61b949079040a5f3c (diff)
downloadNim-35d96d8749809863bbbb6ead1e8cf887a95a94e5.tar.gz
compiler/sem*: better lineinfo for templates (#10428)
* compiler/sem*: better lineinfo for templates

Lineinfo for templates is inconsistant across the compiler, for example:

    doAssert true
    ^        ^

    a[int](10)
    ^^    ^

The `^` marks where the compiler thinks the template starts.

For qualified call, we got the same situation with `proc`s before #10427:

    system.once
          ^

Generics lineinfo within template declaration is also incorrect, for
example, this is where the compiler believes the `T` in `[T]` is:

    template a[T](b: T)
                  ^

This PR addresses all of these problems.

* nimsuggest: add tests for template highlighting
Diffstat (limited to 'compiler/nimfix')
0 files changed, 0 insertions, 0 deletions
102'>102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164