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

Method override_completion_context

modules/gdscript/gdscript_parser.cpp:260–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258#endif // DEBUG_ENABLED
259
260void GDScriptParser::override_completion_context(const Node *p_for_node, CompletionType p_type, Node *p_node, int p_argument) {
261 if (!for_completion) {
262 return;
263 }
264 if (p_for_node == nullptr || completion_context.node != p_for_node) {
265 return;
266 }
267 CompletionContext context;
268 context.type = p_type;
269 context.current_class = current_class;
270 context.current_function = current_function;
271 context.current_suite = current_suite;
272 context.current_line = tokenizer->get_cursor_line();
273 context.current_argument = p_argument;
274 context.node = p_node;
275 context.parser = this;
276 if (!completion_call_stack.is_empty()) {
277 context.call = completion_call_stack.back()->get();
278 }
279 completion_context = context;
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)) {

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