A Compiler for a subset of Java ☕
Use the stack build tool to
install the compiler locally (execute stack install
in the root directory).
- Install the stack build tool
- Go into the root directory of this project and
-
use
stack build
to build the projectYou may also use the flag
--file-watch
. That waystack
recompiles the files insrc
every time you change a file. -
use
stack install
to install a compiled binary of this compiler locallyThe program should be in your
$PATH
with the nametiny-java
. Use e.g.tiny-java foo.java
to compile a file.tiny-java --help
should you provide with some more information on how to use it. -
use
stack test
to let stack run all tests in thetest
directoryWe use hspec for our test suite.
-
use
stack repl
to build the project and load it into aghci
-sessionIn the
ghci
-session you can use:reload
(shorthand:r
) to trigger a rebuild of the project and load the new build in the session. -
use
stack haddock
to generate html-documentation in/docs
The documentation is then available here (after pushing the updated
docs
-directory).
-