Skip to content

ziyoung/strict-lox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strict-lox

StrictLox is restricted for lox programming language. It uses jvm as backend.

The compiler is a work in progress.

Types

Primitive types: int, long, float, double, string. Reference types: class, array, null.

Unlike lox, function is allowed to declare in global environment or class. Function or method can't be used as a return value. Also, closure is not supported.

Usage

mvn install && mvn package
cp ./compiler/target/compiler-1.0-SNAPSHOT-shaded.jar ./exmaple

# compile
java -jar compiler-1.0-SNAPSHOT-shaded.jar Hello.lox

# run
java Hello

TODO

  • Hello World
  • Arithmetic
  • String Concat
  • If Statement
  • For Statement
  • Return Statement
  • Class & Custom Type
  • Instance Method
  • null

About

StrictLox is restricted for lox programming language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published