#include <stdint.h>
#include "py/mpconfig.h"
#include "py/qstr.h"
#include "py/reader.h"
Go to the source code of this file.
|
enum | _mp_token_kind_t {
MP_TOKEN_END,
MP_TOKEN_INVALID,
MP_TOKEN_DEDENT_MISMATCH,
MP_TOKEN_LONELY_STRING_OPEN,
MP_TOKEN_NEWLINE,
MP_TOKEN_INDENT,
MP_TOKEN_DEDENT,
MP_TOKEN_NAME,
MP_TOKEN_INTEGER,
MP_TOKEN_FLOAT_OR_IMAG,
MP_TOKEN_STRING,
MP_TOKEN_BYTES,
MP_TOKEN_ELLIPSIS,
MP_TOKEN_KW_FALSE,
MP_TOKEN_KW_NONE,
MP_TOKEN_KW_TRUE,
MP_TOKEN_KW___DEBUG__,
MP_TOKEN_KW_AND,
MP_TOKEN_KW_AS,
MP_TOKEN_KW_ASSERT,
MP_TOKEN_KW_BREAK,
MP_TOKEN_KW_CLASS,
MP_TOKEN_KW_CONTINUE,
MP_TOKEN_KW_DEF,
MP_TOKEN_KW_DEL,
MP_TOKEN_KW_ELIF,
MP_TOKEN_KW_ELSE,
MP_TOKEN_KW_EXCEPT,
MP_TOKEN_KW_FINALLY,
MP_TOKEN_KW_FOR,
MP_TOKEN_KW_FROM,
MP_TOKEN_KW_GLOBAL,
MP_TOKEN_KW_IF,
MP_TOKEN_KW_IMPORT,
MP_TOKEN_KW_IN,
MP_TOKEN_KW_IS,
MP_TOKEN_KW_LAMBDA,
MP_TOKEN_KW_NONLOCAL,
MP_TOKEN_KW_NOT,
MP_TOKEN_KW_OR,
MP_TOKEN_KW_PASS,
MP_TOKEN_KW_RAISE,
MP_TOKEN_KW_RETURN,
MP_TOKEN_KW_TRY,
MP_TOKEN_KW_WHILE,
MP_TOKEN_KW_WITH,
MP_TOKEN_KW_YIELD,
MP_TOKEN_OP_PLUS,
MP_TOKEN_OP_MINUS,
MP_TOKEN_OP_STAR,
MP_TOKEN_OP_DBL_STAR,
MP_TOKEN_OP_SLASH,
MP_TOKEN_OP_DBL_SLASH,
MP_T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N_DEDENT_MISMATCH | |
MP_TOKEN_LONELY_STRING_OPEN | |
MP_TOKEN_NEWLINE | |
MP_TOKEN_INDENT | |
MP_TOKEN_DEDENT | |
MP_TOKEN_NAME | |
MP_TOKEN_INTEGER | |
MP_TOKEN_FLOAT_OR_IMAG | |
MP_TOKEN_STRING | |
MP_TOKEN_BYTES | |
MP_TOKEN_ELLIPSIS | |
MP_TOKEN_KW_FALSE | |
MP_TOKEN_KW_NONE | |
MP_TOKEN_KW_TRUE | |
MP_TOKEN_KW___DEBUG__ | |
MP_TOKEN_KW_AND | |
MP_TOKEN_KW_AS | |
MP_TOKEN_KW_ASSERT | |
MP_TOKEN_KW_BREAK | |
MP_TOKEN_KW_CLASS | |
MP_TOKEN_KW_CONTINUE | |
MP_TOKEN_KW_DEF | |
MP_TOKEN_KW_DEL | |
MP_TOKEN_KW_ELIF | |
MP_TOKEN_KW_ELSE | |
MP_TOKEN_KW_EXCEPT | |
MP_TOKEN_KW_FINALLY | |
MP_TOKEN_KW_FOR | |
MP_TOKEN_KW_FROM | |
MP_TOKEN_KW_GLOBAL | |
MP_TOKEN_KW_IF | |
MP_TOKEN_KW_IMPORT | |
MP_TOKEN_KW_IN | |
MP_TOKEN_KW_IS | |
MP_TOKEN_KW_LAMBDA | |
MP_TOKEN_KW_NONLOCAL | |
MP_TOKEN_KW_NOT | |
MP_TOKEN_KW_OR | |
MP_TOKEN_KW_PASS | |
MP_TOKEN_KW_RAISE | |
MP_TOKEN_KW_RETURN | |
MP_TOKEN_KW_TRY | |
MP_TOKEN_KW_WHILE | |
MP_TOKEN_KW_WITH | |
MP_TOKEN_KW_YIELD | |
MP_TOKEN_OP_PLUS | |
MP_TOKEN_OP_MINUS | |
MP_TOKEN_OP_STAR | |
MP_TOKEN_OP_DBL_STAR | |
MP_TOKEN_OP_SLASH | |
MP_TOKEN_OP_DBL_SLASH | |
MP_TOKEN_OP_PERCENT | |
MP_TOKEN_OP_LESS | |
MP_TOKEN_OP_DBL_LESS | |
MP_TOKEN_OP_MORE | |
MP_TOKEN_OP_DBL_MORE | |
MP_TOKEN_OP_AMPERSAND | |
MP_TOKEN_OP_PIPE | |
MP_TOKEN_OP_CARET | |
MP_TOKEN_OP_TILDE | |
MP_TOKEN_OP_LESS_EQUAL | |
MP_TOKEN_OP_MORE_EQUAL | |
MP_TOKEN_OP_DBL_EQUAL | |
MP_TOKEN_OP_NOT_EQUAL | |
MP_TOKEN_DEL_PAREN_OPEN | |
MP_TOKEN_DEL_PAREN_CLOSE | |
MP_TOKEN_DEL_BRACKET_OPEN | |
MP_TOKEN_DEL_BRACKET_CLOSE | |
MP_TOKEN_DEL_BRACE_OPEN | |
MP_TOKEN_DEL_BRACE_CLOSE | |
MP_TOKEN_DEL_COMMA | |
MP_TOKEN_DEL_COLON | |
MP_TOKEN_DEL_PERIOD | |
MP_TOKEN_DEL_SEMICOLON | |
MP_TOKEN_DEL_AT | |
MP_TOKEN_DEL_EQUAL | |
MP_TOKEN_DEL_PLUS_EQUAL | |
MP_TOKEN_DEL_MINUS_EQUAL | |
MP_TOKEN_DEL_STAR_EQUAL | |
MP_TOKEN_DEL_SLASH_EQUAL | |
MP_TOKEN_DEL_DBL_SLASH_EQUAL | |
MP_TOKEN_DEL_PERCENT_EQUAL | |
MP_TOKEN_DEL_AMPERSAND_EQUAL | |
MP_TOKEN_DEL_PIPE_EQUAL | |
MP_TOKEN_DEL_CARET_EQUAL | |
MP_TOKEN_DEL_DBL_MORE_EQUAL | |
MP_TOKEN_DEL_DBL_LESS_EQUAL | |
MP_TOKEN_DEL_DBL_STAR_EQUAL | |
MP_TOKEN_DEL_MINUS_MORE | |
Definition at line 41 of file lexer.h.
◆ mp_import_stat_t
Enumerator |
---|
MP_IMPORT_STAT_NO_EXIST | |
MP_IMPORT_STAT_DIR | |
MP_IMPORT_STAT_FILE | |
Definition at line 182 of file lexer.h.
◆ mp_import_stat()
◆ mp_lexer_free()
◆ mp_lexer_new()
◆ mp_lexer_new_from_file()
mp_lexer_t* mp_lexer_new_from_file |
( |
const char * |
filename | ) |
|
◆ mp_lexer_new_from_str_len()
◆ mp_lexer_to_next()