mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Squashed commit of the following:
commit 633500eeaf72e7e5aed90f3eb071f56d93e129eb Author: Kayne Ruse <kayneruse@gmail.com> Date: Fri Aug 9 23:16:55 2024 +1000 Please work... commit 4b524a27fd1fe11e02206853b84bdfb349be5bf9 Author: Kayne Ruse <kayneruse@gmail.com> Date: Fri Aug 9 22:57:07 2024 +1000 This is starting to get annoying. commit 5e16a87f6cef7ca9eb536bcc172fd4a184c20124 Author: Kayne Ruse <kayneruse@gmail.com> Date: Fri Aug 9 22:38:31 2024 +1000 Fixed workflow file Used this: https://rhysd.github.io/actionlint/ commit 7fd6dd610ee3e9327350859b047b0c4792e74f19 Author: Kayne Ruse <kayneruse@gmail.com> Date: Fri Aug 9 22:30:50 2024 +1000 Let's try again commit d83b42a894929f926ba5bf94dee8a2a495a4db86 Author: Kayne Ruse <kayneruse@gmail.com> Date: Fri Aug 9 22:27:36 2024 +1000 Reworked the CI Also checked over the new code.
This commit is contained in:
25
.github/ISSUE_TEMPLATE/bug_report.md
vendored
25
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,24 +1,29 @@
|
|||||||
---
|
---
|
||||||
name: Bug Report
|
name: Bug Report
|
||||||
about: Create a bug report to help us improve
|
about: Create a report to help us improve
|
||||||
labels: bug
|
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.
|
||||||
|
|
||||||
|
|||||||
9
.github/ISSUE_TEMPLATE/feature_request.md
vendored
9
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -4,15 +4,14 @@ about: Suggest an idea
|
|||||||
labels: enhancement
|
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.
|
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.
|
A clear and concise description of any alternative solutions or workarounds you've considered.
|
||||||
|
|
||||||
### Additional Context
|
### Additional context
|
||||||
|
|
||||||
If there's anything else you'd like to add, please add it here.
|
|
||||||
|
|
||||||
|
Add any other context about the feature request here.
|
||||||
30
.github/workflows/comprehensive-tests.yml
vendored
Normal file
30
.github/workflows/comprehensive-tests.yml
vendored
Normal file
@@ -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 ""
|
||||||
20
.github/workflows/tests-full.yml
vendored
20
.github/workflows/tests-full.yml
vendored
@@ -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
|
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
# Toy
|
# 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
|
# 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)).
|
This source code is covered by the zlib license (see [LICENSE](LICENSE)).
|
||||||
|
|
||||||
# Contributions
|
# Past and Current Contributors
|
||||||
|
|
||||||
@hiperiondev - Disassembler, porting support and feedback
|
@hiperiondev - Disassembler, porting support and feedback
|
||||||
@add00 - Library support
|
@add00 - Library support
|
||||||
@@ -46,4 +46,4 @@ Unnamed Individuals - Feedback
|
|||||||
|
|
||||||
* Seth A. Robinson
|
* Seth A. Robinson
|
||||||
|
|
||||||
Special thanks to Robert Nystrom of http://craftinginterpreters.com/ for their fantastic book that set me on this path.
|
Special thanks to Robert Nystrom of http://craftinginterpreters.com/ for their fantastic book that set me on this path.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "toy_common.h"
|
#include "toy_common.h"
|
||||||
|
|
||||||
//defined separately, as compilation can take several seconds, invalidating the comparisons of __TIME__
|
//defined separately, as compilation can take several seconds, invalidating the comparisons of the given macros
|
||||||
static const char* build = __DATE__ " " __TIME__ ";development branch";
|
static const char* build = __DATE__ " " __TIME__ ";incomplete dev branch";
|
||||||
|
|
||||||
const char* Toy_private_version_build() {
|
const char* Toy_private_version_build() {
|
||||||
return build;
|
return build;
|
||||||
|
|||||||
@@ -28,10 +28,12 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//bytecode version specifiers
|
//bytecode version specifiers, embedded as the header
|
||||||
#define TOY_VERSION_MAJOR 2
|
#define TOY_VERSION_MAJOR 2
|
||||||
#define TOY_VERSION_MINOR 0
|
#define TOY_VERSION_MINOR 0
|
||||||
#define TOY_VERSION_PATCH 0
|
#define TOY_VERSION_PATCH 0
|
||||||
|
|
||||||
|
//defined as a function, for technical reasons
|
||||||
#define TOY_VERSION_BUILD Toy_private_version_build()
|
#define TOY_VERSION_BUILD Toy_private_version_build()
|
||||||
TOY_API const char* Toy_private_version_build();
|
TOY_API const char* Toy_private_version_build();
|
||||||
|
|
||||||
|
|||||||
@@ -51,13 +51,13 @@ typedef enum Toy_TokenType {
|
|||||||
TOY_TOKEN_LITERAL_STRING,
|
TOY_TOKEN_LITERAL_STRING,
|
||||||
|
|
||||||
//math operators
|
//math operators
|
||||||
TOY_TOKEN_OPERATOR_PLUS,
|
TOY_TOKEN_OPERATOR_ADD,
|
||||||
TOY_TOKEN_OPERATOR_MINUS,
|
TOY_TOKEN_OPERATOR_SUBTRACT,
|
||||||
TOY_TOKEN_OPERATOR_MULTIPLY,
|
TOY_TOKEN_OPERATOR_MULTIPLY,
|
||||||
TOY_TOKEN_OPERATOR_DIVIDE,
|
TOY_TOKEN_OPERATOR_DIVIDE,
|
||||||
TOY_TOKEN_OPERATOR_MODULO,
|
TOY_TOKEN_OPERATOR_MODULO,
|
||||||
TOY_TOKEN_OPERATOR_PLUS_ASSIGN,
|
TOY_TOKEN_OPERATOR_ADD_ASSIGN,
|
||||||
TOY_TOKEN_OPERATOR_MINUS_ASSIGN,
|
TOY_TOKEN_OPERATOR_SUBTRACT_ASSIGN,
|
||||||
TOY_TOKEN_OPERATOR_MULTIPLY_ASSIGN,
|
TOY_TOKEN_OPERATOR_MULTIPLY_ASSIGN,
|
||||||
TOY_TOKEN_OPERATOR_DIVIDE_ASSIGN,
|
TOY_TOKEN_OPERATOR_DIVIDE_ASSIGN,
|
||||||
TOY_TOKEN_OPERATOR_MODULO_ASSIGN,
|
TOY_TOKEN_OPERATOR_MODULO_ASSIGN,
|
||||||
@@ -66,17 +66,8 @@ typedef enum Toy_TokenType {
|
|||||||
TOY_TOKEN_OPERATOR_ASSIGN,
|
TOY_TOKEN_OPERATOR_ASSIGN,
|
||||||
|
|
||||||
//logical operators
|
//logical operators
|
||||||
TOY_TOKEN_OPERATOR_COMPARE,
|
TOY_TOKEN_OPERATOR_EQUAL,
|
||||||
TOY_TOKEN_OPERATOR_NOT_COMPARE,
|
TOY_TOKEN_OPERATOR_NOT_EQUAL,_EQUAL
|
||||||
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_PAREN_LEFT,
|
TOY_TOKEN_OPERATOR_PAREN_LEFT,
|
||||||
TOY_TOKEN_OPERATOR_PAREN_RIGHT,
|
TOY_TOKEN_OPERATOR_PAREN_RIGHT,
|
||||||
TOY_TOKEN_OPERATOR_BRACKET_LEFT,
|
TOY_TOKEN_OPERATOR_BRACKET_LEFT,
|
||||||
@@ -90,12 +81,12 @@ typedef enum Toy_TokenType {
|
|||||||
TOY_TOKEN_OPERATOR_QUESTION,
|
TOY_TOKEN_OPERATOR_QUESTION,
|
||||||
TOY_TOKEN_OPERATOR_COLON,
|
TOY_TOKEN_OPERATOR_COLON,
|
||||||
|
|
||||||
TOY_TOKEN_OPERATOR_DOT,
|
TOY_TOKEN_OPERATOR_DOT, // .
|
||||||
TOY_TOKEN_OPERATOR_CONCAT,
|
TOY_TOKEN_OPERATOR_CONCAT, // ..
|
||||||
TOY_TOKEN_OPERATOR_REST,
|
TOY_TOKEN_OPERATOR_REST, // ...
|
||||||
|
|
||||||
//unused operators
|
//unused operators
|
||||||
TOY_TOKEN_OPERATOR_PIPE,
|
TOY_TOKEN_OPERATOR_PIPE, // |
|
||||||
|
|
||||||
//meta tokens
|
//meta tokens
|
||||||
TOY_TOKEN_PASS,
|
TOY_TOKEN_PASS,
|
||||||
|
|||||||
Reference in New Issue
Block a user