From 08a417a66a0fe6e80929fc3c74e9b17d225ac2db Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Fri, 10 Apr 2026 12:30:26 +1000 Subject: [PATCH] Stripped back docs website --- _c_api/output.md | 5 - _c_api/parser.md | 5 - _config.yml | 22 ---- _getting_started/contributions.md | 7 -- _getting_started/quick-start-guide.md | 133 ------------------------ _getting_started/syntax-guide.md | 7 -- _getting_started/tools.md | 7 -- _includes/{elements => }/analytics.html | 0 _includes/elements/attribution.html | 17 --- _includes/elements/chicken.html | 15 --- _includes/elements/title.html | 7 -- _includes/metadata.html | 13 +++ _includes/styles/custom.css | 9 -- _layouts/base.html | 53 ---------- _layouts/default.html | 21 ++++ _layouts/page.html | 59 ----------- _toy_api/placeholder.md | 5 - index.md | 14 +-- 18 files changed, 35 insertions(+), 364 deletions(-) delete mode 100644 _c_api/output.md delete mode 100644 _c_api/parser.md delete mode 100644 _getting_started/contributions.md delete mode 100644 _getting_started/quick-start-guide.md delete mode 100644 _getting_started/syntax-guide.md delete mode 100644 _getting_started/tools.md rename _includes/{elements => }/analytics.html (100%) delete mode 100644 _includes/elements/attribution.html delete mode 100644 _includes/elements/chicken.html delete mode 100644 _includes/elements/title.html create mode 100644 _includes/metadata.html delete mode 100644 _includes/styles/custom.css delete mode 100644 _layouts/base.html create mode 100644 _layouts/default.html delete mode 100644 _layouts/page.html delete mode 100644 _toy_api/placeholder.md diff --git a/_c_api/output.md b/_c_api/output.md deleted file mode 100644 index 6e3b426..0000000 --- a/_c_api/output.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: page ---- - -Watch this space. \ No newline at end of file diff --git a/_c_api/parser.md b/_c_api/parser.md deleted file mode 100644 index 6e3b426..0000000 --- a/_c_api/parser.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: page ---- - -Watch this space. \ No newline at end of file diff --git a/_config.yml b/_config.yml index 5f0e1d3..33611e8 100644 --- a/_config.yml +++ b/_config.yml @@ -2,25 +2,3 @@ title: The Toy Programming Language description: Documentation For The Toy Programming Language keywords: programming,coding author: Kayne Ruse (Ratstail91) - -collections: - getting_started: - output: true - title: Getting Started - permalink: "/:collection/:path/" - tab-order: 1 - toy_api: - output: true - title: Toy API - permalink: "/:collection/:path/" - tab-order: 2 - c_api: - output: true - title: C API - permalink: "/:collection/:path/" - tab-order: 3 - -plugins: - - jekyll-remote-theme - -remote_theme: pixeldroid/programming-pages diff --git a/_getting_started/contributions.md b/_getting_started/contributions.md deleted file mode 100644 index 17f0fe7..0000000 --- a/_getting_started/contributions.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -layout: page -title: Contributions -order: 4 ---- - -Watch this space. diff --git a/_getting_started/quick-start-guide.md b/_getting_started/quick-start-guide.md deleted file mode 100644 index 9c7dad2..0000000 --- a/_getting_started/quick-start-guide.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -layout: page -title: Toy v2 Quick-Start Guide -order: 1 ---- - -# Toy v2 Quick-Start Guide - -To help you start using Toy as fast as possible, here are the most useful elements of the language. Not everything available is listed, but this should let you start coding right away. - -## Keyword 'print' - -The `print` keyword takes one value as a parameter, which is sent to stdout by default, or can be redirected elsewhere using the [output C API](/c_api/output). - -``` -print "Hello World!"; -``` - -## Keyword 'assert' - -The `assert` keyword takes two values as parameters, separated by a comma. If the first value is falsy or `null`, the optional second parameter is sent to stderr by default, or can be redirected elsewhere using the [output C API](/c_api/output). If no second parameter is provided, a generic message is used instead. - -An option to disable the `assert` keyword during compilation is provided in the [parser C API](/c_api/parser). - -``` -//nothing happens -assert 1 < 2; - -//this assert will fail, and output the second parameter -assert null, "Hello world!"; -``` - -## Variables and Types - -Values can be stored in variables, by specifying a name with the `var` keyword. The name can be declared with an optional type, which restricts the type of value that can be stored in the name. If no type is specified, `any` is used instead. - -``` -var answer = 42; - -var question: string = "How many roads must a man walk down?"; -``` - -To make a variable immutable, you can add the `const` keyword after the type when it's declared. If you do, it must be assigned a value. - -``` -var quote: string const = "War. War never changes."; -``` - -The types available in Toy are: - -| type | name | description | -| --- | --- | --- | -| `bool` | boolean | Either `true` or `false`. | -| `int` | integer | Any whole number (32-bits). | -| `float` | float | A decimal number (32-bits), using floating-point arithmetic. | -| `string` | string | A piece of text, supports UTF-8, [in theory](https://github.com/krgamestudios/Toy/issues/174). | -| `array` | array | A series of values stored sequentially in memory. | -| `table` | table | A series key-value pairs stored in such a way that allows for fast lookups. Booleans, functions, opaques and `null` can't be used as keys. | -| `function` | function | A chunk of reusable code that takes zero or more parameters, and returns zero or more results. Functions are declared with the `fn` keyword. | -| `opaque` | opaque | This value is unusable in the script, but can be passed from one imported function to another. | -| `any` | any | The default type when nothing is specified. Theis can hold any value. | - -*Note: Arrays, tables, functions and opaques are not fully implemented at the time of writing, so details may change.* - -## Control Flow - -Choosing an option, or repeating a chunk of code multiple times, is essential for any general purpose language. - -Choosing between two options can be done with the `if-then-else` else statement. If the condition is truthy, the 'then-branch' will be executed. Otherwise, the optional 'else-branch' is executed instead. - -``` -var answer = 42; - -if (answer < 56) { - print "Cod dang it!"; -} -else { - print "Something's fishy here..."; -} -``` - -``` -var challenge = "hard"; - -if (challenge == "hard") { - print "I choose to build a scripting language, not because it's easy, but because it's hard!"; -} - -//the else-branch is optional -``` - -To repeat a certain action, use the `while-then` loop, which repeats the body as long as the condition is true at the beginning of each loop. - -``` -var loops = 0; - -while (loops++ < 8) { - print "These episodes are endless."; -} -``` - -To break out of a loop, you can use the `break` keyword. Alternatively, to restart the loop early, use the `continue` keyword. - -``` -var loops = 0; - -while (true) { - if (++loops < 15532) { - continue; - } - - break; //poor yuki ;_; -} -``` - -*Note: The `for` loop is coming, eventually, but isn't vital right now.* - -## Arrays and Tables - -Watch this space. - -## Functions - -Watch this space. - -## External Libraries and Extending Toy - -Watch this space. - -## Reserved Keywords & Operators - -Watch this space. - diff --git a/_getting_started/syntax-guide.md b/_getting_started/syntax-guide.md deleted file mode 100644 index d7fd5d7..0000000 --- a/_getting_started/syntax-guide.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -layout: page -title: Syntax Guide -order: 2 ---- - -Watch this space. diff --git a/_getting_started/tools.md b/_getting_started/tools.md deleted file mode 100644 index 5c8215e..0000000 --- a/_getting_started/tools.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -layout: page -title: Tools Guide -order: 3 ---- - -Watch this space. diff --git a/_includes/elements/analytics.html b/_includes/analytics.html similarity index 100% rename from _includes/elements/analytics.html rename to _includes/analytics.html diff --git a/_includes/elements/attribution.html b/_includes/elements/attribution.html deleted file mode 100644 index dc24e92..0000000 --- a/_includes/elements/attribution.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - -
- -
- GH Pages Theme adapted from Programming Pages. -
\ No newline at end of file diff --git a/_includes/elements/chicken.html b/_includes/elements/chicken.html deleted file mode 100644 index 4a5fb80..0000000 --- a/_includes/elements/chicken.html +++ /dev/null @@ -1,15 +0,0 @@ -
- -

