parent
eec239e851
commit
584d778318
2 changed files with 11 additions and 2 deletions
|
|
@ -54,7 +54,8 @@ template macroToExpand(s): untyped =
|
||||||
s.kind in {skMacro, skTemplate} and (s.typ.len == 1 or sfAllUntyped in s.flags)
|
s.kind in {skMacro, skTemplate} and (s.typ.len == 1 or sfAllUntyped in s.flags)
|
||||||
|
|
||||||
template macroToExpandSym(s): untyped =
|
template macroToExpandSym(s): untyped =
|
||||||
s.kind in {skMacro, skTemplate} and (s.typ.len == 1) and not fromDotExpr
|
sfCustomPragma notin s.flags and s.kind in {skMacro, skTemplate} and
|
||||||
|
(s.typ.len == 1) and not fromDotExpr
|
||||||
|
|
||||||
template isMixedIn(sym): bool =
|
template isMixedIn(sym): bool =
|
||||||
let s = sym
|
let s = sym
|
||||||
|
|
|
||||||
|
|
@ -138,3 +138,11 @@ block:
|
||||||
assert hasIntSerKey
|
assert hasIntSerKey
|
||||||
assert strSerKey == "string"
|
assert strSerKey == "string"
|
||||||
assert nestedItemDefVal == "Nimmers of the world, unite!"
|
assert nestedItemDefVal == "Nimmers of the world, unite!"
|
||||||
|
|
||||||
|
block:
|
||||||
|
template simpleAttr {.pragma.}
|
||||||
|
|
||||||
|
type Annotated {.simpleAttr.} = object
|
||||||
|
|
||||||
|
proc generic_proc[T]() =
|
||||||
|
assert Annotated.hasCustomPragma(simpleAttr)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue