diff --git a/README.md b/README.md index d77e590..4b06c76 100644 --- a/README.md +++ b/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, 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`. -To build the library and repl, run `make repl`. +# Tools -To build and run the test cases, run `make tests`. - -To build and run the test cases under gdb, run `make tests-gdb`. - -## 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. diff --git a/source/toy_value.h b/source/toy_value.h index 81a59b4..ecd39b0 100644 --- a/source/toy_value.h +++ b/source/toy_value.h @@ -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)