Skip to content

isaacwengler/ilang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ilang

Toy programming language to experiment with writing an interpreter.

Next maybe in this repo, maybe in new ones:

  • LSP server
  • treesitter integration
  • Static types
  • Compiler? maybe
  • Garbage collection

Setup

Build generated code. Note: must have antlr installed and aliased to antlr4

./build.sh

Run tests

go test -v ./...

Run interpreter

go run .

# or
./build/ilang

# debug mode
./build/ilang -d

Interpreter TODO

  • WrappedValue type
    • has map children with child bindings
    • implemented by all primitives
  • update current to use wrapped value
  • parse and impl array and map
  • parse and impl reassignments
  • parse and impl return
  • implement algebra, conds, boolean alg
  • implement control flow
  • refactor value types
  • function definition type
  • implement function call
  • command line with file and interactive mode
  • map/array indexing
  • handle early returns
  • try/catch/throw
  • custom error stat https://stackoverflow.com/questions/18132078/handling-errors-in-antlr4
  • imports/exports
  • standard functions on wrapped value
  • simple package manager (un-versioned git repo curls? maybe)

About

Isaac's toy programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors