diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-07-29 17:35:51 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-07-29 23:51:01 +0200 |
commit | 60b187513ed8e2a061816a912e372a1c81794d50 (patch) | |
tree | 9ee88f0234c633d232b55fc9bbe2cca38b2b0866 /compiler/semgnrc.nim | |
parent | 9ee5b5eabca9455f0c31a89c865013afa5a2c39e (diff) | |
download | Nim-60b187513ed8e2a061816a912e372a1c81794d50.tar.gz |
stdlib and compiler don't use .immediate anymore
Diffstat (limited to 'compiler/semgnrc.nim')
-rw-r--r-- | compiler/semgnrc.nim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim index b78679411..0fd2e546e 100644 --- a/compiler/semgnrc.nim +++ b/compiler/semgnrc.nim @@ -48,7 +48,10 @@ proc semGenericStmtScope(c: PContext, n: PNode, closeScope(c) template macroToExpand(s: expr): expr = - s.kind in {skMacro, skTemplate} and (s.typ.len == 1 or sfImmediate in s.flags) + s.kind in {skMacro, skTemplate} and (s.typ.len == 1 or sfAllUntyped in s.flags) + +template macroToExpandSym(s: expr): expr = + s.kind in {skMacro, skTemplate} and (s.typ.len == 1) proc semGenericStmtSymbol(c: PContext, n: PNode, s: PSym, ctx: var GenericCtx): PNode = @@ -61,14 +64,14 @@ proc semGenericStmtSymbol(c: PContext, n: PNode, s: PSym, of skProc, skMethod, skIterator, skConverter, skModule: result = symChoice(c, n, s, scOpen) of skTemplate: - if macroToExpand(s): + if macroToExpandSym(s): styleCheckUse(n.info, s) result = semTemplateExpr(c, n, s, {efNoSemCheck}) result = semGenericStmt(c, result, {}, ctx) else: result = symChoice(c, n, s, scOpen) of skMacro: - if macroToExpand(s): + if macroToExpandSym(s): styleCheckUse(n.info, s) result = semMacroExpr(c, n, n, s, {efNoSemCheck}) result = semGenericStmt(c, result, {}, ctx) |