tango-py/tango/value.py

20 lines
399 B
Python
Raw Permalink Normal View History

2019-03-14 06:10:46 +00:00
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__()