Crate python_ast [−] [src]
Modules
ast |
See Grammar.txt for the python reference grammar. |
doc |
This module contains excerpts about the grammar directly from CPython's documentation |
fmt |
Format |
lexer |
Transform bytes into tokens |
macros | |
parser |
Take a slice of tokens |
preprocessor |
Useful |
slice | |
token | |
traits | |
util |
Macros
drop_tokens |
Generalized form of nom's |
ignore_spaces |
Redef of the |
tk_is_none_of |
Matches one of the provided tokens. |
tk_is_one_of |
Matches one of the provided tokens. |
tk_method |
Makes a method from a parser combination |
tk_named |
Makes a function from a parser combination |
tk_named_args |
Makes a function from a parser combination with arguments. |
tk_named_attr |
Makes a function from a parser combination, with attributes |
tk_tag |
Structs
Lexer |
Struct that provides the operations to take a slice of bytes and
convert them into |
Op | |
OwnedTk |
Attempt to make an owned token to get out of lifetime hell. I found myself in trouble after trying to rewrite and inject values into the token slice in the parsing phase. This was to figure out block scopes and such since something something whitespace scoping. |
ParsedAst |
Wraps an |
Parser |
Create a Python AST from slice of Tokens created from the |
Tk |
Enums
Ast | |
Expr | |
Id | |
LexResult |
Holds the result of parsing functions |
Module | |
Num | |
ParserResult |
The result type returned by |
Stmt | |
Tag |