🐔

-
\ No newline at end of file diff --git a/_includes/elements/title.html b/_includes/elements/title.html deleted file mode 100644 index 21d2405..0000000 --- a/_includes/elements/title.html +++ /dev/null @@ -1,7 +0,0 @@ -{% include icon.liquid id='bars' %} Menu - -{% include icon.liquid id='home' %} Home - -
-{{ site.title }} -
\ No newline at end of file diff --git a/_includes/metadata.html b/_includes/metadata.html new file mode 100644 index 0000000..b8b79de --- /dev/null +++ b/_includes/metadata.html @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/_includes/styles/custom.css b/_includes/styles/custom.css deleted file mode 100644 index 5280708..0000000 --- a/_includes/styles/custom.css +++ /dev/null @@ -1,9 +0,0 @@ -@media only screen and (max-width: 768px) { - .custom-mobile-hide { - display: none !important; - } -} - -.ui.segment { - overflow-x: unset; -} diff --git a/_layouts/base.html b/_layouts/base.html deleted file mode 100644 index 9719582..0000000 --- a/_layouts/base.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -layout: compress ---- - - - - - - - - - - - -{{ page.title }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{% include elements/analytics.html %} - - - -{{ content }} - - - \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..1f1e8e2 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,21 @@ + + + + + + + + + + +{{ page.title }} + +{% include metadata.html %} +{% include analytics.html %} + + + +{{ content }} + + + \ No newline at end of file diff --git a/_layouts/page.html b/_layouts/page.html deleted file mode 100644 index 0cfa924..0000000 --- a/_layouts/page.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -layout: base -theme_version: 0.5.22 -theme_url: https://github.com/pixeldroid/programming-pages ---- - - - - - - - - -
- -
- - -
- - -
-
-
-{{ content }} -
- - - -
-{% include elements/attribution.html %} -
-
-
- -
- - - - - \ No newline at end of file diff --git a/_toy_api/placeholder.md b/_toy_api/placeholder.md deleted file mode 100644 index 6e3b426..0000000 --- a/_toy_api/placeholder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: page ---- - -Watch this space. \ No newline at end of file diff --git a/index.md b/index.md index c7502e6..c93b103 100644 --- a/index.md +++ b/index.md @@ -3,8 +3,6 @@ layout: page title: The Toy Programming Language --- -{% include elements/chicken.html %} -
@@ -15,15 +13,5 @@ title: The Toy Programming Language 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. -This website presents the documentation for Toy version 2.x. - -## Nifty Features - -* Simple C-like/JS-like syntax -* Intermediate AST representation -* Strong, but optional type system -* First-class functions and closures -* Extensible with importable native code -* Can re-direct output, error and assert failure messages -* Open-Source under the zlib license +The documdentation on this website is under construction, for further information, see the repository on GitHub: [https://github.com/krgamestudios/Toy](https://github.com/krgamestudios/Toy).