@ -319,7 +319,14 @@ func (n *numberNode) pretty(w io.Writer, prefix string) error {
if err != nil {
return err
}
fmt.Fprintf(w, "%snumber:\n%s%s%v\n", prefix, prefix, indent, v)
switch n.t {
case num_int:
fmt.Fprintf(w, "%sint:\n%s%s%v\n", prefix, prefix, indent, v)
case num_float:
fmt.Fprintf(w, "%sfloat:\n%s%s%v\n", prefix, prefix, indent, v)
case num_complex:
fmt.Fprintf(w, "%scomplex:\n%s%s%v\n", prefix, prefix, indent, v)
return nil
@ -9,65 +9,65 @@ root:
name:
an_int
value:
number:
int:
1
assign:
another_int
9
moar_int
-12
a_float
float:
another_float
-0.9
extra_floaty
1.2
complex1
complex:
(1+1i)
complex2
(1+0i)
complex3
(1.3+4.7i)
complex4
(-4.2+8.9i)
complex5
(4.2-8.9i)
@ -4,9 +4,9 @@ root:
items
list:
2
3
@ -3,31 +3,31 @@ root:
root_int
root_float
root_exp
1e+09
root_hex
703710
root_oct
511
@ -48,18 +48,18 @@ root:
string:
three
item_two:
item_one:
item_three: