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

Method get_token_built_in_func

bytecode/gdscript_v1_tokenizer_compat.cpp:1031–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1029}
1030
1031int GDScriptV1TokenizerTextCompat::get_token_built_in_func(int p_offset) const {
1032 ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, decomp->get_function_count());
1033 ERR_FAIL_COND_V(p_offset >= MAX_LOOKAHEAD, decomp->get_function_count());
1034
1035 int ofs = (TK_RB_SIZE + tk_rb_pos + p_offset - MAX_LOOKAHEAD - 1) % TK_RB_SIZE;
1036 ERR_FAIL_COND_V(tk_rb[ofs].type != T::G_TK_BUILT_IN_FUNC, decomp->get_function_count());
1037 return tk_rb[ofs].func;
1038}
1039
1040Variant::Type GDScriptV1TokenizerTextCompat::get_token_type(int p_offset) const {
1041 ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, Variant::NIL);

Callers 1

parse_code_stringMethod · 0.80

Calls 2

get_function_countMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected