| 964 | } |
| 965 | |
| 966 | void GDScriptV1TokenizerTextCompat::set_code(const String &p_code) { |
| 967 | current_indent = 0; |
| 968 | code = p_code; |
| 969 | len = p_code.length(); |
| 970 | if (len) { |
| 971 | _code = &code[0]; |
| 972 | } else { |
| 973 | _code = nullptr; |
| 974 | } |
| 975 | code_pos = 0; |
| 976 | line = 1; //it is stand-ar-ized that lines begin in 1 in code.. |
| 977 | column = 1; //the same holds for columns |
| 978 | tk_rb_pos = 0; |
| 979 | error_flag = false; |
| 980 | #ifdef DEBUG_ENABLED |
| 981 | ignore_warnings = false; |
| 982 | #endif // DEBUG_ENABLED |
| 983 | last_error = ""; |
| 984 | for (int i = 0; i < MAX_LOOKAHEAD + 1; i++) { |
| 985 | _advance(); |
| 986 | } |
| 987 | } |
| 988 | |
| 989 | GDScriptDecomp::GlobalToken GDScriptV1TokenizerTextCompat::get_token(int p_offset) const { |
| 990 | ERR_FAIL_COND_V(p_offset <= -MAX_LOOKAHEAD, T::G_TK_ERROR); |
no test coverage detected