Edit documentation.
This commit is contained in:
6
doc/src/appendix/index.md
Normal file
6
doc/src/appendix/index.md
Normal file
@@ -0,0 +1,6 @@
|
||||
Appendix
|
||||
========
|
||||
|
||||
{{#include ../links.md}}
|
||||
|
||||
This section contains miscellaneous reference materials.
|
30
doc/src/appendix/keywords.md
Normal file
30
doc/src/appendix/keywords.md
Normal file
@@ -0,0 +1,30 @@
|
||||
Keywords List
|
||||
=============
|
||||
|
||||
{{#include ../links.md}}
|
||||
|
||||
| Keyword | Description |
|
||||
| :--------: | ------------------------------------- |
|
||||
| `true` | Boolean true literal |
|
||||
| `false` | Boolean false literal |
|
||||
| `let` | Variable declaration |
|
||||
| `const` | Constant declaration |
|
||||
| `if` | If statement |
|
||||
| `else` | else block of if statement |
|
||||
| `while` | While loop |
|
||||
| `loop` | Infinite loop |
|
||||
| `for` | For loop |
|
||||
| `in` | Containment test, part of for loop |
|
||||
| `continue` | Continue a loop at the next iteration |
|
||||
| `break` | Loop breaking |
|
||||
| `return` | Return value |
|
||||
| `throw` | Throw exception |
|
||||
| `private` | Mark function private |
|
||||
| `import` | Import module |
|
||||
| `export` | Export variable |
|
||||
| `as` | Alias for variable export |
|
||||
| `fn` | Function definition |
|
||||
| `type_of` | Get type name of value |
|
||||
| `print` | Print value |
|
||||
| `debug` | Print value in debug format |
|
||||
| `eval` | Evaluate script |
|
16
doc/src/appendix/literals.md
Normal file
16
doc/src/appendix/literals.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Literals Syntax
|
||||
===============
|
||||
|
||||
{{#include ../links.md}}
|
||||
|
||||
| Type | Literal syntax |
|
||||
| :--------------------------------: | :---------------------------------------: |
|
||||
| `INT` | `42`, `-123`, `0` |
|
||||
| `FLOAT` | `42.0`, `-123.456`, `0.0` |
|
||||
| [String] | `"... \x?? \u???? \U???????? ..."` |
|
||||
| Character | `"... \x?? \u???? \U???????? ..."` |
|
||||
| [`Array`] | `[ ???, ???, ??? ]` |
|
||||
| [Object map] | `#{ a: ???, b: ???, c: ???, "def": ??? }` |
|
||||
| Boolean true | `true` |
|
||||
| Boolean false | `false` |
|
||||
| `Nothing`/`null`/`nil`/`void`/Unit | `()` |
|
30
doc/src/appendix/operators.md
Normal file
30
doc/src/appendix/operators.md
Normal file
@@ -0,0 +1,30 @@
|
||||
Operators
|
||||
=========
|
||||
|
||||
{{#include ../links.md}}
|
||||
|
||||
| Operator | Description | Binary? |
|
||||
| :---------------: | ---------------------------- | :-----: |
|
||||
| `+` | Add | Yes |
|
||||
| `-` | Subtract, Minus | Yes/No |
|
||||
| `*` | Multiply | Yes |
|
||||
| `/` | Divide | Yes |
|
||||
| `%` | Modulo | Yes |
|
||||
| `~` | Power | Yes |
|
||||
| `>>` | Right bit-shift | Yes |
|
||||
| `<<` | Left bit-shift | Yes |
|
||||
| `&` | Bit-wise AND, Boolean AND | Yes |
|
||||
| <code>\|</code> | Bit-wise OR, Boolean OR | Yes |
|
||||
| `^` | Bit-wise XOR | Yes |
|
||||
| `==` | Equals to | Yes |
|
||||
| `~=` | Not equals to | Yes |
|
||||
| `>` | Greater than | Yes |
|
||||
| `>=` | Greater than or equals to | Yes |
|
||||
| `<` | Less than | Yes |
|
||||
| `<=` | Less than or equals to | Yes |
|
||||
| `>=` | Greater than or equals to | Yes |
|
||||
| `&&` | Boolean AND (short-circuits) | Yes |
|
||||
| <code>\|\|</code> | Boolean OR (short-circuits) | Yes |
|
||||
| `~` | Boolean NOT | No |
|
||||
| `[` .. `]` | Indexing | Yes |
|
||||
| `.` | Property access, Method call | Yes |
|
Reference in New Issue
Block a user