508 Commits

Author SHA1 Message Date
craigpepper
c85f9a3837 Performance improvement for large data (#146)
* move to json v3.8.0

* Use loop context instead of copying input data

Co-authored-by: Craig Pepper <craig.a.pepper@boeing.com>
2020-06-16 18:47:06 +02:00
pantor
025846d75e add else if and else to readme 2020-06-15 20:58:29 +02:00
craigpepper
9533ba5240 Loop vars for object loops (#145)
* loops vars for object loops

* Fix formatting

Co-authored-by: Craig Pepper <craig.a.pepper@boeing.com>
2020-06-15 20:50:52 +02:00
craigpepper
d055973479 move to json v3.8.0 (#144)
Co-authored-by: Craig Pepper <craig.a.pepper@boeing.com>
2020-06-15 20:47:42 +02:00
pantor
d010206d32 use github actions for pull requests 2020-06-15 20:44:36 +02:00
pantor
cc5cc2875f update single include file 2020-04-19 16:15:51 +02:00
pantor
8f2fac5d4d update version, code style 2020-04-10 15:58:05 +02:00
pantor
c2c95a4871 fix readme for trim and lstrip 2020-04-10 15:49:16 +02:00
pantor
7101c77c41 Merge branch 'master' of https://github.com/pantor/inja 2020-04-10 15:48:45 +02:00
pantor
d717b6ede3 fix blocks in readme 2020-04-10 15:48:43 +02:00
pantor
ef3846ff2b Update README.md 2020-04-10 15:42:49 +02:00
pantor
7697359c32 update compilers in readme 2020-03-21 15:34:11 +01:00
pantor
d4c7aa5680 improve ci 2020-03-21 15:28:39 +01:00
pantor
bbb1f3a1da fix ci 2020-03-21 15:21:42 +01:00
pantor
095defcf13 move to github ci 2020-03-21 15:14:22 +01:00
pantor
93b307b079 add throw test for complete file 2020-03-21 15:00:39 +01:00
sabelka
7ce19f9b61 Parser error position (#134)
* 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>
2020-03-21 14:56:21 +01:00
pantor
e88b2e3369 move to json v3.6.1 2020-03-21 14:38:34 +01:00
pantor
62d8593e6c move unit tests to doctest 2020-03-18 13:41:11 +01:00
pantor
10ac6d8839 update to newest nlohmann/json 2020-03-18 13:18:27 +01:00
pantor
f69654fd2a add artifact in single include ci 2020-03-18 13:11:10 +01:00
pantor
7f0f99d76e fix all ci 2020-03-18 12:02:31 +01:00
pantor
b9f55885f6 check (should fail) 2020-03-18 12:01:23 +01:00
pantor
87de628067 fix check 2020-03-18 11:59:39 +01:00
pantor
773005b0f6 add check for single include 2020-03-18 11:58:07 +01:00
pantor
3f624db81a badges to github action 2020-03-18 11:49:02 +01:00
pantor
92afd50ace test ci 2020-03-18 09:57:45 +01:00
pantor
18b2e538b6 fix ci 2020-03-18 09:51:32 +01:00
pantor
9f6a57439d fix ci 2020-03-18 09:44:09 +01:00
pantor
0386008078 test ci 2020-03-18 09:40:44 +01:00
pantor
b89cbd9847 fix ci 2020-03-18 09:24:09 +01:00
pantor
54f9ccb196 check ci 2020-03-18 09:20:05 +01:00
pantor
46b1e81952 use default compiler 2020-03-18 09:09:27 +01:00
pantor
23b5eddac8 github ci windows, mac 2020-03-18 09:03:28 +01:00
pantor
225a468032 center badges in readme 2020-03-18 08:47:51 +01:00
pantor
f41feb69d2 update single include from every directory 2020-03-18 08:43:55 +01:00
Chuan Ji
cb0b852e23 Add CMake flag to control Inja's unit tests. (#135)
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.
2020-03-14 18:55:51 +01:00
Christof Krüger
3f071a2aac Fix warnings (VS2017 x64). (#133)
* Fix warnings (VS2017 x64).

* Update single_include/inja.hpp.
2020-01-27 22:52:43 +01:00
pantor
652e378dd9 Merge branch 'master' of https://github.com/pantor/inja v2.2.0 2019-12-27 11:37:01 +01:00
pantor
aad2cc4358 to v2.2 2019-12-27 11:36:57 +01:00
Krzysztof Bieleń
c36cbac39d Fix Visual Studio Debug builds (#125) 2019-12-03 22:23:00 +01:00
Krzysztof Bieleń
d62453d81b Fix VS2015 build (#128) 2019-12-01 13:54:25 +01:00
Tom
8e6a8428fa Undo PIMPL pattern in Environment (#127)
* resync single_include

* Undo PIMPL pattern in Environment

* Environment now supports copy construction and assignment
* Add test for copying Environment

Closes #126
2019-11-22 11:12:28 +01:00
Krzysztof Bieleń
1d419d1940 Add more build configurations to appveyor (#123) 2019-11-13 18:12:35 +01:00
Krzysztof Bieleń
77062f52c7 Fix Travis build (Debug -> Release) (#124) 2019-11-13 18:06:37 +01:00
Tom
1b2212cc69 Fix error in example for included templates (#122)
When using templates from an environment, `inja::env::render`
must be used.

Closes #121
2019-11-09 20:41:32 +08:00
Dodzey
e7d5c5332d Static cast to avoid VS140 C4244 warning (#119) 2019-10-27 18:42:53 +01:00
pantor
258def7bf0 little bit more code style 2019-09-14 12:28:55 +02:00
pantor
fe2ef9ce4e fix tab/spaces 2019-09-14 12:11:53 +02:00
pantor
a6a61586a4 code style (cpplint) 2019-09-14 12:05:51 +02:00