mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Parameters are immutable
It took me a whole day to change one line.
This commit is contained in:
@@ -939,7 +939,7 @@ static void makeFunctionDeclarationStmt(Toy_Bucket** bucketHandle, Toy_Parser* p
|
|||||||
|
|
||||||
//read the type specifier if present
|
//read the type specifier if present
|
||||||
Toy_ValueType varType = TOY_VALUE_ANY;
|
Toy_ValueType varType = TOY_VALUE_ANY;
|
||||||
bool constant = false;
|
bool constant = true; //parameters are immutable
|
||||||
|
|
||||||
if (match(parser, TOY_TOKEN_OPERATOR_COLON)) {
|
if (match(parser, TOY_TOKEN_OPERATOR_COLON)) {
|
||||||
varType = readType(parser);
|
varType = readType(parser);
|
||||||
|
|||||||
Reference in New Issue
Block a user