This commit is contained in:
Ronaldson Bellande 2024-09-17 02:08:38 -04:00
parent 9c6121262a
commit 61604e25bd
2 changed files with 17 additions and 14 deletions

View File

@ -12,8 +12,11 @@
- Environment variables
- redirection support
## Bellande Rust Executable Builder
- https://github.com/Algorithm-Model-Research/bellande_rust_executable
# Bellos executable run scripts
```
./bellos hello_world.bellos
```
## BELLOS Usage
```
@ -26,9 +29,9 @@ echo "Hello, World!"
# Using variables
name="Bellos"
echo "Welcome to $name programming!"
```
# ----------------------------------------
```
#!/usr/bin/env bellos
# File: basic_math.bellos
@ -45,9 +48,9 @@ echo "Sum: $sum"
echo "Difference: $difference"
echo "Product: $product"
echo "Quotient: $quotient"
```
# ----------------------------------------
```
#!/usr/bin/env bellos
# File: control_structures.bellos
@ -79,9 +82,9 @@ do
echo $count
count=$((count - 1))
done
```
# ----------------------------------------
```
#!/usr/bin/env bellos
# File: functions.bellos
@ -99,9 +102,10 @@ function add() {
greet "User"
result=$(add 3 4)
echo "3 + 4 = $result"
```
# ----------------------------------------
```
#!/usr/bin/env bellos
# File: file_operations.bellos
@ -124,9 +128,9 @@ done < test.txt
# Cleaning up
rm test.txt
```
# ----------------------------------------
```
#!/usr/bin/env bellos
# File: string_manipulation.bellos
@ -151,7 +155,7 @@ echo "Uppercase: ${string^^}"
echo "Lowercase: ${string,,}"
```
## Website Crates
## Website NPM
- https://crates.io/crates/bellos
### Installation

View File

@ -171,11 +171,10 @@ impl Lexer {
"else" => Token::Else,
"fi" => Token::Fi,
"while" => Token::While,
"for" => Token::For,
"do" => Token::Do,
"done" => Token::Done,
"for" => Token::For,
"in" => Token::In,
"function" => Token::Function,
_ => Token::Word(word),
}
}