wrote some more Sylt syntax
This commit is contained in:
21
README.md
21
README.md
@@ -12,10 +12,27 @@ To compile the VM for Linux: `gcc src/main.c src/vmbl.c src/exception.c src/file
|
||||
|
||||
SASM and Sylt are written in Python for now as I'm too mentally challenged to write C code rn.
|
||||
|
||||
## Syntax
|
||||
## Sylt Syntax
|
||||
*(totally not Kotlin lmao)*
|
||||
### Example "Hello, World!" Program
|
||||
```kotlin
|
||||
fun main() {
|
||||
def main() {
|
||||
println("Hello, World!\n")
|
||||
}
|
||||
```
|
||||
### Variables
|
||||
```kotlin
|
||||
def main() {
|
||||
// define a variable
|
||||
var x = 123
|
||||
|
||||
// define a constant
|
||||
const y = 456
|
||||
|
||||
// define two variables on one line
|
||||
var x, y = 1, 3
|
||||
|
||||
// you can do the same with constants!
|
||||
const x, y = 1, 3
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user