Tweaked tabs-vs-spaces

This commit is contained in:
2025-01-12 11:16:46 +11:00
parent 101833934b
commit 4282268f3d
10 changed files with 82 additions and 77 deletions

View File

@@ -10,19 +10,19 @@ To use the drive system, first you must designate specific folders which can be
#include "drive_system.h"
int main(int argc, char* argv[]) {
//the drive system uses a LiteralDictionary, which must be initialized with this
Toy_initDriveSystem();
//the drive system uses a LiteralDictionary, which must be initialized with this
Toy_initDriveSystem();
Toy_setDrivePath("scripts", "assets/scripts");
Toy_setDrivePath("sprites", "assets/sprites");
Toy_setDrivePath("fonts", "assets/fonts");
Toy_setDrivePath("scripts", "assets/scripts");
Toy_setDrivePath("sprites", "assets/sprites");
Toy_setDrivePath("fonts", "assets/fonts");
//TODO: do you stuff here
//TODO: do you stuff here
//clean up the drive dictionary when you're done
Toy_freeDriveSystem();
//clean up the drive dictionary when you're done
Toy_freeDriveSystem();
return 0;
return 0;
}
```

View File

@@ -91,7 +91,7 @@ Sometimes, native functions will receive `Toy_Literal` identifiers instead of th
```c
Toy_Literal foobarIdn = foobar;
if (TOY_IS_IDENTIFIER(foobar) && Toy_parseIdentifierToValue(interpreter, &foobar)) {
freeLiteral(foobarIdn); //remember to free the identifier
freeLiteral(foobarIdn); //remember to free the identifier
}
```
@@ -101,7 +101,7 @@ This function sets the function called by the `print` keyword. By default, the f
```c
static void printWrapper(const char* output) {
printf("%s\n", output);
printf("%s\n", output);
}
```
@@ -113,7 +113,7 @@ This function sets the function called by the `assert` keyword on failure. By de
```c
static void assertWrapper(const char* output) {
fprintf(stderr, "Assertion failure: %s\n", output);
fprintf(stderr, "Assertion failure: %s\n", output);
}
```
@@ -123,6 +123,6 @@ This function sets the function called when an error occurs within the interpret
```c
static void errorWrapper(const char* output) {
fprintf(stderr, "%s", output); //no newline
fprintf(stderr, "%s", output); //no newline
}
```