MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_char

Method get_char

core/variant/variant_parser.cpp:48–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46#include "core/string/string_buffer.h"
47
48char32_t VariantParser::Stream::get_char() {
49 // is within buffer?
50 if (readahead_pointer < readahead_filled) {
51 return readahead_buffer[readahead_pointer++];
52 }
53
54 // attempt to readahead
55 readahead_filled = _read_buffer(readahead_buffer, readahead_enabled ? READAHEAD_SIZE : 1);
56 if (readahead_filled) {
57 readahead_pointer = 0;
58 } else {
59 // EOF
60 readahead_pointer = 1;
61 eof = true;
62 return 0;
63 }
64 return get_char();
65}
66
67bool VariantParser::Stream::is_eof() const {
68 if (readahead_enabled) {

Callers 4

get_tokenMethod · 0.80
_parse_enginecfgMethod · 0.80
_parse_tagMethod · 0.80
parse_tag_assign_eofMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected