tango-py/tango/value.py

20 lines
399 B
Python

class TangoExpr(list):
@property
def is_unit(self):
return len(self) == 0
@property
def is_block(self):
return len(self) > 0 and isinstance(self[0], TangoExpr)
@property
def is_call(self):
return len(self) > 0 and isinstance(self[0], TangoIdent)
class TangoIdent(str):
def __repr__(self):
return super().__str__()