From 0b885d0a3011ba87021248b175c8cdab6fdbbf6d Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Thu, 16 Feb 2023 21:44:06 +1100 Subject: [PATCH] Sorted out some folders for the docs --- building-toy.md => deep-dive/building-toy.md | 0 .../compiling-toy.md | 2 +- .../developing-toy.md | 0 .../embedding-toy.md | 2 +- roadmap.md => deep-dive/roadmap.md | 0 testing-toy.md => deep-dive/testing-toy.md | 0 .../theorizing-toy.md | 0 .../about-library.md | 0 .../game-engine.md | 0 .../quick-start-guide.md | 0 .../runner-library.md | 0 .../standard-library.md | 0 types.md => getting-started/types.md | 0 README.md => index.md | 45 +++++++++++------- timer-library.md | 46 ------------------- 15 files changed, 30 insertions(+), 65 deletions(-) rename building-toy.md => deep-dive/building-toy.md (100%) rename compiling-toy.md => deep-dive/compiling-toy.md (91%) rename developing-toy.md => deep-dive/developing-toy.md (100%) rename embedding-toy.md => deep-dive/embedding-toy.md (96%) rename roadmap.md => deep-dive/roadmap.md (100%) rename testing-toy.md => deep-dive/testing-toy.md (100%) rename theorizing-toy.md => deep-dive/theorizing-toy.md (100%) rename about-library.md => getting-started/about-library.md (100%) rename game-engine.md => getting-started/game-engine.md (100%) rename quick-start-guide.md => getting-started/quick-start-guide.md (100%) rename runner-library.md => getting-started/runner-library.md (100%) rename standard-library.md => getting-started/standard-library.md (100%) rename types.md => getting-started/types.md (100%) rename README.md => index.md (66%) delete mode 100644 timer-library.md diff --git a/building-toy.md b/deep-dive/building-toy.md similarity index 100% rename from building-toy.md rename to deep-dive/building-toy.md diff --git a/compiling-toy.md b/deep-dive/compiling-toy.md similarity index 91% rename from compiling-toy.md rename to deep-dive/compiling-toy.md index caed928..71bcd00 100644 --- a/compiling-toy.md +++ b/deep-dive/compiling-toy.md @@ -1,6 +1,6 @@ # Compiling Toy -This tutorial is a sub-section of [Embedding Toy](embedding-toy) that has been spun off into it's own page for the sake of brevity/sanity. It's recommended that you read the main article first. +This tutorial is a sub-section of [Embedding Toy](deep-dive/embedding-toy) that has been spun off into it's own page for the sake of brevity/sanity. It's recommended that you read the main article first. The exact phases outlined here are entirely implementation-dependent - that is, they aren't required, and are simply how the canonical version of Toy works. diff --git a/developing-toy.md b/deep-dive/developing-toy.md similarity index 100% rename from developing-toy.md rename to deep-dive/developing-toy.md diff --git a/embedding-toy.md b/deep-dive/embedding-toy.md similarity index 96% rename from embedding-toy.md rename to deep-dive/embedding-toy.md index ba904b8..7b6ba5e 100644 --- a/embedding-toy.md +++ b/deep-dive/embedding-toy.md @@ -1,6 +1,6 @@ # Embedding Toy -This tutorial assumes that you've managed to embed Toy into your program by following the tutorial [Building Toy](building-toy). +This tutorial assumes that you've managed to embed Toy into your program by following the tutorial [Building Toy](deep-dive/building-toy). Here, we'll look at some ways in which you can utilize Toy's C API within your host program. diff --git a/roadmap.md b/deep-dive/roadmap.md similarity index 100% rename from roadmap.md rename to deep-dive/roadmap.md diff --git a/testing-toy.md b/deep-dive/testing-toy.md similarity index 100% rename from testing-toy.md rename to deep-dive/testing-toy.md diff --git a/theorizing-toy.md b/deep-dive/theorizing-toy.md similarity index 100% rename from theorizing-toy.md rename to deep-dive/theorizing-toy.md diff --git a/about-library.md b/getting-started/about-library.md similarity index 100% rename from about-library.md rename to getting-started/about-library.md diff --git a/game-engine.md b/getting-started/game-engine.md similarity index 100% rename from game-engine.md rename to getting-started/game-engine.md diff --git a/quick-start-guide.md b/getting-started/quick-start-guide.md similarity index 100% rename from quick-start-guide.md rename to getting-started/quick-start-guide.md diff --git a/runner-library.md b/getting-started/runner-library.md similarity index 100% rename from runner-library.md rename to getting-started/runner-library.md diff --git a/standard-library.md b/getting-started/standard-library.md similarity index 100% rename from standard-library.md rename to getting-started/standard-library.md diff --git a/types.md b/getting-started/types.md similarity index 100% rename from types.md rename to getting-started/types.md diff --git a/README.md b/index.md similarity index 66% rename from README.md rename to index.md index 64f2314..7c2907f 100644 --- a/README.md +++ b/index.md @@ -41,24 +41,35 @@ print tally(); //3 # Getting Started -* [Quick Start Guide](quick-start-guide) -* [Types](types) -* [About Library](about-library) -* [Standard Library](standard-library) -* [Runner Library](runner-library) -* [Game Engine](game-engine) - -# Full C API - -* Coming Soon! (check out the [Embedding Toy](embedding-toy) page for a brief description for now) +* [Quick Start Guide](geting-started/quick-start-guide) +* [Types](geting-started/types) +* [About Library](geting-started/about-library) +* [Standard Library](geting-started/standard-library) +* [Runner Library](geting-started/runner-library) +* [Game Engine](geting-started/game-engine) # Deep Dive -* [Theorizing Toy](theorizing-toy) -* [Building Toy](building-toy) -* [Embedding Toy](embedding-toy) -* [Compiling Toy](compiling-toy) -* [Developing Toy](developing-toy) -* [Testing Toy](testing-toy) -* [Roadmap](roadmap) +* [Theorizing Toy](deep-dive/theorizing-toy) +* [Building Toy](deep-dive/building-toy) +* [Embedding Toy](deep-dive/embedding-toy) +* [Compiling Toy](deep-dive/compiling-toy) +* [Developing Toy](deep-dive/developing-toy) +* [Testing Toy](deep-dive/testing-toy) +* [Roadmap](deep-dive/roadmap) + +# Full C API + +* [toy_ast_node.h] +* [toy_common.h] +* [toy_compiler.h] +* [toy_interpreter.h] +* [toy_lexer.h] +* [toy_literal_array.h] +* [toy_literal_dictionary.h] +* [toy_literal.h] +* [toy_memory.h] +* [toy_parser.h] +* [toy_refstring.h] +* [toy_scope.h] diff --git a/timer-library.md b/timer-library.md deleted file mode 100644 index b46150e..0000000 --- a/timer-library.md +++ /dev/null @@ -1,46 +0,0 @@ -# Timer Library - -The timer library offers a series of utility functions for generating and manipulating timers, which can be used for recording or initiating timed events. Please be aware that "timers" are opaque objects, which must be destroyed when you're done with them, otherwise you'll have a memory leak in your program. - -These functions are implemented by the host program, so they may not all be provided by default. - -The timer library can usually be accessed with the `import` keyword: - -``` -import timer; -``` - -## startTimer() - -This function returns an `opaque` timer object, representing the point in time when the function was called. - -## _stopTimer(self: opaque) - -This function returns an `opaque` timer object, representing the duration between when the `self` argument was created, and when this function was called. - -## createTimer(seconds: int, microseconds: int) - -This function returns an `opaque` timer object, with seconds and microseconds set to the given values. To give a negative value between 0 and -1, give a negative value for microseconds (negative 0 is not a thing in Toy). - -Please note that `microseconds` has upper and lower bounds of -1,000,000 to 1,000,000. Also, if seconds has a non-zero value, then microseconds has a lower bounds of 0 instead. - -## _getTimerSeconds(self: opaque) - -This function returns an integer value, representing the seconds value of the timer object. - -## _getTimerMicroseconds(self: opaque) - -This function returns an integer value, representing the seconds value of the timer object. - -## _compareTimer(self: opaque, other: opaque) - -This function returns an `opaque` timer object, representing the duration between the `self` and `other` arguments. The return value may be negative. - -## _timerToString(self: opaque) - -This function returns a string representation of the `self` argument, which can be casted into other basic [types](types). - -## _destroyTimer(self: opaque) - -This function cleans up the memory of the `self` timer object. -