parent
826ad2f36f
commit
cce1b24b1c
3 changed files with 19 additions and 16 deletions
|
|
@ -1054,6 +1054,14 @@ const
|
|||
defaultAlignment = -1
|
||||
defaultOffset = -1
|
||||
|
||||
proc getPIdent*(a: PNode): PIdent {.inline.} =
|
||||
## Returns underlying `PIdent` for `{nkSym, nkIdent}`, or `nil`.
|
||||
# xxx consider whether also returning the 1st ident for {nkOpenSymChoice, nkClosedSymChoice}
|
||||
# which may simplify code.
|
||||
case a.kind
|
||||
of nkSym: a.sym.name
|
||||
of nkIdent: a.ident
|
||||
else: nil
|
||||
|
||||
proc getnimblePkg*(a: PSym): PSym =
|
||||
result = a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue