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

Method get_token_error

bytecode/gdscript_v1_tokenizer_compat.cpp:1067–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1065}
1066
1067String GDScriptV1TokenizerTextCompat::get_token_error(int p_offset) const {
1068 ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, String());
1069 ERR_FAIL_COND_V(p_offset >= MAX_LOOKAHEAD, String());
1070
1071 int ofs = (TK_RB_SIZE + tk_rb_pos + p_offset - MAX_LOOKAHEAD - 1) % TK_RB_SIZE;
1072 ERR_FAIL_COND_V(tk_rb[ofs].type != T::G_TK_ERROR, String());
1073 return tk_rb[ofs].literal;
1074}
1075
1076void GDScriptV1TokenizerTextCompat::advance(int p_amount) {
1077 ERR_FAIL_COND(p_amount <= 0);

Callers 1

parse_code_stringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected