mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-17 15:54:07 +10:00
docs: spelling mistakes correction
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
# toy_scope.h
|
||||
|
||||
This header defines the scope structure, which stores all of the variables used within a given block of code.
|
||||
This header defines the scope structure, which stores all the variables used within a given block of code.
|
||||
|
||||
Scopes are arranged into a linked list of ancestors, each of which is reference counted. When a scope is popped off the end of the chain, every ancestor scope has it's reference counter reduced by 1 and, if any reach 0, they are freed.
|
||||
Scopes are arranged into a linked list of ancestors, each of which is reference counted. When a scope is popped off the end of the chain, every ancestor scope has its reference counter reduced by 1 and, if any reach 0, they are freed.
|
||||
|
||||
This is also where Toy's type system lives.
|
||||
|
||||
@@ -15,7 +16,7 @@ This function creates a new `Toy_scope` with `scope` as it's ancestor, and retur
|
||||
|
||||
### Toy_Scope* Toy_popScope(Toy_Scope* scope)
|
||||
|
||||
This function frees the given `scope`, and returns it's ancestor.
|
||||
This function frees the given `scope`, and returns its ancestor.
|
||||
|
||||
### Toy_Scope* Toy_copyScope(Toy_Scope* original)
|
||||
|
||||
@@ -35,7 +36,7 @@ This function checks to see if a given variable with the name `key` has been pre
|
||||
|
||||
### bool Toy_setScopeVariable(Toy_Scope* scope, Toy_Literal key, Toy_Literal value, bool constCheck)
|
||||
|
||||
This function sets an existing variable named `key` to the value of `value`. This function fails if `constCheck` is true and the given key's type has the constaant flag set. It also fails if the given key doesn't exist.
|
||||
This function sets an existing variable named `key` to the value of `value`. This function fails if `constCheck` is true and the given key's type has the constant flag set. It also fails if the given key doesn't exist.
|
||||
|
||||
This function returns true on success, otherwise it returns false.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user