[minor]use addInt and addFloat (#18733)

* unify int and uint

* back

* minor
This commit is contained in:
flywind 2021-08-24 23:16:12 +08:00 • committed by GitHub
commit 3d1bba04ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,10 +94,10 @@ proc toString*(tree: PackedTree; n: NodePos; m: PackedModule; nesting: int;
result.addInt m.numbers[LitId tree.nodes[pos].operand] result.addInt m.numbers[LitId tree.nodes[pos].operand]
of externUIntLit: of externUIntLit:
result.add " " result.add " "
result.add $cast[uint64](m.numbers[LitId tree.nodes[pos].operand]) result.addInt cast[uint64](m.numbers[LitId tree.nodes[pos].operand])
of nkFloatLit..nkFloat128Lit: of nkFloatLit..nkFloat128Lit:
result.add " " result.add " "
result.add $cast[BiggestFloat](m.numbers[LitId tree.nodes[pos].operand]) result.addFloat cast[BiggestFloat](m.numbers[LitId tree.nodes[pos].operand])
else: else:
result.add "(\n" result.add "(\n"
for i in 1..(nesting+1)*2: result.add ' ' for i in 1..(nesting+1)*2: result.add ' '