| 1065 | } |
| 1066 | |
| 1067 | String 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 | |
| 1076 | void GDScriptV1TokenizerTextCompat::advance(int p_amount) { |
| 1077 | ERR_FAIL_COND(p_amount <= 0); |