Created
February 22, 2014 17:12
-
-
Save eliben/9158261 to your computer and use it in GitHub Desktop.
embedded comment in next prefix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Input code: | |
x = 1 # told you | |
y = 2 | |
Breakdown of the lib2to3 parse tree. The thingies with [N children] are nodes. The rest are leaves. | |
file_input [3 children] | |
simple_stmt [2 children] | |
expr_stmt [3 children] | |
NAME('x') [lineno=1, column=0, prefix=''] | |
EQUAL('=') [lineno=1, column=2, prefix=' '] | |
NUMBER('1') [lineno=1, column=4, prefix=' '] | |
NEWLINE('\n') [lineno=1, column=16, prefix=' # told you'] | |
simple_stmt [2 children] | |
expr_stmt [3 children] | |
NAME('y') [lineno=2, column=0, prefix=''] | |
EQUAL('=') [lineno=2, column=2, prefix=' '] | |
NUMBER('2') [lineno=2, column=4, prefix=' '] | |
NEWLINE('\n') [lineno=2, column=5, prefix=''] | |
ENDMARKER('') [lineno=3, column=0, prefix=''] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment