Pork Language
Go to file
2023-09-07 01:07:43 -07:00
.github/workflows Fix -march=compatibility for GraalVM 2023-09-04 22:33:38 -07:00
ast imports are now python style with a twist: forms! import std ffi and import local myfile 2023-09-06 22:43:03 -07:00
buildext while loop support, and native functions (including ffi!) 2023-09-06 19:07:28 -07:00
common Auto-generate the AST. 2023-09-04 22:13:58 -07:00
evaluator imports are now python style with a twist: forms! import std ffi and import local myfile 2023-09-06 22:43:03 -07:00
examples ffi: shorthand for some java types 2023-09-07 01:07:43 -07:00
ffi ffi: shorthand for some java types 2023-09-07 01:07:43 -07:00
frontend imports are now python style with a twist: forms! import std ffi and import local myfile 2023-09-06 22:43:03 -07:00
gradle/wrapper Initial Commit 2023-08-19 15:34:10 -07:00
parser imports are now python style with a twist: forms! import std ffi and import local myfile 2023-09-06 22:43:03 -07:00
stdlib imports are now python style with a twist: forms! import std ffi and import local myfile 2023-09-06 22:43:03 -07:00
tool ffi: support for java native functions 2023-09-07 01:03:01 -07:00
.gitignore Initial Commit 2023-08-19 15:34:10 -07:00
build.gradle.kts Auto-generate the AST. 2023-09-04 22:13:58 -07:00
gradle.properties Auto-generate the AST. 2023-09-04 22:13:58 -07:00
gradlew Initial Commit 2023-08-19 15:34:10 -07:00
gradlew.bat Initial Commit 2023-08-19 15:34:10 -07:00
LICENSE Initial Commit 2023-08-19 15:34:10 -07:00
README.md fn -> func in README 2023-09-04 03:04:36 -07:00
settings.gradle.kts add a standard library, and introduce formed imports (import std "myfile.pork") 2023-09-06 21:39:57 -07:00

pork

A work-in-progress programming language.

/* fibonacci sequence */
func fib(n) {
  if n == 0
    then 0
  else if n == 1
    then 1
  else fib(n - 1) + fib(n - 2)
}

func main() {
  let result = fib(20)
  println(result)
}

Usage

./gradlew -q tool:run --args 'run ../examples/fib.pork'