peek_char -> peek_next_char

This commit is contained in:
John Keiser 2020-06-12 09:10:16 -07:00
parent d178e089a6
commit e15e1e253d
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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() {

View File

@ -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;