summaryrefslogtreecommitdiffstatshomepage
path: root/py/lexer.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-21 20:32:59 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-21 20:32:59 +0100
commit58ebde46646dd49d22b2accfa9c7a78e15921e48 (patch)
treebdb130a761309e138cd9d3ff60f4639c897a8808 /py/lexer.c
parentaa7cf6f72f4e8a553f892629bb3338ab8c982d57 (diff)
downloadmicropython-58ebde46646dd49d22b2accfa9c7a78e15921e48.tar.gz
micropython-58ebde46646dd49d22b2accfa9c7a78e15921e48.zip
Tidy up some configuration options.
MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.
Diffstat (limited to 'py/lexer.c')
-rw-r--r--py/lexer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/lexer.c b/py/lexer.c
index e2dfea78c8..42f755ed98 100644
--- a/py/lexer.c
+++ b/py/lexer.c
@@ -218,8 +218,8 @@ STATIC void next_char(mp_lexer_t *lex) {
void indent_push(mp_lexer_t *lex, uint indent) {
if (lex->num_indent_level >= lex->alloc_indent_level) {
// TODO use m_renew_maybe and somehow indicate an error if it fails... probably by using MP_TOKEN_MEMORY_ERROR
- lex->indent_level = m_renew(uint16_t, lex->indent_level, lex->alloc_indent_level, lex->alloc_indent_level + MP_ALLOC_LEXEL_INDENT_INC);
- lex->alloc_indent_level += MP_ALLOC_LEXEL_INDENT_INC;
+ lex->indent_level = m_renew(uint16_t, lex->indent_level, lex->alloc_indent_level, lex->alloc_indent_level + MICROPY_ALLOC_LEXEL_INDENT_INC);
+ lex->alloc_indent_level += MICROPY_ALLOC_LEXEL_INDENT_INC;
}
lex->indent_level[lex->num_indent_level++] = indent;
}
@@ -731,7 +731,7 @@ mp_lexer_t *mp_lexer_new(qstr src_name, void *stream_data, mp_lexer_stream_next_
lex->column = 1;
lex->emit_dent = 0;
lex->nested_bracket_level = 0;
- lex->alloc_indent_level = MP_ALLOC_LEXER_INDENT_INIT;
+ lex->alloc_indent_level = MICROPY_ALLOC_LEXER_INDENT_INIT;
lex->num_indent_level = 1;
lex->indent_level = m_new_maybe(uint16_t, lex->alloc_indent_level);
vstr_init(&lex->vstr, 32);