Class used to parse the source code of a Python file.
Methods
|
|
addToken
parse
tokeneater
|
|
addToken
|
addToken (
self,
toktype,
toktext,
srow,
scol,
line,
)
Private method used to add a token to our list of tokens.
Arguments
- toktype
- the type of the token (int)
- toktext
- the text of the token (string)
- srow
- starting row of the token (int)
- scol
- starting column of the token (int)
- line
- logical line the token was found (string)
|
|
parse
|
parse ( self, text )
Public method used to parse the source code.
Arguments
- text
- the source code as read from a Python source file
|
|
tokeneater
|
tokeneater (
self,
toktype,
toktext,
(,
(,
line,
)
Private method called by tokenize.tokenize.
Arguments
- toktype
- the type of the token (int)
- toktext
- the text of the token (string)
- srow
- starting row of the token (int)
- scol
- starting column of the token (int)
- erow
- ending row of the token (int)
- ecol
- ending column of the token (int)
- line
- logical line the token was found (string)
|
|