pantor
ea47bb14dc
improve meson build
2023-01-28 13:15:58 +01:00
Kubo Takehiro
d462b9f829
Fix issue 246 ( #247 )
...
* Add `parse_expression` with one argument in preparation to fix #246 .
* Fix issue #246 : `func(n1 + n2, n3)` runs as if `func(n1, n2 + n3)`
* Simplify parser for an expression enclosed by parentheses.
2022-12-04 11:28:04 +01:00
pantor
9f923b3677
add check for too few arguments in operator parser
2022-07-10 13:46:33 +02:00
pantor
771e47f6da
fix search directory for string templates
2022-06-20 11:43:45 +02:00
pantor
88bd611257
fix tests
2021-11-17 12:15:35 +01:00
pantor
b2c0dddafe
improve lexing of numbers
2021-11-17 12:13:22 +01:00
pantor
80005c19b5
disable implicit conversions in test
2021-11-17 10:42:45 +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
2da715a12a
parse_filename without json
2021-11-12 08:06:56 +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
4505fd0508
add tests for assignments
2021-09-01 10:29:52 +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
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
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
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
1590bcebef
test and doc whitespace control for expressions
2020-08-12 19:57:20 +02:00
pantor
5f9d429a6a
add void callbacks
2020-08-10 19:38:12 +02:00
pantor
a570837703
remove iostream header, update year
2020-08-08 11:14:49 +02:00
pantor
23e768403e
add test for nested functions
2020-08-04 23:27:46 +02:00
pantor
889da4da4f
add set statements
2020-08-03 21:29:05 +02:00
DeiRex75
44c473538b
Switched order in token::kind::id of function and operator behavior ( #155 )
...
* switched order in token::kind::id of function and operator behavior
* add tests
Co-authored-by: pantor <lars.berscheid@online.de >
2020-08-02 19:01:38 +02:00
pantor
7529f21e63
dont copy strings into textnodes
2020-07-26 13:13:05 +02:00
pantor
c56cbd63e9
add atid operation
2020-07-26 12:52:36 +02:00
pantor
f4731061db
fix strings in test, make more methods private
2020-07-15 20:51:00 +02:00
pantor
f31378edaa
slight changes
2020-07-13 21:17:59 +02:00
pantor
6eb71dd3ea
Rewarite core with an AST for statements and RPN for expressions ( #149 )
...
* test
* improve ast
* add if statement
* shunting-yard start
* renderer as node visitor
* improve ast
* improve ast further
* first functions
* improve ast v3
* improve ast v4
* fix parser error location
* nested ifs
* fix comma, activate more tests
* fix line statements
* fix some more tests
* fix callbacks without arguments
* add json literal array and object
* use switch in expression
* fix default function
* fix loop data
* improved tests and benchmark
* fix minus numbers
* improve all
* fix warnings, optimizations
* fix callbacks argument order
* dont move loop parent
* a few more test
* fix clang-3
* fix pointers
* clean
* update single include
2020-07-13 15:20:04 +02:00
Lars Berscheid
59d1d6b577
update benchmark
2020-07-13 14:36:30 +02:00
Lars Berscheid
db4356b345
add tests for get source location function
2020-06-30 09:25:02 +02:00
Lars Berscheid
bb613e29ba
fix render error position in templates
2020-06-30 08:51:13 +02:00
pantor
c4d99c9455
add finegrained whitespace control
2020-06-29 23:12:12 +02:00
pantor
dadbb856cd
add config throw_missing_includes, search_in_files
2020-06-27 17:47:58 +02:00
pantor
bc020a5ee0
add count variables to template
2020-06-27 17:18:25 +02:00
pantor
d25a4de54f
show location for render errors
2020-06-27 17:05:56 +02:00
pantor
10b8ccccbc
restructure third party modules
2020-06-25 22:57:37 +02:00
pantor
5cc3e30b66
add clang-format
2020-06-16 18:53:41 +02:00
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
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
pantor
93b307b079
add throw test for complete file
2020-03-21 15:00:39 +01:00