Permalink
Browse files

py/lexer: Permanently disable the mp_lexer_show_token function.

The lexer is very mature and this debug function is no longer used.  If
it's really needed one can uncomment it and recompile.
  • Loading branch information...
1 parent f4aebaf commit c305ae32436e37327d33df979d57d9ac1fb822c1 @dpgeorge dpgeorge committed Dec 21, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −1 py/lexer.c
  2. +0 −1 py/lexer.h
  3. +0 −1 py/mpconfig.h
View
@@ -792,7 +792,9 @@ void mp_lexer_to_next(mp_lexer_t *lex) {
mp_lexer_next_token_into(lex, false);
}
-#if MICROPY_DEBUG_PRINTERS
+#if 0
+// This function is used to print the current token and should only be
+// needed to debug the lexer, so it's not available via a config option.
void mp_lexer_show_token(const mp_lexer_t *lex) {
printf("(" UINT_FMT ":" UINT_FMT ") kind:%u str:%p len:%zu", lex->tok_line, lex->tok_column, lex->tok_kind, lex->vstr.buf, lex->vstr.len);
if (lex->vstr.len > 0) {
View
@@ -172,7 +172,6 @@ mp_lexer_t *mp_lexer_new_from_str_len(qstr src_name, const char *str, mp_uint_t
void mp_lexer_free(mp_lexer_t *lex);
void mp_lexer_to_next(mp_lexer_t *lex);
-void mp_lexer_show_token(const mp_lexer_t *lex);
/******************************************************************/
// platform specific import function; must be implemented for a specific port
View
@@ -362,7 +362,6 @@
#endif
// Whether to build functions that print debugging info:
-// mp_lexer_show_token
// mp_bytecode_print
// mp_parse_node_print
#ifndef MICROPY_DEBUG_PRINTERS

0 comments on commit c305ae3

Please sign in to comment.