Example #1
0
 def __str__(self):
     return color.print('func<'+self.return_type+" "+self.name, "red") + \
            color.print("(" + \
                        ",".join([str(a) for a in self.params]) + ")",
                        "purple") + \
            color.print('>', 'red') + "\n" + super().__str__()
Example #2
0
 def __str__(self):
     return color.print('expr<', 'green')+ \
            ''.join([str(t) for t in self.tokens])+ \
            color.print('>', 'green')
Example #3
0
 def __str__(self):
     return self.str_label()+\
            color.print('call<', 'red')+str(self.binding)+ \
            color.print('('+','.join([str(p) for p in self.params])+')',
                        'purple')+ \
            color.print('>', 'red')
Example #4
0
 def __str__(self):
     return color.print('binding<', 'yellow')+ \
            ''.join([str(t) for t in self.tokens])+ \
            color.print('>', 'yellow')