| 280 | } |
| 281 | |
| 282 | void GDScriptParser::make_completion_context(CompletionType p_type, Node *p_node, int p_argument, bool p_force) { |
| 283 | if (!for_completion || (!p_force && completion_context.type != COMPLETION_NONE)) { |
| 284 | return; |
| 285 | } |
| 286 | if (previous.cursor_place != GDScriptTokenizerText::CURSOR_MIDDLE && previous.cursor_place != GDScriptTokenizerText::CURSOR_END && current.cursor_place == GDScriptTokenizerText::CURSOR_NONE) { |
| 287 | return; |
| 288 | } |
| 289 | CompletionContext context; |
| 290 | context.type = p_type; |
| 291 | context.current_class = current_class; |
| 292 | context.current_function = current_function; |
| 293 | context.current_suite = current_suite; |
| 294 | context.current_line = tokenizer->get_cursor_line(); |
| 295 | context.current_argument = p_argument; |
| 296 | context.node = p_node; |
| 297 | context.parser = this; |
| 298 | if (!completion_call_stack.is_empty()) { |
| 299 | context.call = completion_call_stack.back()->get(); |
| 300 | } |
| 301 | completion_context = context; |
| 302 | } |
| 303 | |
| 304 | void GDScriptParser::make_completion_context(CompletionType p_type, Variant::Type p_builtin_type, bool p_force) { |
| 305 | if (!for_completion || (!p_force && completion_context.type != COMPLETION_NONE)) { |
nothing calls this directly
no test coverage detected