'addSon' for types deprecated for 'int literal type' analysis
This commit is contained in:
parent
795afb0021
commit
121d4e0fc2
13 changed files with 49 additions and 33 deletions
|
|
@ -92,6 +92,16 @@ proc getIntLitType*(literal: PNode): PType =
|
|||
result = copyType(ti, ti.owner, false)
|
||||
result.n = literal
|
||||
|
||||
proc skipIntLit*(t: PType): PType {.inline.} =
|
||||
if t.kind == tyInt and t.n != nil:
|
||||
result = getSysType(tyInt)
|
||||
else:
|
||||
result = t
|
||||
|
||||
proc AddSonSkipIntLit*(father, son: PType) =
|
||||
if isNil(father.sons): father.sons = @[]
|
||||
add(father.sons, son.skipIntLit)
|
||||
|
||||
proc setIntLitType*(result: PNode) =
|
||||
let i = result.intVal
|
||||
case platform.IntSize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue