mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-16 07:14:07 +10:00
Tweaks and rearrangements
This commit is contained in:
@@ -43,13 +43,18 @@ print tally(); //3
|
|||||||
|
|
||||||
* [Quick Start Guide](quick-start-guide)
|
* [Quick Start Guide](quick-start-guide)
|
||||||
* [Types](types)
|
* [Types](types)
|
||||||
|
* [Standard Library](standard-library)
|
||||||
|
* ~~Timer Library~~ Under Development
|
||||||
|
* [Game Engine](game-engine)
|
||||||
|
|
||||||
|
# Deep Dive
|
||||||
|
|
||||||
* [Embedding Toy](embedding-toy)
|
* [Embedding Toy](embedding-toy)
|
||||||
* [Using Toy](using-toy)
|
* [Using Toy](using-toy)
|
||||||
* [Compiling Toy](compiling-toy)
|
* [Compiling Toy](compiling-toy)
|
||||||
* [Standard Library](standard-library)
|
|
||||||
* [Developing Toy](developing-toy)
|
* [Developing Toy](developing-toy)
|
||||||
|
* [Testing Toy](testing-toy)
|
||||||
* [Roadmap](roadmap)
|
* [Roadmap](roadmap)
|
||||||
* [Game Engine](game-engine)
|
|
||||||
|
|
||||||
# Version Differences
|
# Version Differences
|
||||||
|
|
||||||
|
|||||||
@@ -18,10 +18,11 @@ This is probably the easiest goal to accomplish, but also the least urgent. The
|
|||||||
|
|
||||||
Some things I'd like to add in the future include:
|
Some things I'd like to add in the future include:
|
||||||
|
|
||||||
* A fully featured standard library
|
* A fully featured standard library (see below)
|
||||||
* An external script runner utility library
|
* An external script runner utility library
|
||||||
* A threading library
|
* A threading library
|
||||||
* A random generation library (numbers, perlin noise, wave function collapse?)
|
* A random generation library (numbers, perlin noise, wave function collapse?)
|
||||||
|
* A timer library (under development)
|
||||||
* Multiple return values from functions
|
* Multiple return values from functions
|
||||||
* Ternary operator
|
* Ternary operator
|
||||||
* interpolated strings
|
* interpolated strings
|
||||||
@@ -30,6 +31,8 @@ Some of these have always been planned, but were sidelined or are incomplete for
|
|||||||
|
|
||||||
## Planned Standard Library Functions
|
## Planned Standard Library Functions
|
||||||
|
|
||||||
|
This is just random ideas for now, dumped here from another file.
|
||||||
|
|
||||||
* _concat(self: any, x: any): any - This function requires an array or dictionary with a matching type as "x". This function returns a new dictionary instance which contains the contents of the current array or dictionary combined with the contents of "x". In the event of a dictionary key clash, the key-value pair in the current dictionary is included, and the key-value pair from "x" is discarded.
|
* _concat(self: any, x: any): any - This function requires an array or dictionary with a matching type as "x". This function returns a new dictionary instance which contains the contents of the current array or dictionary combined with the contents of "x". In the event of a dictionary key clash, the key-value pair in the current dictionary is included, and the key-value pair from "x" is discarded.
|
||||||
* _containsKey(self: [any : any], k: any): bool - This function returns true if the dictionary contains a key "k", otherwise it returns false.
|
* _containsKey(self: [any : any], k: any): bool - This function returns true if the dictionary contains a key "k", otherwise it returns false.
|
||||||
* _containsValue(self: any, v: any): bool - This function returns true if the array or dictionary contains a value "v", otherwise it returns false.
|
* _containsValue(self: any, v: any): bool - This function returns true if the array or dictionary contains a value "v", otherwise it returns false.
|
||||||
|
|||||||
8
testing-toy.md
Normal file
8
testing-toy.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Testing Toy
|
||||||
|
|
||||||
|
Toy uses GitHub actions for automated testing - all of the tests are under `test/`, and can be executed by running `make test`.
|
||||||
|
|
||||||
|
The tests consist of a number of different situations and edge cases which have been discovered, and should probably be thoroughly tested one way or another. There are also several "-bugfix.toy" scripts which explicitly test a bug that has been encountered in one way or another.
|
||||||
|
|
||||||
|
Finally, the libs that are stored in `repl/` are also tested - their tests are under `/tests/scripts/lib`.
|
||||||
|
|
||||||
Reference in New Issue
Block a user