Tweaks and rearrangements

This commit is contained in:
2022-11-12 02:02:26 +11:00
committed by GitHub
parent b0f2767a8f
commit 3219540901
3 changed files with 19 additions and 3 deletions

View File

@@ -43,13 +43,18 @@ print tally(); //3
* [Quick Start Guide](quick-start-guide)
* [Types](types)
* [Standard Library](standard-library)
* ~~Timer Library~~ Under Development
* [Game Engine](game-engine)
# Deep Dive
* [Embedding Toy](embedding-toy)
* [Using Toy](using-toy)
* [Compiling Toy](compiling-toy)
* [Standard Library](standard-library)
* [Developing Toy](developing-toy)
* [Testing Toy](testing-toy)
* [Roadmap](roadmap)
* [Game Engine](game-engine)
# Version Differences

View File

@@ -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:
* A fully featured standard library
* A fully featured standard library (see below)
* An external script runner utility library
* A threading library
* A random generation library (numbers, perlin noise, wave function collapse?)
* A timer library (under development)
* Multiple return values from functions
* Ternary operator
* interpolated strings
@@ -30,6 +31,8 @@ Some of these have always been planned, but were sidelined or are incomplete for
## 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.
* _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.

8
testing-toy.md Normal file
View 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`.