pantor
edc17798b3
Merge branch 'master' of github.com:pantor/inja
2022-07-10 13:46:36 +02:00
pantor
9f923b3677
add check for too few arguments in operator parser
2022-07-10 13:46:33 +02:00
Mihai Stan
17a59c0b78
fix warnings with VS2019, W4, c++20 ( #230 )
...
* fix warnings with VS2019, W4, c++20
* update single include
Co-authored-by: Berscheid <1885260+pantor@users.noreply.github.com >
Co-authored-by: pantor <lars.berscheid@online.de >
2022-06-20 12:06:28 +02:00
pantor
72f90122a2
fix tests
2022-06-20 11:44:50 +02:00
pantor
771e47f6da
fix search directory for string templates
2022-06-20 11:43:45 +02:00
pantor
4526fb4007
remove const from static cast
2022-06-20 11:02:47 +02:00
pantor
a9ce204b3b
use json data types in renderer
2022-06-20 10:57:20 +02:00
pantor
59933e5e6f
update dependencies
2022-06-20 10:39:56 +02:00
pantor
defee6fdf8
make environment paths protected
2022-05-29 15:42:32 +02:00
pantor
b2c0dddafe
improve lexing of numbers
2021-11-17 12:13:22 +01:00
pantor
ab6d006443
works with JSON_NO_IO
2021-11-17 10:39:53 +01:00
pantor
eb04bfc7d3
clang-format
2021-11-12 08:35:56 +01:00
pantor
81cfa140e4
init LiteralNode with string view, code cleaning
2021-11-12 08:13:42 +01:00
pantor
2da715a12a
parse_filename without json
2021-11-12 08:06:56 +01:00
pantor
623c267383
make_result and code cleaning
2021-11-11 22:05:21 +01:00
pantor
120691339d
rename json -> data
2021-11-10 12:53:27 +01:00
pantor
2239e231bc
remove string view polyfill
2021-11-10 12:14:54 +01:00
pantor
cf71b54151
add include callback
2021-09-07 10:00:33 +02:00
pantor
9b9dd96a46
introduce INJA_DATA_TYPE
2021-09-06 09:15:48 +02:00
pantor
12a2c9bbf2
unify json data type
2021-09-01 16:40:43 +02:00
pantor
2d515078c6
set version 3.3
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
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
4e909475ea
at function for objects
2021-06-09 22:26:07 +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
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
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
eac2162629
fix include of in-memory templates
2021-05-17 20:44:32 +02:00
pantor
389c1d64f0
short circuit evaluation
2021-05-17 19:57:33 +02: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
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
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
pantor
5f9d429a6a
add void callbacks
2020-08-10 19:38:12 +02:00
pantor
0b7d3d67cf
perfomance improvements for printing integers
2020-08-09 23:02:25 +02:00
pantor
4182c5dfa9
constantify
2020-08-08 13:59:35 +02:00
pantor
73c04e6995
fix codacy issues II
2020-08-08 13:41:16 +02:00
pantor
52a73410de
fix codacy issues
2020-08-08 13:36:26 +02:00
pantor
a570837703
remove iostream header, update year
2020-08-08 11:14:49 +02:00
pantor
a138be46b6
remove try/catch from truthy
2020-08-05 19:52:55 +02:00