diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-06-02 16:26:09 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-06-02 16:26:09 -0400 |
| commit | b26ad08b39b8229dcea0bafc4a8ba4b0d7ad7154 (patch) | |
| tree | 1a469cc7f1ab2bbf2af42336518fa19ad0d0ed76 /docs/syntax/index.md | |
| parent | ba087e5dbcc50537d82da5dbc602df7292d3f24c (diff) | |
reformat with sync and async calls
Diffstat (limited to 'docs/syntax/index.md')
| -rw-r--r-- | docs/syntax/index.md | 168 |
1 files changed, 0 insertions, 168 deletions
diff --git a/docs/syntax/index.md b/docs/syntax/index.md deleted file mode 100644 index fe97143..0000000 --- a/docs/syntax/index.md +++ /dev/null @@ -1,168 +0,0 @@ -# Code - ---- - -Code is encoded as UTF-8, allowed glyphs are: - -```text -abcdefghijklmnopqrstuvwxyz -ABCDEFGHIJKLMNOPQRSTUVWXYZ -0123456789 -`~!@#$%^&*()-_=+{}[]\|;:'"<>,.?/ -\s\t\n -``` - -# Comments - -```text -// This is a comment until the end of the line - -/* Comment block */ -``` - -# Atoms - -## Number Literals - -```text -12 // Decimal -``` - -##### Integer - -```text -0x12 // Hex -0b10 // Binary -0o75 // Octal -``` - -##### Float - -```text -1.2 -1e6 -``` - -Underscores `_` can separate digits in a number - -```text -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 created with either \`alias or \`unique - -# Operators - -Represented as an symbol or a keyword starting with \` - -```text -1 + 2 -1 `add 2 -``` - -## Operator Conventions - -```text -`operator FIRST - -FIRST `operator SECOND - -FIRST `operator (REST; ...) - -`operator (FIRST; REST; ...) -``` - -# Symbols - -Start with a `.` - -```test -.symbol -``` - -# Lists - -A list of statements between `()` separated by `;` or `\n` - -```text -(1; 2; 3) -``` - -# Definitions - -A list of type definitions between `[]` separated by `;` or `\n` - -```text -Type[arg] -``` - -# Actions - -A list of statements between `{}` separated by `;` or `\n` associated with a conditional - -Arguments are specified with a `[]` at the beginning of the `{}` - -## Conditionals - -#### Loop `@` - -```text -@ condition { statements } - -@ condition {[args] statements } - -@ condition {[.name] statements } - -@ condition {[.name; args] statements } -``` - -#### If `?` - -```text -? condition { statements } - -? { - condition { statements } - { default statements } -} - -? condition {[arg] arg; .... } -``` - -#### Match `#` - -```text -# match { - target { statements } - target {[args] statements } - { default statements } -} -``` - -#### Mutation `^` - -```test -^ mutation {[args] statements } -``` |
