508 Commits

Author SHA1 Message Date
pantor
2d515078c6 set version 3.3 v3.3.0 2021-07-28 16:38:53 +02:00
pantor
2ba5783705 Merge branch 'master' of github.com:pantor/inja 2021-07-25 14:24:51 +02:00
pantor
99b85d69e7 remove headers in files, add central header 2021-07-25 14:24:49 +02:00
逐雁南飛
14f0d38cac Fixed an issue with round (#207)
* Fix the problem that the result has a decimal point when the round function, when the precision is 0.

* fix tests/test-functions.cpp:91 for round check
2021-07-01 07:59:00 +02:00
pantor
c70fd585e5 Merge branch 'master' of github.com:pantor/inja 2021-06-30 19:56:19 +02:00
pantor
8a9aee1257 add jinja python test script 2021-06-30 19:56:16 +02:00
Wim Leflere
91c93bfb77 add join function (#204)
* add join function

* fix formatting to match single include

* add join test

* add join to documentation

* fix MSVC warning: signed/unsigned mismatch

Co-authored-by: Wim Leflere <wleflere@cochlear.com>
2021-06-17 20:54:22 +02:00
pantor
9cf7db8a06 add warnings for benchmark, fix for inja_throw 2021-06-17 20:03:40 +02:00
pantor
e91a2fd350 #ifndef INJA_THROW 2021-06-17 19:56:22 +02:00
pantor
8d65633b6a add warnings for clang and fix them 2021-06-17 19:48:28 +02:00
pantor
eaec58d8aa update nlohmann/json to master 2021-06-10 08:06:16 +02:00
pantor
4ccadd57ac update to json=3.9.1, doctest=2.4.6 2021-06-09 22:31:50 +02:00
pantor
83feb26219 update single include 2021-06-09 22:26:32 +02:00
pantor
4e909475ea at function for objects 2021-06-09 22:26:07 +02:00
pantor
b473873853 compactify assignments readme 2021-06-09 21:41:00 +02:00
Bryce Adelstein Lelbach aka wash
798a0b92b1 Add support for setting subobjects via JSON pointer in set statements. (#202)
E.g. `{% set x.y = 1 %}` sets the `y` member of `x` to 1.
2021-06-09 21:39:16 +02:00
pantor
86f38f05d7 update single include 2021-06-09 21:34:03 +02:00
pantor
d9ad8d195b whitespace control for comments 2021-06-09 21:33:47 +02:00
pantor
95af782ca2 Add Child Inheritance Feature (#198)
* add block and extend feature

* constify, code cleaning

* update single include

* add html language to readme

* clean tests

* constantify, update year
2021-05-25 10:18:21 +02:00
Wim Leflere
b4b9d8dc16 Fix build warnings for Clang and MSVC (#197)
* remove unnecessary semicolons on function definitions

* add virtual destructor to base class

* fix possible loss of data warning for double to int conversion with explicit cast

* ignore Visual Studio build folder

Co-authored-by: Wim Leflere <wleflere@cochlear.com>
2021-05-20 12:40:57 +02:00
pantor
b14f8a1e3a add ci for gcc 10, 11 2021-05-19 20:16:00 +02:00
pantor
06ff2711cf add no excpetion test 2021-05-19 20:09:40 +02:00
Chinmay Garde
2491980b23 Fix inclusion in translation units with exceptions disabled. (#196)
If exceptions are disabled via `-fno-exceptions` or `INJA_NOEXCEPTION`, the use
of try-catch is disallowed by the compiler.

This patch makes does two things:
* Gates the use of try-catch in one translation unit on the definition of
  `INJA_NOEXCEPTION`.
* Make it such that translation units compiled with `-fno-exceptions` but no
  `INJA_NOEXCEPTION` implicitly sets `INJA_NOEXCEPTION`.

In the specific case of `ifstream::open`, setting the exceptions bits without
exceptions enabled should trip an assertion just like INJA_ABORT. The nice
message will not be present however, but that is absent when using INJA_ABORT as
well.

After this patch, inja can be successfully included without issue.
2021-05-19 19:53:55 +02:00
pantor
4d5a7d1c33 fix single include 2021-05-17 20:44:48 +02:00
pantor
eac2162629 fix include of in-memory templates 2021-05-17 20:44:32 +02:00
pantor
ca3c7a0cd6 add test for short circuit evaluation 2021-05-17 20:03:17 +02:00
pantor
389c1d64f0 short circuit evaluation 2021-05-17 19:57:33 +02:00
Pavlo Solntsev
811e1730e1 Meson: Removing unneeded files from the config (#190) 2021-03-09 21:53:21 +01:00
Jesse Mapel
8f8487c0a8 Added conda-forge installation instructions (#187) 2021-02-03 08:12:36 +01:00
Jesse Mapel
e09faa6cc5 Disabled immediate config on Linux CI libc6-dbg (#188)
Taken from an issue on the Docker for linux repo and a few other places:

https://github.com/docker/for-linux/issues/1131

Ubuntu bug report also seems to indicate this is safe:

https://bugs.launchpad.net/ubuntu-cdimage/+bug/1871268
2021-02-02 17:12:54 +01:00
pantor
15b0b7f5e3 add gcc via choco v3.2.0 2021-01-16 18:23:20 +01:00
pantor
9d59943220 add INJA_NOEXCEPTION 2021-01-16 18:06:43 +01:00
pantor
a3b0b41d48 allow variables starting with $ and @ 2021-01-16 16:40:03 +01:00
pantor
316567898e add size check in get_argument_vector 2021-01-16 15:38:14 +01:00
pantor
3cc82e934e Improve conditions examples in readme 2021-01-01 21:31:43 +01:00
pantor
15b3e16bd5 use svg icon 2020-12-18 22:48:43 +01:00
pantor
0c60f59a8c Add files via upload 2020-12-18 22:47:26 +01:00
Matus Novak
a57b745e5b Do not install nlohmann json if it is not embedded (#177) 2020-11-25 12:12:54 +01:00
pantor
d7b514aca0 [CI] clean CI, remove cmake install step 2020-11-25 12:05:37 +01:00
pantor
06bd9afda0 [CI] link brew 2020-11-25 12:01:03 +01:00
pantor
719f0ae9bc [CI] add xcode 12.2 2020-11-25 11:52:58 +01:00
pantor
81172f7ca2 [CI] clang 9 to ubuntu 20.04 2020-11-25 11:46:13 +01:00
pantor
baa221b9d1 remove set-env in CI 2020-11-25 11:37:32 +01:00
pantor
0fbde44f36 remove depreceated set-env in CI 2020-11-25 11:32:54 +01:00
pantor
dda31f44bb Add homebrew v3.1.0 2020-09-28 18:06:23 +02:00
Tindy X
dacf8e8959 Suppress "missing initializer" warnings (#169)
* Suppress "missing initializer" warnings

* Try to fix build error on some platforms

* Add constructor for FunctionData

* Make Codacy happy
2020-08-26 20:09:24 +02:00
pantor
be5f4dd310 Consume byte order mark 2020-08-12 20:10:17 +02:00
pantor
1590bcebef test and doc whitespace control for expressions 2020-08-12 19:57:20 +02:00
Tindy X
ed58da75a6 Add whitespace control for expression (#162)
* Add whitespace control for expression

* Fix Environment::set_expression not working properly
2020-08-12 19:51:41 +02:00
SuperFish
918aa2a10d Uninitiated current_loop_data bug fix in render_to (#165)
* uninitiated current_loop_data bug fix in render_to

* change json_loop_data to  json_additional_data

* forgot to update single_include
2020-08-12 19:49:14 +02:00