mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-05-05 16:30:17 +10:00
Initial commit with a few basic files
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
This git branch is the documentation and specification for The Toy Programming Language version 2.x, which can be found at [https://github.com/Ratstail91/Toy](https://github.com/Ratstail91/Toy).
|
||||
|
||||
Toy v2.x is still under active development, so this documentation will change and evolve over time, and may not reflect the current reference implementation.
|
||||
|
||||
The docs can be found [here](docs/index.md).
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Introduction
|
||||
|
||||
[](https://github.com/Ratstail91/Toy/actions/workflows/continuous-integration-v2.yml)
|
||||
|
||||
The Toy Programming Language is an imperative, bytecode-interpreted, embeddable 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 developers and end users, achieved by exposing program logic through text files.
|
||||
|
||||
The reference implementation can be found on [GitHub](https://github.com/Ratstail91/Toy).
|
||||
|
||||
[Reserved Words](reserved-words.md)
|
||||
[Operators](operators.md)
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Operators
|
||||
|
||||
The following table lists the recognized operators, and their uses.
|
||||
|
||||
| Symbol | Description |
|
||||
| --- | --- |
|
||||
| `+` | Add. TODO |
|
||||
| `-` | Subtract. TODO |
|
||||
| `*` | Multiply. TODO |
|
||||
| `/` | Divide. TODO |
|
||||
| `%` | Modulo. TODO |
|
||||
| `=` | Assign. TODO |
|
||||
| `+=` | Add Assign. TODO |
|
||||
| `-=` | Subtract Assign. TODO |
|
||||
| `*=` | Multiply Assign. TODO |
|
||||
| `/=` | Divide Assign. TODO |
|
||||
| `%=` | Modulo Assign. TODO |
|
||||
| `++` | Increment. TODO |
|
||||
| `--` | Decrement. TODO |
|
||||
| `==` | Compare Equal. TODO |
|
||||
| `!=` | Compare Not Equal. TODO |
|
||||
| `<` | Compare Less. TODO |
|
||||
| `<=` | Compare Less Equal. TODO |
|
||||
| `>` | Compare Greater. TODO |
|
||||
| `>=` | Compare Greater Equal. TODO |
|
||||
| `(` `)` | Parenthesis. TODO |
|
||||
| `[` `]` | Brackets. TODO |
|
||||
| `{` `}` | Braces. TODO |
|
||||
| `&&` | And. TODO |
|
||||
| `\|\|` | Or. TODO |
|
||||
| `!` | Not. TODO |
|
||||
| `?` `:` | Ternary. TODO |
|
||||
| `:` | Colon. TODO |
|
||||
| `.` | Dot. TODO |
|
||||
| `..` | Concatenate. TODO |
|
||||
| `...` | Rest. TODO |
|
||||
| `&` | Ampersand. Not used. |
|
||||
| `\|` | Pipe. Not used. |
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Reserved Words
|
||||
|
||||
The following list of words have special meaning to the language, so they can't be used as names for variables or functions.
|
||||
|
||||
```txt
|
||||
any
|
||||
as
|
||||
assert
|
||||
bool
|
||||
break
|
||||
class
|
||||
const
|
||||
continue
|
||||
do
|
||||
else
|
||||
export
|
||||
false
|
||||
float
|
||||
fn
|
||||
for
|
||||
foreach
|
||||
if
|
||||
import
|
||||
in
|
||||
int
|
||||
null
|
||||
of
|
||||
opaque
|
||||
print
|
||||
return
|
||||
string
|
||||
true
|
||||
type
|
||||
typeas
|
||||
typeof
|
||||
var
|
||||
while
|
||||
yield
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user