import foo {.all.} reboot (#17706)

This commit is contained in:
Timothee Cour 2021-04-16 00:16:39 -07:00 • committed by GitHub
commit 8161b02897
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 584 additions and 76 deletions

View file

@ -361,12 +361,12 @@ proc addPattern*(c: PContext, p: LazySym) =
addTrmacro(c.encoder, c.packedRepr, p.sym)
proc exportSym*(c: PContext; s: PSym) =
strTableAdd(c.module.semtab(c.graph), s)
strTableAdds(c.graph, c.module, s)
if c.config.symbolFiles != disabledSf:
addExported(c.encoder, c.packedRepr, s)
proc reexportSym*(c: PContext; s: PSym) =
strTableAdd(c.module.semtab(c.graph), s)
strTableAdds(c.graph, c.module, s)
if c.config.symbolFiles != disabledSf:
addReexport(c.encoder, c.packedRepr, s)
@ -536,6 +536,10 @@ proc checkMinSonsLen*(n: PNode, length: int; conf: ConfigRef) =
proc isTopLevel*(c: PContext): bool {.inline.} =
result = c.currentScope.depthLevel <= 2
proc isTopLevelInsideDeclaration*(c: PContext, sym: PSym): bool {.inline.} =
# for routeKinds the scope isn't closed yet:
c.currentScope.depthLevel <= 2 + ord(sym.kind in routineKinds)
proc pushCaseContext*(c: PContext, caseNode: PNode) =
c.p.caseContext.add((caseNode, 0))