MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / make_completion_context

Method make_completion_context

modules/gdscript/gdscript_parser.cpp:282–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void 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
304void 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)) {

Callers

nothing calls this directly

Calls 4

get_cursor_lineMethod · 0.45
is_emptyMethod · 0.45
getMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected