| 1226 | } |
| 1227 | |
| 1228 | bool GDScriptDecomp::is_token_func_call(int p_pos, const Vector<uint32_t> &p_tokens) { |
| 1229 | if (p_pos > 0 && get_global_token(p_tokens[p_pos - 1]) == G_TK_PR_FUNCTION) { |
| 1230 | return false; |
| 1231 | } |
| 1232 | // Godot 3.x's parser was VERY DUMB and emitted built-in function tokens for any identifier that shared |
| 1233 | // the same name as a built-in function, so we have to check if the next token is a parenthesis open |
| 1234 | if (p_pos + 1 >= p_tokens.size() || get_global_token(p_tokens[p_pos + 1]) != G_TK_PARENTHESIS_OPEN) { |
| 1235 | return false; |
| 1236 | } |
| 1237 | return true; |
| 1238 | } |
| 1239 | |
| 1240 | bool GDScriptDecomp::is_token_builtin_func(int p_pos, const Vector<uint32_t> &p_tokens) { |
| 1241 | auto curr_token = get_global_token(p_tokens[p_pos]); |