From c13e85a5b0e93bb38f6d2d6477e509d20b30d418 Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Thu, 3 Jun 2021 22:20:08 -1000 Subject: [PATCH] Turned of tokenizer debugging messages --- Grbl_Esp32/src/Configuration/Tokenizer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Grbl_Esp32/src/Configuration/Tokenizer.cpp b/Grbl_Esp32/src/Configuration/Tokenizer.cpp index 7efade01..f840b5e5 100644 --- a/Grbl_Esp32/src/Configuration/Tokenizer.cpp +++ b/Grbl_Esp32/src/Configuration/Tokenizer.cpp @@ -110,12 +110,11 @@ namespace Configuration { token_.indent_ = indent; if (IsEndLine()) { token_.kind_ = TokenKind::Section; +#ifdef VERBOSE_TOKENIZER log_debug("Section " << StringRange(token_.keyStart_, token_.keyEnd_).str()); +#endif Inc(); - // if (!Eof() && Current() == '\n') { - // Inc(); - // } // \r\n } else { if (Current() == '"' || Current() == '\'') { auto delimiter = Current(); @@ -131,8 +130,10 @@ namespace Configuration { ParseError("Could not find matching delimiter in string value."); } Inc(); +#ifdef VERBOSE_TOKENIZER log_debug("StringQ " << StringRange(token_.keyStart_, token_.keyEnd_).str() << " " << StringRange(token_.sValueStart_, token_.sValueEnd_).str()); +#endif } else { token_.kind_ = TokenKind::String; token_.sValueStart_ = current_; @@ -140,8 +141,10 @@ namespace Configuration { Inc(); } token_.sValueEnd_ = current_; +#ifdef VERBOSE_TOKENIZER log_debug("String " << StringRange(token_.keyStart_, token_.keyEnd_).str() << " " << StringRange(token_.sValueStart_, token_.sValueEnd_).str()); +#endif } // Skip more whitespaces while (!Eof() && IsWhiteSpace()) {