black/tests/data/miscellaneous/debug_visitor.out
2025-03-15 17:41:19 -07:00

925 lines
18 KiB
Plaintext

file_input
decorated
decorator
AT
'@'
NAME
'dataclass'
NEWLINE
'\n'
/decorator
classdef
NAME
'class'
NAME
' '
'DebugVisitor'
LPAR
'('
power
NAME
'Visitor'
trailer
LSQB
'['
NAME
'T'
RSQB
']'
/trailer
/power
RPAR
')'
COLON
':'
suite
NEWLINE
'\n'
INDENT
''
simple_stmt
expr_stmt
NAME
' '
'tree_depth'
annassign
COLON
':'
NAME
' '
'int'
EQUAL
' '
'='
NUMBER
' '
'0'
/annassign
/expr_stmt
NEWLINE
'\n'
/simple_stmt
funcdef
NAME
'\n '
'def'
NAME
' '
'visit_default'
parameters
LPAR
'('
typedargslist
NAME
'self'
COMMA
','
tname
NAME
' '
'node'
COLON
':'
NAME
' '
'LN'
/tname
/typedargslist
RPAR
')'
/parameters
RARROW
' '
'->'
power
NAME
' '
'Iterator'
trailer
LSQB
'['
NAME
'T'
RSQB
']'
/trailer
/power
COLON
':'
suite
NEWLINE
'\n'
INDENT
''
simple_stmt
expr_stmt
NAME
' '
'indent'
EQUAL
' '
'='
term
STRING
' '
"' '"
STAR
' '
'*'
atom
LPAR
' '
'('
term
NUMBER
'2'
STAR
' '
'*'
power
NAME
' '
'self'
trailer
DOT
'.'
NAME
'tree_depth'
/trailer
/power
/term
RPAR
')'
/atom
/term
/expr_stmt
NEWLINE
'\n'
/simple_stmt
if_stmt
NAME
' '
'if'
power
NAME
' '
'isinstance'
trailer
LPAR
'('
arglist
NAME
'node'
COMMA
','
NAME
' '
'Node'
/arglist
RPAR
')'
/trailer
/power
COLON
':'
suite
NEWLINE
'\n'
INDENT
''
simple_stmt
expr_stmt
NAME
' '
'_type'
EQUAL
' '
'='
power
NAME
' '
'type_repr'
trailer
LPAR
'('
power
NAME
'node'
trailer
DOT
'.'
NAME
'type'
/trailer
/power
RPAR
')'
/trailer
/power
/expr_stmt
NEWLINE
'\n'
/simple_stmt
simple_stmt
power
NAME
' '
'out'
trailer
LPAR
'('
arglist
fstring
FSTRING_START
"f'"
fstring_replacement_field
LBRACE
'{'
NAME
'indent'
RBRACE
'}'
/fstring_replacement_field
fstring_replacement_field
LBRACE
'{'
NAME
'_type'
RBRACE
'}'
/fstring_replacement_field
FSTRING_END
"'"
/fstring
COMMA
','
argument
NAME
' '
'fg'
EQUAL
'='
STRING
"'yellow'"
/argument
/arglist
RPAR
')'
/trailer
/power
NEWLINE
'\n'
/simple_stmt
simple_stmt
expr_stmt
power
NAME
' '
'self'
trailer
DOT
'.'
NAME
'tree_depth'
/trailer
/power
PLUSEQUAL
' '
'+='
NUMBER
' '
'1'
/expr_stmt
NEWLINE
'\n'
/simple_stmt
for_stmt
NAME
' '
'for'
NAME
' '
'child'
NAME
' '
'in'
power
NAME
' '
'node'
trailer
DOT
'.'
NAME
'children'
/trailer
/power
COLON
':'
suite
NEWLINE
'\n'
INDENT
''
simple_stmt
yield_expr
NAME
' '
'yield'
yield_arg
NAME
' '
'from'
power
NAME
' '
'self'
trailer
DOT
'.'
NAME
'visit'
/trailer
trailer
LPAR
'('
NAME
'child'
RPAR
')'
/trailer
/power
/yield_arg
/yield_expr
NEWLINE
'\n'
/simple_stmt
DEDENT
''
/suite
/for_stmt
simple_stmt
expr_stmt
power
NAME
'\n '
'self'
trailer
DOT
'.'
NAME
'tree_depth'
/trailer
/power
MINEQUAL
' '
'-='
NUMBER
' '
'1'
/expr_stmt
NEWLINE
'\n'
/simple_stmt
simple_stmt
power
NAME
' '
'out'
trailer
LPAR
'('
arglist
fstring
FSTRING_START
"f'"
fstring_replacement_field
LBRACE
'{'
NAME
'indent'
RBRACE
'}'
/fstring_replacement_field
FSTRING_MIDDLE
'/'
fstring_replacement_field
LBRACE
'{'
NAME
'_type'
RBRACE
'}'
/fstring_replacement_field
FSTRING_END
"'"
/fstring
COMMA
','
argument
NAME
' '
'fg'
EQUAL
'='
STRING
"'yellow'"
/argument
COMMA
','
argument
NAME
' '
'bold'
EQUAL
'='
NAME
'False'
/argument
/arglist
RPAR
')'
/trailer
/power
NEWLINE
'\n'
/simple_stmt
DEDENT
''
/suite
NAME
' '
'else'
COLON
':'
suite
NEWLINE
'\n'
INDENT
''
simple_stmt
expr_stmt
NAME
' '
'_type'
EQUAL
' '
'='
power
NAME
' '
'token'
trailer
DOT
'.'
NAME
'tok_name'
/trailer
trailer
DOT
'.'
NAME
'get'
/trailer
trailer
LPAR
'('
arglist
power
NAME
'node'
trailer
DOT
'.'
NAME
'type'
/trailer
/power
COMMA
','
power
NAME
' '
'str'
trailer
LPAR
'('
power
NAME
'node'
trailer
DOT
'.'
NAME
'type'
/trailer
/power
RPAR
')'
/trailer
/power
/arglist
RPAR
')'
/trailer
/power
/expr_stmt
NEWLINE
'\n'
/simple_stmt
simple_stmt
power
NAME
' '
'out'
trailer
LPAR
'('
arglist
fstring
FSTRING_START
"f'"
fstring_replacement_field
LBRACE
'{'
NAME
'indent'
RBRACE
'}'
/fstring_replacement_field
fstring_replacement_field
LBRACE
'{'
NAME
'_type'
RBRACE
'}'
/fstring_replacement_field
FSTRING_END
"'"
/fstring
COMMA
','
argument
NAME
' '
'fg'
EQUAL
'='
STRING
"'blue'"
/argument
COMMA
','
argument
NAME
' '
'nl'
EQUAL
'='
NAME
'False'
/argument
/arglist
RPAR
')'
/trailer
/power
NEWLINE
'\n'
/simple_stmt
if_stmt
NAME
' '
'if'
power
NAME
' '
'node'
trailer
DOT
'.'
NAME
'prefix'
/trailer
/power
COLON
':'
suite
NEWLINE
'\n'
INDENT
''
simple_stmt
power
NAME
" # We don't have to handle prefixes for `Node` objects since\n # that delegates to the first child anyway.\n "
'out'
trailer
LPAR
'('
arglist
fstring
FSTRING_START
"f'"
FSTRING_MIDDLE
' '
fstring_replacement_field
LBRACE
'{'
power
NAME
'node'
trailer
DOT
'.'
NAME
'prefix'
/trailer
/power
BANG
'!'
NAME
'r'
RBRACE
'}'
/fstring_replacement_field
FSTRING_END
"'"
/fstring
COMMA
','
argument
NAME
' '
'fg'
EQUAL
'='
STRING
"'green'"
/argument
COMMA
','
argument
NAME
' '
'bold'
EQUAL
'='
NAME
'False'
/argument
COMMA
','
argument
NAME
' '
'nl'
EQUAL
'='
NAME
'False'
/argument
/arglist
RPAR
')'
/trailer
/power
NEWLINE
'\n'
/simple_stmt
DEDENT
''
/suite
/if_stmt
simple_stmt
power
NAME
' '
'out'
trailer
LPAR
'('
arglist
fstring
FSTRING_START
"f'"
FSTRING_MIDDLE
' '
fstring_replacement_field
LBRACE
'{'
power
NAME
'node'
trailer
DOT
'.'
NAME
'value'
/trailer
/power
BANG
'!'
NAME
'r'
RBRACE
'}'
/fstring_replacement_field
FSTRING_END
"'"
/fstring
COMMA
','
argument
NAME
' '
'fg'
EQUAL
'='
STRING
"'blue'"
/argument
COMMA
','
argument
NAME
' '
'bold'
EQUAL
'='
NAME
'False'
/argument
/arglist
RPAR
')'
/trailer
/power
NEWLINE
'\n'
/simple_stmt
DEDENT
''
/suite
/if_stmt
DEDENT
''
/suite
/funcdef
decorated
decorator
AT
'\n '
'@'
NAME
'classmethod'
NEWLINE
'\n'
/decorator
funcdef
NAME
' '
'def'
NAME
' '
'show'
parameters
LPAR
'('
typedargslist
NAME
'cls'
COMMA
','
tname
NAME
' '
'code'
COLON
':'
NAME
' '
'str'
/tname
/typedargslist
RPAR
')'
/parameters
RARROW
' '
'->'
NAME
' '
'None'
COLON
':'
suite
NEWLINE
'\n'
INDENT
''
simple_stmt
STRING
' '
'"""Pretty-prints a given string of `code`.\n\n Convenience method for debugging.\n """'
NEWLINE
'\n'
/simple_stmt
simple_stmt
expr_stmt
NAME
' '
'v'
annassign
COLON
':'
power
NAME
' '
'DebugVisitor'
trailer
LSQB
'['
NAME
'None'
RSQB
']'
/trailer
/power
EQUAL
' '
'='
power
NAME
' '
'DebugVisitor'
trailer
LPAR
'('
RPAR
')'
/trailer
/power
/annassign
/expr_stmt
NEWLINE
'\n'
/simple_stmt
simple_stmt
power
NAME
' '
'list'
trailer
LPAR
'('
power
NAME
'v'
trailer
DOT
'.'
NAME
'visit'
/trailer
trailer
LPAR
'('
power
NAME
'lib2to3_parse'
trailer
LPAR
'('
NAME
'code'
RPAR
')'
/trailer
/power
RPAR
')'
/trailer
/power
RPAR
')'
/trailer
/power
NEWLINE
'\n'
/simple_stmt
DEDENT
''
/suite
/funcdef
/decorated
DEDENT
''
/suite
/classdef
/decorated
ENDMARKER
''
/file_input