mirror of
https://github.com/Alvin-Zilverstand/Tralalero_lang.git
synced 2026-03-06 13:27:07 +01:00
73 lines
1.8 KiB
Markdown
73 lines
1.8 KiB
Markdown
# Tralalero Lang
|
|
|
|
Benvenuto! Welcome to Tralalero Lang, the most whimsical and brain-tickling programming language inspired by the finest Italian-flavored brainrot.
|
|
|
|
## Getting Started
|
|
|
|
To run a Tralalero program, you need to have Rust installed. Then, you can use the following command:
|
|
|
|
```bash
|
|
cargo run -- <file_name>.tralla
|
|
```
|
|
|
|
## Syntax
|
|
|
|
A Tralalero program must start with `Tralalero Tralala` and end with `Bombardiro Crocodilo`.
|
|
|
|
## Keywords
|
|
|
|
### `Tralalero Tralala`
|
|
|
|
This is the entry point of the program. It must be the first line of your code.
|
|
|
|
### `Bombardiro Crocodilo`
|
|
|
|
This is the exit point of the program. It must be the last line of your code.
|
|
|
|
### `Matteeeo <value>`
|
|
|
|
This command prints a value to the console. The value can be a string literal (enclosed in double quotes) or a variable.
|
|
|
|
### `Biscottini <variable_name> <value>`
|
|
|
|
This command declares a variable and assigns a value to it. The value can be a string literal or a number.
|
|
|
|
### `Pinguino Arrabiato Fruti <number>`
|
|
|
|
This command creates a loop that repeats a block of code a specified number of times. The block of code must be enclosed in `{` and `}` on separate lines.
|
|
|
|
Example:
|
|
```tralalero
|
|
Pinguino Arrabiato Fruti 3
|
|
{
|
|
Matteeeo "Hello"
|
|
}
|
|
```
|
|
|
|
### `Chimpanzini <variable_name> <operand1> <operator> <operand2>`
|
|
|
|
This command performs an arithmetic operation and stores the result in a variable. The supported operators are `+`, `-`, `*`, `/`.
|
|
|
|
Example:
|
|
```tralalero
|
|
Biscottini x 10
|
|
Biscottini y 5
|
|
Chimpanzini result x + y
|
|
Matteeeo result // prints 15
|
|
```
|
|
|
|
### `Tung Tung Tung <operand1> <operator> <operand2>`
|
|
|
|
This command executes a block of code if a condition is true. The supported operators are `==`, `!=`, `>`, `<`, `>=`, `<=`.
|
|
|
|
Example:
|
|
```tralalero
|
|
Biscottini x 10
|
|
Tung Tung Tung x > 5
|
|
{
|
|
Matteeeo "x is greater than 5"
|
|
}
|
|
```
|
|
|
|
## Ciao!
|