summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-05-04 10:37:29 -0400
committernodist <kevin.comas.git@gmail.com>2026-05-04 10:37:29 -0400
commitd0698df5d7ded7c65478c923caf11bfa2c5efa68 (patch)
treee52253f58e4f79989960679132158b1dbba25e28 /docs
parent999cd7201314cae520ef3d003e247c88531ce1c4 (diff)
names and literals
Diffstat (limited to 'docs')
-rw-r--r--docs/syntax/index.md57
1 files changed, 49 insertions, 8 deletions
diff --git a/docs/syntax/index.md b/docs/syntax/index.md
index 4343a2f..27160b2 100644
--- a/docs/syntax/index.md
+++ b/docs/syntax/index.md
@@ -2,7 +2,7 @@
---
-##### Code is encoded as UTF-8, allowed glyphs are:
+Code is encoded as UTF-8, allowed glyphs are:
```text
abcdefghijklmnopqrstuvwxyz
@@ -12,26 +12,67 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ
\s\t\n
```
-##### Any UTF-8 glyph is allowed between `""`
+## Comments
```text
-Ω - Invalid code
-"Ω" - Valid code
+// This is a comment until the end of the line
+
+/* Comment block */
```
-## Comments
+## Number Literals
+
+##### Integer
+```text
+12 // Decimal
+0x12 // Hex
+0b10 // Binary
+0o75 // Octal
```
-// This is a comment until the end of the line
-/* Comment block */
+##### Float
+
+```text
+1.2
+1e6
```
+Underscores `_` can separate digits in a number
+
+```test
+100_000
+1.100_000
+```
+
+## String Literals
+
+```text
+"Asdf\n"
+```
+
+Any UTF-8 glyph is allowed between `""`
+
+```text
+Ω // Invalid code
+"Ω" // Valid code
+```
+
+## Variable Names
+
+Start with a lowercase letter
+
+Variables starting with `_` are treated as unused
+
+## Type Names
+
+Start with an uppercase letter
+
## Operators
Represented as an symbol or a keyword starting with \`
-```
+```text
1 + 2
1 `add 2
```