Docs rewrite

This commit is contained in:
2026-07-03 10:23:45 +02:00
parent 6cda69044a
commit ec857525b4
23 changed files with 1084 additions and 1134 deletions
+45
View File
@@ -0,0 +1,45 @@
---
title: Syntax Overview
description: Comments, literals, identifiers, and keywords in Mist.
icon: Code
---
### Comments
```mist
// Line comments only
```
### Literals
```mist
42 // Integer
3.14 // Float
true // Boolean
false // Boolean
"hello" // String
(1, true, "x") // Tuple
```
### Identifiers & Keywords
Keywords are reserved and cannot be used as identifiers:
`if`, `else`, `fn`, `for`, `while`, `match`, `return`, `break`, `continue`, `struct`, `enum`, `class`, `trait`, `impl`, `use`, `pub`, `mut`, `let`, `true`, `false`, `dyn`, `loop`, `unsafe`, `override`, `const`, `type`
Identifiers follow the pattern `[a-zA-Z_][a-zA-Z0-9_]*`.
### Visibility
```mist
// Private (default)
void internal() { }
// Public
pub void external() { }
// Public to specific path
pub(crate) void crate_only() { }
pub(super) void parent_only() { }
pub(in my::module) void module_only() { }
```