Pork Language
Go to file
2023-09-11 16:24:36 +10:00
.github/workflows github: graal windows and darwin builds 2023-09-10 04:36:24 -04:00
ast language: add unary plus & minus, post increment & decrement operators, non-newline print builtin. fix block comments (#4) 2023-09-11 00:34:10 -04:00
buildext idea: comment highlighting support 2023-09-10 22:07:38 -04:00
common Auto-generate the AST. 2023-09-04 22:13:58 -07:00
evaluator native: pass argument specs in order to support varadic ffi 2023-09-11 01:12:32 -04:00
examples native: pass argument specs in order to support varadic ffi 2023-09-11 01:12:32 -04:00
ffi native: pass argument specs in order to support varadic ffi 2023-09-11 01:12:32 -04: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 <WIP> language: preliminary support for separation of statements 2023-09-11 16:24:36 +10:00
stdlib native: pass argument specs in order to support varadic ffi 2023-09-11 01:12:32 -04:00
support/pork-idea idea: comment highlighting support 2023-09-10 22:07:38 -04:00
tool language: prelude and internal functions, and varargs support 2023-09-10 19:27:59 -04:00
.editorconfig repository: add editorconfig dotfile (#5) 2023-09-11 00:33:51 -04:00
.gitignore ast: generate graph 2023-09-10 02:34:02 -04:00
build.gradle.kts Auto-generate the AST. 2023-09-04 22:13:58 -07:00
gradle.properties support: basic idea plugin 2023-09-10 01:27:53 -04: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 language: prelude and internal functions, and varargs support 2023-09-10 19:27:59 -04:00
settings.gradle.kts support: basic idea plugin 2023-09-10 01:27:53 -04:00

pork

A work-in-progress programming language.

/* fibonacci sequence */
func fib(n) {
  if n < 2 {
    n
  } 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'