diff options
Diffstat (limited to 'py/parse2.h')
-rw-r--r-- | py/parse2.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/py/parse2.h b/py/parse2.h index 82d963945..55b05e062 100644 --- a/py/parse2.h +++ b/py/parse2.h @@ -23,14 +23,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_PY_PARSE_H -#define MICROPY_INCLUDED_PY_PARSE_H +#ifndef MICROPY_INCLUDED_PY_PARSE2_H +#define MICROPY_INCLUDED_PY_PARSE2_H #include <stddef.h> #include <stdint.h> #include "py/obj.h" +#if MICROPY_USE_SMALL_HEAP_COMPILER + struct _mp_lexer_t; #define MP_PT_NULL (0) @@ -42,6 +44,8 @@ struct _mp_lexer_t; #define MP_PT_ID_BASE (10) // +16 #define MP_PT_RULE_BASE (26) // +173-ish +typedef const byte *mp_parse_node_t; + extern const byte pt_const_int0[]; static inline const byte *pt_tok_extract(const byte *p, byte *tok) { @@ -130,4 +134,6 @@ typedef struct _mp_parse_t { mp_parse_tree_t mp_parse(struct _mp_lexer_t *lex, mp_parse_input_kind_t input_kind); void mp_parse_tree_clear(mp_parse_tree_t *tree); -#endif // MICROPY_INCLUDED_PY_PARSE_H +#endif // MICROPY_USE_SMALL_HEAP_COMPILER + +#endif // MICROPY_INCLUDED_PY_PARSE2_H |