| 1047 | } |
| 1048 | |
| 1049 | int 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 | |
| 1058 | int GDScriptV1TokenizerTextCompat::get_token_line_tab_indent(int p_offset) const { |
| 1059 | ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, 0); |