compiler almost free of deprecated expr/stmt names
This commit is contained in:
parent
8876ed23f1
commit
39ebe2175b
22 changed files with 55 additions and 55 deletions
|
|
@ -990,12 +990,12 @@ proc add*(father, son: PNode) =
|
|||
proc `[]`*(n: PNode, i: int): PNode {.inline.} =
|
||||
result = n.sons[i]
|
||||
|
||||
template `-|`*(b, s: expr): expr =
|
||||
template `-|`*(b, s: untyped): untyped =
|
||||
(if b >= 0: b else: s.len + b)
|
||||
|
||||
# son access operators with support for negative indices
|
||||
template `{}`*(n: PNode, i: int): expr = n[i -| n]
|
||||
template `{}=`*(n: PNode, i: int, s: PNode): stmt =
|
||||
template `{}`*(n: PNode, i: int): untyped = n[i -| n]
|
||||
template `{}=`*(n: PNode, i: int, s: PNode) =
|
||||
n.sons[i -| n] = s
|
||||
|
||||
when defined(useNodeIds):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue