| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
* fixes #12125
|
|
|
|
|
| |
* allow void macro result
* add test for void macro result type
|
|
|
|
|
| |
* move assertions and iterators out of system.nim
* limit nimsuggest tests to the first 3 suggestions
|
|
|
|
| |
This makes signatures generated for nimsuggest correctly distinguish
template/macro/converter from proc.
|
|
|
|
|
|
|
|
|
|
| |
Previously the compiler would generate suggestions based on the symbol
identifier length, but that might not reflect the actual representation
of it within the actual source code.
This commit implements a simple source scanner for the suggest module to
address the problem outlined above.
Fixes nim-lang/nimsuggest#24
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The compiler believes these are where a macro call starts (marked with
`^`):
m "string"
^ ^
This commit addresses that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
The EPC backend of nimsuggest currently doesn't support nimsuggest
highlighter, see nim-lang/nim-mode#140
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the compiler will believe these are where `newSeq` symbol
starts:
newSeq[int]()
^
system.newSeq[int]()
^
This commit moves them back to:
newSeq[int]()
^
system.newSeq[int]()
^
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* compiler/parser: preserve lineinfo for accent quoted symbols
Previously the lineinfo for symbol $$$ in this example is:
proc `$$$`
^
After this commit:
proc `$$$`
^
* compiler/semstmts: correct lineinfo for accent quoted idents
Previously nimsuggest would highlight this as:
proc `$$$`
^~~
After this commit:
proc `$$$`
^~~
* nimsuggest/tests: add a test for accent quoted proc
Disabled by default
|
|
|
|
|
|
|
|
| |
* nimsuggest: prevent out-of-bound access
* fixes nim-lang/nimsuggest#76
* undo tester changes
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|