For a general introduction, have a look at the file documentation/Language.md
Just write a .lpg file and run it. If you want to have syntax highlighting, there is a Visual Studio Code Plugin and a Notepad++ syntax file in this repository.
In order to compile and run an .lpg file you need to build the whole project and run the following command in the terminal:
- On Windows:
{build-directory}/cli/lpg.exeand give it the.lpgfile as argument.
- On Linux
{build-directory}/cli/lpgand give it the.lpgfile as argument.
Currently supported operating systems are:
- Windows
- Linux
Install at least the following tools:
sudo apt-get install git cmake gcc valgrind ninja-build nodejsHow to build and run the tests:
git clone https://github.com/TyRoXx/Lpg.git mkdir build cd build cmake ../Lpg -G "CodeBlocks - Unix Makefiles" cmake --build . ./tests/testsYou can also open the project using an IDE. QtCreator is recommended:
sudo apt-get install qtcreatorHow to measure test coverage:
sudo apt-get install lcov firefox cd build make testcoverageIt will run the tests, generate an HTML coverage report and open it in Firefox.
Install clang-format like this on Ubuntu:
sudo apt-get install clang-format-3.9On Windows, you can get clang-format by installing Clang for Windows:
You have to use clang-format 3.9 or otherwise the formatting will be inconsistent.
Re-run cmake in the build directory to make it will look for clang-format:
cmake .To format, run this in the build directory:
make clang-format- Use CMake GUI to generate a solution for your favorite version of Visual Studio.
- Open the solution in Visual Studio as usual.
- Run the
testsproject to check whether your changes work.