diff --git a/src/generic/stage2/logger.h b/src/generic/stage2/logger.h index 7da4f044..c682fb0d 100644 --- a/src/generic/stage2/logger.h +++ b/src/generic/stage2/logger.h @@ -61,7 +61,7 @@ namespace logger { printf(" "); } printf("| %c ", printable_char(structurals.at_beginning() ? ' ' : structurals.current_char())); - printf("| %c ", printable_char(structurals.peek_char())); + printf("| %c ", printable_char(structurals.peek_next_char())); printf("| %5u ", structurals.parser.structural_indexes[*(structurals.current_structural+1)]); printf("| %-*s ", LOG_DETAIL_LEN, detail); printf("| %*u ", LOG_INDEX_LEN, *structurals.current_structural); diff --git a/src/generic/stage2/structural_iterator.h b/src/generic/stage2/structural_iterator.h index 3228b3a1..ae47ec91 100644 --- a/src/generic/stage2/structural_iterator.h +++ b/src/generic/stage2/structural_iterator.h @@ -21,7 +21,7 @@ public: return buf[*current_structural]; } // Get the next structural character without advancing - really_inline char peek_char() { + really_inline char peek_next_char() { return buf[*(current_structural+1)]; } really_inline char advance_char() { diff --git a/src/generic/stage2/structural_parser.h b/src/generic/stage2/structural_parser.h index ed2f861a..6fabcd88 100644 --- a/src/generic/stage2/structural_parser.h +++ b/src/generic/stage2/structural_parser.h @@ -438,7 +438,7 @@ scope_end: // Array parser states // array_begin: - if (parser.peek_char() == ']') { + if (parser.peek_next_char() == ']') { parser.advance_char(); parser.end_array(); goto scope_end;