mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Functions are working, tests incomplete
This required a massive cross-cutting rework to the scope system, multiple subtle bugfixes and relearning of the parser internals, but it does appear that functions are working correctly. A few caveats: for now, parameters are always constant, regardless of type, return values can't be specified, and some script tests have been written. Most importantly, a key feature is working: closures.
This commit is contained in:
@@ -36,6 +36,10 @@ TOY_API Toy_Value* Toy_accessScopeAsPointer(Toy_Scope* scope, Toy_String* key);
|
||||
|
||||
TOY_API bool Toy_isDeclaredScope(Toy_Scope* scope, Toy_String* key);
|
||||
|
||||
//manage refcounting
|
||||
TOY_API void Toy_private_incrementScopeRefCount(Toy_Scope* scope);
|
||||
TOY_API void Toy_private_decrementScopeRefCount(Toy_Scope* scope);
|
||||
|
||||
//some useful sizes, could be swapped out as needed
|
||||
#ifndef TOY_SCOPE_INITIAL_CAPACITY
|
||||
#define TOY_SCOPE_INITIAL_CAPACITY 8
|
||||
|
||||
Reference in New Issue
Block a user