diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 99ae358..dca8dde 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,24 +1,29 @@ --- name: Bug Report -about: Create a bug report to help us improve +about: Create a report to help us improve labels: bug --- -## Describe The Bug +## Describe the bug -A clear and concise description of the bug. +A clear and concise description of what the bug is. -## How To Reproduce +## To Reproduce -How did you encounter the bug? Please provide step-by-step details if needed. +Steps to reproduce the behaviour: -## Version +1. run `git pull` on the repository +2. run `make rebuild` on the code +3. ... -What version of Toy is displaying this bug? +You can include some screenshots here if you'd like! -What platform are you operating on? +## Versioning -### Additional Context +- OS: [for example MacOS, Windows, iOS, Android] +- Version: [What version of Toy was this running?] -If there's anything else you'd like to add, please add it here. +### Additional context + +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 112a2ad..38ba323 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,15 +4,14 @@ about: Suggest an idea labels: enhancement --- -### Describe The Feature +### Describe the feature you’d like A clear and concise description of what you’d like to be able to do with Toy. -### Describe The Alternatives +### Describe alternatives you've considered A clear and concise description of any alternative solutions or workarounds you've considered. -### Additional Context - -If there's anything else you'd like to add, please add it here. +### Additional context +Add any other context about the feature request here. \ No newline at end of file diff --git a/.github/workflows/comprehensive-tests.yml b/.github/workflows/comprehensive-tests.yml new file mode 100644 index 0000000..cde6e1f --- /dev/null +++ b/.github/workflows/comprehensive-tests.yml @@ -0,0 +1,30 @@ +#determine the branch name +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +#set the name of the tests +name: Comprehensive Tests; branch ${{ env.BRANCH_NAME }} + +#trigger when these occur +on: + push: + branches: + - ${{env.BRANCH_NAME}} + pull_request: + types: + - opened + - edited + - reopened + branches: + - ${{env.BRANCH_NAME}} + workflow_dispatch: + + +#testing the workflows while nothing is functional yet +jobs: + test-placeholder: + runs-on: ubuntu-latest + + steps: + - name: make test (placeholder) + run: echo "" diff --git a/.github/workflows/tests-full.yml b/.github/workflows/tests-full.yml deleted file mode 100644 index 5e67b6b..0000000 --- a/.github/workflows/tests-full.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Comprehensive Tests, Branch "dev" - -on: - push: - branches: - - dev - pull_request: - branches: - - dev - workflow_dispatch: - -jobs: - test-ubuntu-latest: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Linux Test Environment - run: | - echo CI tests not yet implemented diff --git a/README.md b/README.md index 2507af4..8b29ed0 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ # Toy -The Toy programming language is an imperative, bytecode-interpreted, embedded scripting language. Rather than functioning independently, it serves as part of another program—the ‘host.’ This design allows for straightforward customization by both the host’s developer and end users, achieved by exposing program logic through text files. +The Toy programming language is an imperative, bytecode-interpreted, embedded scripting language. Rather than functioning independently, it serves as part of another program, the "host". This design allows for straightforward customization by both the host’s developer and end users, achieved by exposing program logic through text files. -This repository holds the reference implementation for Toy, written in C. +This repository holds the reference implementation for Toy version 2.x, written in C. # Nifty Features @@ -34,7 +34,7 @@ This repository holds the reference implementation for Toy, written in C. This source code is covered by the zlib license (see [LICENSE](LICENSE)). -# Contributions +# Past and Current Contributors @hiperiondev - Disassembler, porting support and feedback @add00 - Library support @@ -46,4 +46,4 @@ Unnamed Individuals - Feedback * Seth A. Robinson -Special thanks to Robert Nystrom of http://craftinginterpreters.com/ for their fantastic book that set me on this path. \ No newline at end of file +Special thanks to Robert Nystrom of http://craftinginterpreters.com/ for their fantastic book that set me on this path. diff --git a/source/toy_common.c b/source/toy_common.c index efa91bc..3a57f99 100644 --- a/source/toy_common.c +++ b/source/toy_common.c @@ -1,7 +1,7 @@ #include "toy_common.h" -//defined separately, as compilation can take several seconds, invalidating the comparisons of __TIME__ -static const char* build = __DATE__ " " __TIME__ ";development branch"; +//defined separately, as compilation can take several seconds, invalidating the comparisons of the given macros +static const char* build = __DATE__ " " __TIME__ ";incomplete dev branch"; const char* Toy_private_version_build() { return build; diff --git a/source/toy_common.h b/source/toy_common.h index 95fd677..6dbfeef 100644 --- a/source/toy_common.h +++ b/source/toy_common.h @@ -28,10 +28,12 @@ #endif -//bytecode version specifiers +//bytecode version specifiers, embedded as the header #define TOY_VERSION_MAJOR 2 #define TOY_VERSION_MINOR 0 #define TOY_VERSION_PATCH 0 + +//defined as a function, for technical reasons #define TOY_VERSION_BUILD Toy_private_version_build() TOY_API const char* Toy_private_version_build(); diff --git a/source/toy_token_types.h b/source/toy_token_types.h index 299a14d..b47a012 100644 --- a/source/toy_token_types.h +++ b/source/toy_token_types.h @@ -51,13 +51,13 @@ typedef enum Toy_TokenType { TOY_TOKEN_LITERAL_STRING, //math operators - TOY_TOKEN_OPERATOR_PLUS, - TOY_TOKEN_OPERATOR_MINUS, + TOY_TOKEN_OPERATOR_ADD, + TOY_TOKEN_OPERATOR_SUBTRACT, TOY_TOKEN_OPERATOR_MULTIPLY, TOY_TOKEN_OPERATOR_DIVIDE, TOY_TOKEN_OPERATOR_MODULO, - TOY_TOKEN_OPERATOR_PLUS_ASSIGN, - TOY_TOKEN_OPERATOR_MINUS_ASSIGN, + TOY_TOKEN_OPERATOR_ADD_ASSIGN, + TOY_TOKEN_OPERATOR_SUBTRACT_ASSIGN, TOY_TOKEN_OPERATOR_MULTIPLY_ASSIGN, TOY_TOKEN_OPERATOR_DIVIDE_ASSIGN, TOY_TOKEN_OPERATOR_MODULO_ASSIGN, @@ -66,17 +66,8 @@ typedef enum Toy_TokenType { TOY_TOKEN_OPERATOR_ASSIGN, //logical operators - TOY_TOKEN_OPERATOR_COMPARE, - TOY_TOKEN_OPERATOR_NOT_COMPARE, - TOY_TOKEN_OPERATOR_LESS, - TOY_TOKEN_OPERATOR_GREATER, - TOY_TOKEN_OPERATOR_LESS_COMPARE, - TOY_TOKEN_OPERATOR_GREATER_COMPARE, - TOY_TOKEN_OPERATOR_AND, - TOY_TOKEN_OPERATOR_OR, - TOY_TOKEN_OPERATOR_NOT, - - //control operators + TOY_TOKEN_OPERATOR_EQUAL, + TOY_TOKEN_OPERATOR_NOT_EQUAL,_EQUAL TOY_TOKEN_OPERATOR_PAREN_LEFT, TOY_TOKEN_OPERATOR_PAREN_RIGHT, TOY_TOKEN_OPERATOR_BRACKET_LEFT, @@ -90,12 +81,12 @@ typedef enum Toy_TokenType { TOY_TOKEN_OPERATOR_QUESTION, TOY_TOKEN_OPERATOR_COLON, - TOY_TOKEN_OPERATOR_DOT, - TOY_TOKEN_OPERATOR_CONCAT, - TOY_TOKEN_OPERATOR_REST, + TOY_TOKEN_OPERATOR_DOT, // . + TOY_TOKEN_OPERATOR_CONCAT, // .. + TOY_TOKEN_OPERATOR_REST, // ... //unused operators - TOY_TOKEN_OPERATOR_PIPE, + TOY_TOKEN_OPERATOR_PIPE, // | //meta tokens TOY_TOKEN_PASS,