Ejemplo n.º 1
0
func (v *BoolLiteral) String() string {
	res := "(" + util.Blue("BoolLiteral") + ": "
	if v.Value {
		res += util.Yellow("true")
	} else {
		res += util.Yellow("false")
	}
	return res + ")"
}
Ejemplo n.º 2
0
func (v *FloatingLiteral) String() string {
	return fmt.Sprintf("("+util.Blue("FloatingLiteral")+": "+util.Yellow("%f")+" "+util.Green(v.GetType().TypeName())+")", v.Value)
}
Ejemplo n.º 3
0
func (v *IntegerLiteral) String() string {
	return fmt.Sprintf("("+util.Blue("IntegerLiteral")+": "+util.Yellow("%d")+" "+util.Green(v.GetType().TypeName())+")", v.Value)
}