MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_token_line

Function get_token_line

bytecode/gdscript_v2_tokenizer_buffer.cpp:88–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88int get_token_line(const RBMap<int, int> &lines, int offset) {
89 auto pos_it = lines.find_closest(offset);
90
91 auto largest = lines.back();
92 int l = 0;
93 if (pos_it == nullptr) {
94 if (offset > largest->key()) {
95 l = largest->value();
96 } else {
97 return -1;
98 }
99 } else {
100 l = pos_it->value();
101 }
102
103 return l;
104}
105
106GDScriptV2TokenizerCompat::Token GDScriptV2TokenizerBufferCompat::_binary_to_token(const uint8_t *p_buffer, int p_token_index) {
107 Token token;

Callers 2

_binary_to_tokenMethod · 0.85
scanMethod · 0.85

Calls 3

backMethod · 0.80
keyMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected