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 | |
| parent | ba087e5dbcc50537d82da5dbc602df7292d3f24c (diff) | |
reformat with sync and async calls
Diffstat (limited to 'docs/syntax')
| -rw-r--r-- | docs/syntax/index.md | 168 | ||||
| -rw-r--r-- | docs/syntax/operators.md | 69 |
2 files changed, 0 insertions, 237 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 } -``` diff --git a/docs/syntax/operators.md b/docs/syntax/operators.md deleted file mode 100644 index dc518ab..0000000 --- a/docs/syntax/operators.md +++ /dev/null @@ -1,69 +0,0 @@ -# General Operators - ---- - -## Assign `:` - -## Shadow `::` - -## Cast `$` - -## ``print` - -```text -Result[I32] : Is[File; Void] `print Any -``` - -If no `File` is specified the output is send to `stdout` - -## ``format` - -```text -Result[String] : Const[String]`format Any -``` - -### Formatting - -#### Replace - -Use `%` to indicate an item from `Any`, use `\%` for a literal `%` - -#### Colors - -Use `#NAME#` to change the text color, use `#` to reset the text color, use `\#` for a literal `#` - -```text -BOLD -FAINT -ITALIC -UNDERLINE - UL - -BACKGROUND - BG -LIGHT - -BLACK -RED -GREEN -YELLOW -BLUE -MAGENTA -CYAN -GREY -WHITE -``` - -`#NAME#NAME#` use single `#` to apply multiple colors at once - -## ``panic` - -Stops execution and prints `Any` to `stdout` - -```text -`panic any -``` - -## ``type` - -## ``return_type` - -## ``fork_type` |
