An interpreted, static typed, single threaded programming language powered by Rust.
Filipe still primitive and limited although it has support for:
- Arithmetic operations
- variables declaration
- if-else statments
- loop statments
- Native Data types
int
,float
,boolean
,string
,null
- Built-in function
typeof
- User defined functions
- Import Builtin Modules
io
,math
,random
- Arrays (experimental)
Filipe was designed to be a high level programming language and beginner friendly, that why it has a clear syntax and an enhanced error reporting mechanisms.
- hello world
import io
define main(): void {
io.puts("Hello, world!")
}
main()
- more examples...
import io
let name: string = "Jonh Harvard"
let age = 87
let height: float = 1.86
let favoriteLangs = ["Haskell", "Ocaml", "Rust"]
if height >= 1.90 {
io.puts(name, " is tall above avg.")
} else {
io.puts(name, " isn't so much tall")
}
for x in range(0, 10) {
if x % 2 == 0 {
io.puts(x, " is even")
}
}
io.puts(name)
io.puts(height)
io.puts("Favorite prog. lang.: ")
for lang in favoriteLangs {
io.puts(lang)
}
Just for Linux users, are you on windows? if so figure out your self sorry 😂
- clone this repository
git clone https://github.com/edilson258/filipe.git
- build it
cd filipe
cargo build
- start REPL
cargo run
- run from file (*.fl)
cargo run run <path_to_file>
Note: replace <path_to_file>
with path to filipe script
as a php developer with Quick and Dirty mindset i only wrote few tests 😂
cargo test
Feel free to fork it and play with it.