IC: first steps towards 'nim check --def --ic:on' (#17714)
* IC: first steps towards 'nim check --def --ic:on' * IC navigator: deduplicate output lines * IC navigator: progress * IC navigator: use a different nimcache entry * IC navigator: special logic for templates/macros * IC navigator: proper error messages * IC navigator: prepare for testing code; document only what currently works somewhat
This commit is contained in:
parent
3b47a689cf
commit
67e28c07f9
11 changed files with 211 additions and 12 deletions
|
|
@ -570,3 +570,13 @@ proc sealRodFile*(c: PContext) =
|
|||
if m == c.module:
|
||||
addPragmaComputation(c, n)
|
||||
c.idgen.sealed = true # no further additions are allowed
|
||||
|
||||
proc rememberExpansion*(c: PContext; info: TLineInfo; expandedSym: PSym) =
|
||||
## Templates and macros are very special in Nim; these have
|
||||
## inlining semantics so after semantic checking they leave no trace
|
||||
## in the sem'checked AST. This is very bad for IDE-like tooling
|
||||
## ("find all usages of this template" would not work). We need special
|
||||
## logic to remember macro/template expansions. This is done here and
|
||||
## delegated to the "rod" file mechanism.
|
||||
if c.config.symbolFiles != disabledSf:
|
||||
storeExpansion(c.encoder, c.packedRepr, info, expandedSym)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue