* add function to get position of current token
* new exception parser_error with error location
* parser throws parser_error with error location
* update single include
* get error position in text
* bump to 2.3
* subclass exceptions
* update single include from every directory
* center badges in readme
* github ci windows, mac
* use default compiler
* check ci
* fix ci
* test ci
* fix ci
* fix ci
* test ci
* badges to github action
* add check for single include
* fix check
* check (should fail)
* fix all ci
* add artifact in single include ci
* update to newest nlohmann/json
* move unit tests to doctest
* move to json v3.6.1
* add function to get position of current token
* new exception parser_error with error location
* parser throws parser_error with error location
* update single include
* get error position in text
* bump to 2.3
* subclass exceptions
Co-authored-by: pantor <lars.berscheid@online.de>
Currently Inja's CMake config will build unit tests as long as `BUILD_TESTING` is enabled. As a result, when including Inja in another CMake project, it is not possible to build the latter's unit tests without also enabling Inja's own unit tests.
It's common for libraries to include a separate option for controlling its own unit test targets, in addition to observing the global `BUILD_TESTING` option. For instance, nlohmann/json has a `JSON_BuildTests` option: 973c52dd4a/CMakeLists.txt (L18)
Also see https://cliutils.gitlab.io/modern-cmake/chapters/testing.html .
This commit adds a `INJA_BUILD_TESTS` flag to address this.
* resync single_include
* Undo PIMPL pattern in Environment
* Environment now supports copy construction and assignment
* Add test for copying Environment
Closes#126
* apply documentation changes to single_include
* retain scope when including a template
* Use data from current scope when rendering an included template.
This allows included templates to access loop variables, which
was not possible before.
* Add test