mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Rest parameter working
This commit is contained in:
@@ -1419,8 +1419,7 @@ static void fnDecl(Parser* parser, Node** nodeHandle) {
|
||||
Literal argIdentifier = _toIdentifierLiteral(cpy, strlen(cpy)); //BUGFIX: use this instead of the macro
|
||||
|
||||
//set the type (array of any types)
|
||||
Literal argTypeLiteral = TO_TYPE_LITERAL(LITERAL_ARRAY, false);
|
||||
TYPE_PUSH_SUBTYPE(&argTypeLiteral, TO_TYPE_LITERAL(LITERAL_ANY, false));
|
||||
Literal argTypeLiteral = TO_TYPE_LITERAL(LITERAL_FUNCTION_ARG_REST, false);
|
||||
|
||||
//emit the node to the argument list (grow the node if needed)
|
||||
if (argumentNode->fnCollection.capacity < argumentNode->fnCollection.count + 1) {
|
||||
|
||||
Reference in New Issue
Block a user