mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Fixed C-API function name, resolved #87, thanks @hiperiondev
This commit is contained in:
@@ -54,7 +54,7 @@ The current minor version of Toy. This value is embedded into the bytecode, and
|
||||
This value MUST fit into an unsigned char.
|
||||
!*/
|
||||
|
||||
#define TOY_VERSION_MINOR 1
|
||||
#define TOY_VERSION_MINOR 2
|
||||
|
||||
/*!
|
||||
### TOY_VERSION_PATCH
|
||||
@@ -64,7 +64,7 @@ The current patch version of Toy. This value is embedded into the bytecode.
|
||||
This value MUST fit into an unsigned char.
|
||||
!*/
|
||||
|
||||
#define TOY_VERSION_PATCH 7
|
||||
#define TOY_VERSION_PATCH 0
|
||||
|
||||
/*!
|
||||
### TOY_VERSION_BUILD
|
||||
|
||||
@@ -699,7 +699,7 @@ static bool execVarAssign(Toy_Interpreter* interpreter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Toy_isDelcaredScopeVariable(interpreter->scope, lhs)) {
|
||||
if (!Toy_isDeclaredScopeVariable(interpreter->scope, lhs)) {
|
||||
interpreter->errorOutput("Undeclared variable \"");
|
||||
Toy_printLiteralCustom(lhs, interpreter->errorOutput);
|
||||
interpreter->errorOutput("\"\n");
|
||||
@@ -1467,7 +1467,7 @@ bool Toy_callFn(Toy_Interpreter* interpreter, const char* name, Toy_LiteralArray
|
||||
Toy_Literal key = TOY_TO_IDENTIFIER_LITERAL(Toy_createRefStringLength(name, strlen(name)));
|
||||
Toy_Literal val = TOY_TO_NULL_LITERAL;
|
||||
|
||||
if (!Toy_isDelcaredScopeVariable(interpreter->scope, key)) {
|
||||
if (!Toy_isDeclaredScopeVariable(interpreter->scope, key)) {
|
||||
interpreter->errorOutput("No function with that name\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ bool Toy_declareScopeVariable(Toy_Scope* scope, Toy_Literal key, Toy_Literal typ
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Toy_isDelcaredScopeVariable(Toy_Scope* scope, Toy_Literal key) {
|
||||
bool Toy_isDeclaredScopeVariable(Toy_Scope* scope, Toy_Literal key) {
|
||||
while (scope != NULL) {
|
||||
if (Toy_existsLiteralDictionary(&scope->variables, key)) {
|
||||
return true;
|
||||
|
||||
@@ -58,11 +58,11 @@ This function returns true on success, otherwise it returns failure (such as if
|
||||
TOY_API bool Toy_declareScopeVariable(Toy_Scope* scope, Toy_Literal key, Toy_Literal type);
|
||||
|
||||
/*!
|
||||
### bool Toy_isDelcaredScopeVariable(Toy_Scope* scope, Toy_Literal key)
|
||||
### bool Toy_isDeclaredScopeVariable(Toy_Scope* scope, Toy_Literal key)
|
||||
|
||||
This function checks to see if a given variable with the name `key` has been previously declared.
|
||||
!*/
|
||||
TOY_API bool Toy_isDelcaredScopeVariable(Toy_Scope* scope, Toy_Literal key);
|
||||
TOY_API bool Toy_isDeclaredScopeVariable(Toy_Scope* scope, Toy_Literal key);
|
||||
|
||||
/*!
|
||||
### bool Toy_setScopeVariable(Toy_Scope* scope, Toy_Literal key, Toy_Literal value, bool constCheck)
|
||||
|
||||
Reference in New Issue
Block a user