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

Method get_token_line_indent

bytecode/gdscript_v1_tokenizer_compat.cpp:1049–1056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1047}
1048
1049int GDScriptV1TokenizerTextCompat::get_token_line_indent(int p_offset) const {
1050 ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, 0);
1051 ERR_FAIL_COND_V(p_offset >= MAX_LOOKAHEAD, 0);
1052
1053 int ofs = (TK_RB_SIZE + tk_rb_pos + p_offset - MAX_LOOKAHEAD - 1) % TK_RB_SIZE;
1054 ERR_FAIL_COND_V(tk_rb[ofs].type != T::G_TK_NEWLINE, 0);
1055 return tk_rb[ofs].literal.operator Vector2().x;
1056}
1057
1058int GDScriptV1TokenizerTextCompat::get_token_line_tab_indent(int p_offset) const {
1059 ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, 0);

Callers 1

parse_code_stringMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected