You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Merge pull request #108979 from HolonProduction/completion-call-stack-lambda
Autocompletion: Push empty call for lambdas
This commit is contained in:
@@ -3618,6 +3618,8 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_lambda(ExpressionNode *p_p
|
|||||||
|
|
||||||
bool multiline_context = multiline_stack.back()->get();
|
bool multiline_context = multiline_stack.back()->get();
|
||||||
|
|
||||||
|
push_completion_call(nullptr);
|
||||||
|
|
||||||
// Reset the multiline stack since we don't want the multiline mode one in the lambda body.
|
// Reset the multiline stack since we don't want the multiline mode one in the lambda body.
|
||||||
push_multiline(false);
|
push_multiline(false);
|
||||||
if (multiline_context) {
|
if (multiline_context) {
|
||||||
@@ -3665,6 +3667,8 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_lambda(ExpressionNode *p_p
|
|||||||
|
|
||||||
pop_multiline();
|
pop_multiline();
|
||||||
|
|
||||||
|
pop_completion_call();
|
||||||
|
|
||||||
if (multiline_context) {
|
if (multiline_context) {
|
||||||
// If we're in multiline mode, we want to skip the spurious DEDENT and NEWLINE tokens.
|
// If we're in multiline mode, we want to skip the spurious DEDENT and NEWLINE tokens.
|
||||||
while (check(GDScriptTokenizer::Token::DEDENT) || check(GDScriptTokenizer::Token::INDENT) || check(GDScriptTokenizer::Token::NEWLINE)) {
|
while (check(GDScriptTokenizer::Token::DEDENT) || check(GDScriptTokenizer::Token::INDENT) || check(GDScriptTokenizer::Token::NEWLINE)) {
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[output]
|
||||||
|
include=[
|
||||||
|
{"display": "print(…)", "insert_text": "print("},
|
||||||
|
]
|
||||||
|
exclude=[
|
||||||
|
{"insert_text": "print"},
|
||||||
|
]
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
signal test_signal
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
test_signal.connect(func(): p➡
|
||||||
|
pass
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[output]
|
||||||
|
include=[
|
||||||
|
{"display": "print(…)", "insert_text": "print("},
|
||||||
|
]
|
||||||
|
exclude=[
|
||||||
|
{"insert_text": "print"},
|
||||||
|
]
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
signal test_signal
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
test_signal.connect(func(a = p➡): pass
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user