def __repr__(self): ast_f = fmt.TextOutput(util.Buffer()) # No color by default. #ast_f = fmt.AnsiOutput(io.StringIO()) tree = fmt.MakeTree(self) fmt.PrintTree(tree, ast_f) s, _ = ast_f.GetRaw() return s
def __repr__(self): # TODO: Break this circular dependency. from asdl import format as fmt ast_f = fmt.TextOutput(util.Buffer()) # No color by default. tree = fmt.MakeTree(self) fmt.PrintTree(tree, ast_f) s, _ = ast_f.GetRaw() return s
def NewTempBuffer(self): return TextOutput(util.Buffer())
def NewTempBuffer(self): return AnsiOutput(util.Buffer())
def NewTempBuffer(self): return HtmlOutput(util.Buffer())