GDScript: Add lambda syntax parsing
Lambda syntax is the same as a the function syntax (using the same
`func` keyword) except that the name is optional and it can be embedded
anywhere an expression is expected. E.g.:
func _ready():
var my_lambda = func(x):
print(x)
my_lambda.call("hello")
This commit is contained in:
@ -66,7 +66,7 @@ static void test_tokenizer(const String &p_code, const Vector<String> &p_lines)
|
||||
StringBuilder token;
|
||||
token += " --> "; // Padding for line number.
|
||||
|
||||
for (int l = current.start_line; l <= current.end_line; l++) {
|
||||
for (int l = current.start_line; l <= current.end_line && l <= p_lines.size(); l++) {
|
||||
print_line(vformat("%04d %s", l, p_lines[l - 1]).replace("\t", tab));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user