An actual command line tool to run pork programs.

This commit is contained in:
2023-08-21 23:08:56 -07:00
parent e12b51e8a7
commit 1445490770
13 changed files with 200 additions and 150 deletions

View File

@ -5,28 +5,21 @@ A small BBQ language.
Very WIP. Like VERY.
```pork
main = {
three = 3
two = 2
calculateSimple = {
(50 + three) * two
}
calculateComplex = {
three + two + 50
}
calculateSimpleResult = calculateSimple()
calculateComplexResult = calculateComplex()
list = [10, 20, 30]
trueValue = true
falseValue = false
[
calculateSimpleResult,
calculateComplexResult,
list,
trueValue,
falseValue
]
/* fibonacci sequence */
fib = { n in
if n == 0
then 0
else if n == 1
then 1
else fib(n - 1) + fib(n - 2)
}
result = fib(20)
println(result)
```
## Usage
```
./gradlew -q run --args 'run examples/fib.pork'
```