Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 828 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 828 Bytes

Compiler for O-lang

Requirements:

  • Java 17 or higher

Usage

  1. Build JAR (output location is ./build/libs/CompilerOOP-{version}.jar)
./gradlew build
  1. Run CLI
java -jar CompilerOOP-{version}.jar <file_path> [options]

Available options (can be used together):

  • -bundle — compiles not only the provided file, but also the libraries
  • -jar — wrap the output in a .jar file

Pre-defined scripts

There are some scripts in test directory that will help you understand how to use this compiler. To use them, use this workflow:

  1. Add .olang files to test/src

  2. Compile

compile.sh <file_name>.olang
  1. Run (will work only if there is class Program with empty constructor and method run without arguments)
run.sh <file_name>.olang