1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

GDScript: Add support for variadic functions

This commit is contained in:
Danil Alexeev
2025-03-30 12:59:05 +03:00
parent 3b963ab8b6
commit ee121ef80e
33 changed files with 416 additions and 65 deletions

View File

@@ -135,6 +135,7 @@ static const char *token_names[] = {
";", // SEMICOLON,
".", // PERIOD,
"..", // PERIOD_PERIOD,
"...", // PERIOD_PERIOD_PERIOD,
":", // COLON,
"$", // DOLLAR,
"->", // FORWARD_ARROW,
@@ -1501,6 +1502,10 @@ GDScriptTokenizer::Token GDScriptTokenizerText::scan() {
case '.':
if (_peek() == '.') {
_advance();
if (_peek() == '.') {
_advance();
return make_token(Token::PERIOD_PERIOD_PERIOD);
}
return make_token(Token::PERIOD_PERIOD);
} else if (is_digit(_peek())) {
// Number starting with '.'.