mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Tweaked README.md, and some comments
I have an idea for the data structures...
This commit is contained in:
31
README.md
31
README.md
@@ -13,47 +13,44 @@ This repository holds the reference implementation for Toy version 2.x, written
|
||||
# Nifty Features
|
||||
|
||||
* Simple C-like syntax
|
||||
* Intermediate AST and bytecode
|
||||
* Intermediate AST representation and bytecode formats
|
||||
* Strong, but optional type system
|
||||
* First-class and higher-order functions
|
||||
* Extensible via external libraries
|
||||
* Can re-direct output, error and assertion failure messages
|
||||
* Open source under the zlib license
|
||||
|
||||
## Syntax
|
||||
# Syntax
|
||||
|
||||
*Omitted for review.*
|
||||
*Coming Soon.*
|
||||
|
||||
## Building
|
||||
# Building
|
||||
|
||||
Supported platforms are: `linux-latest`, `windows-latest`, `macos-latest`, using [GitHub's standard runners](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories).
|
||||
|
||||
To build the library, run `make source`.
|
||||
|
||||
To build the library and repl, run `make repl`.
|
||||
|
||||
To build and run the test cases, run `make tests`.
|
||||
|
||||
To build and run the test cases under gdb, run `make tests-gdb`.
|
||||
|
||||
## Tools
|
||||
# Tools
|
||||
|
||||
*Omitted for review.*
|
||||
*Coming Soon.*
|
||||
|
||||
# License
|
||||
|
||||
This source code is covered by the zlib license (see [LICENSE](LICENSE)).
|
||||
|
||||
# Past and Current Contributors
|
||||
# Contributors and Special Thanks
|
||||
|
||||
@hiperiondev - Disassembler, porting support and feedback
|
||||
@add00 - Library support
|
||||
@gruelingpine185 - Unofficial MacOS support
|
||||
@solar-mist - Minor bugfixes
|
||||
Unnamed Individuals - Feedback
|
||||
@hiperiondev - v1 Disassembler, v1 porting support and feedback
|
||||
@add00 - v1 Library support
|
||||
@gruelingpine185 - Unofficial v1 MacOS support
|
||||
@solar-mist - v1 Minor bugfixes
|
||||
The Ratbags - Feedback
|
||||
@munificent - For [writing the book](http://craftinginterpreters.com/) that sparked my interest in langdev
|
||||
|
||||
# Patrons via Patreon
|
||||
# Patreon Contributors
|
||||
|
||||
* Seth A. Robinson
|
||||
|
||||
Special thanks to Robert Nystrom of http://craftinginterpreters.com/ for their fantastic book that set me on this path.
|
||||
|
||||
@@ -15,20 +15,20 @@ typedef enum Toy_ValueType {
|
||||
} Toy_ValueType;
|
||||
|
||||
//8 bytes in size
|
||||
typedef struct Toy_Value {
|
||||
typedef struct Toy_Value { //32 | 64 BITNESS
|
||||
union {
|
||||
bool boolean; //1
|
||||
int integer; //4
|
||||
float number; //4
|
||||
bool boolean; //1 | 1
|
||||
int integer; //4 | 4
|
||||
float number; //4 | 4
|
||||
//TODO: strings
|
||||
//TODO: arrays
|
||||
//TODO: dictonaries
|
||||
//TODO: functions
|
||||
//TODO: opaque
|
||||
} as; //4
|
||||
} as; //4 | 4
|
||||
|
||||
Toy_ValueType type; //4
|
||||
} Toy_Value; //8
|
||||
Toy_ValueType type; //4 | 4
|
||||
} Toy_Value; //8 | 8
|
||||
|
||||
#define TOY_VALUE_IS_NULL(value) ((value).type == TOY_VALUE_NULL)
|
||||
#define TOY_VALUE_IS_BOOLEAN(value) ((value).type == TOY_VALUE_BOOLEAN)
|
||||
|
||||
Reference in New Issue
Block a user