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

Method get_token

bytecode/gdscript_v1_tokenizer_compat.cpp:989–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987}
988
989GDScriptDecomp::GlobalToken GDScriptV1TokenizerTextCompat::get_token(int p_offset) const {
990 ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, T::G_TK_ERROR);
991 ERR_FAIL_COND_V(p_offset >= MAX_LOOKAHEAD, T::G_TK_ERROR);
992
993 int ofs = (TK_RB_SIZE + tk_rb_pos + p_offset - MAX_LOOKAHEAD - 1) % TK_RB_SIZE;
994 return tk_rb[ofs].type;
995}
996
997int GDScriptV1TokenizerTextCompat::get_token_line(int p_offset) const {
998 ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, -1);

Callers 1

parse_code_stringMethod · 0.45

Calls 2

sizeMethod · 0.45
get_global_tokenMethod · 0.45

Tested by

no test coverage detected