Example #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 + ")"
}
Example #2
0
func (v *FloatingLiteral) String() string {
	return fmt.Sprintf("("+util.Blue("FloatingLiteral")+": "+util.Yellow("%f")+" "+util.Green(v.GetType().TypeName())+")", v.Value)
}
Example #3
0
func (v *IntegerLiteral) String() string {
	return fmt.Sprintf("("+util.Blue("IntegerLiteral")+": "+util.Yellow("%d")+" "+util.Green(v.GetType().TypeName())+")", v.Value)
}