py/parse: Move function to check for const parse node to parse.[ch].

This commit is contained in:
Damien George
2016-11-13 15:32:05 +11:00
parent 3f8bb80eb2
commit b0cbfb0492
3 changed files with 20 additions and 18 deletions

View File

@@ -77,6 +77,8 @@ typedef struct _mp_parse_node_struct_t {
#define MP_PARSE_NODE_STRUCT_NUM_NODES(pns) ((pns)->kind_num_nodes >> 8)
mp_parse_node_t mp_parse_node_new_leaf(size_t kind, mp_int_t arg);
bool mp_parse_node_is_const_false(mp_parse_node_t pn);
bool mp_parse_node_is_const_true(mp_parse_node_t pn);
bool mp_parse_node_get_int_maybe(mp_parse_node_t pn, mp_obj_t *o);
int mp_parse_node_extract_list(mp_parse_node_t *pn, size_t pn_kind, mp_parse_node_t **nodes);
void mp_parse_node_print(mp_parse_node_t pn, size_t indent);