Commit Graph

340 Commits

Author SHA1 Message Date
pantor
77fee31764 update single include 2020-08-03 21:33:41 +02:00
pantor
889da4da4f add set statements 2020-08-03 21:29:05 +02:00
pantor
6d46bf6fbf performance improvements for loops 2020-08-03 21:09:46 +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
02394683b1 fix single include v3.0.0 2020-07-26 13:16:45 +02:00
pantor
7529f21e63 dont copy strings into textnodes 2020-07-26 13:13:05 +02:00
pantor
59b446b215 Merge branch 'master' of https://github.com/pantor/inja 2020-07-26 12:52:40 +02:00
pantor
c56cbd63e9 add atid operation 2020-07-26 12:52:36 +02:00
Tindy X
38002d2e42 Using another method for exists call (#152) 2020-07-25 21:49:17 +02:00
pantor
8feaa3be43 update single include 2020-07-15 20:59:35 +02:00
pantor
aac0f43aed move to gcc 4.9 2020-07-15 20:56:38 +02:00
pantor
f4731061db fix strings in test, make more methods private 2020-07-15 20:51:00 +02:00
pantor
5938bc2301 add tests for gcc 4.8, bump to 3.0 2020-07-15 18:34:47 +02:00
Rafael Lorenzo Alonso
17175f70da Making it compatible with gcc 4.8 (#150)
There is an inline function that assumes the compiler has copy elision
optimization which is actually not required until C++17. GCC 4.8 does it
but it requires the copy constructor to be defined which is not the case
for std::ifstream. Fixed by passing reference by parameter.

Co-authored-by: Rafael Lorenzo Alonso <ralorenz@cisco.com>
2020-07-15 17:53:30 +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
d43d497f88 fix stringview in included templates 2020-06-27 22:06:13 +02:00
pantor
eb15b472ab update readme 2020-06-27 18:11:48 +02:00
pantor
dadbb856cd add config throw_missing_includes, search_in_files 2020-06-27 17:47:58 +02:00
pantor
390db9f2b7 improve count variables 2020-06-27 17:21:45 +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
0398edd419 code cleaning 2020-06-27 15:22:43 +02:00
pantor
9a0222f101 update single include 2020-06-27 14:05:59 +02:00
pantor
37697e0950 debug single include ci 2020-06-26 16:31:23 +02:00
pantor
fc5ab40da0 remove polyfill 2020-06-25 23:48:31 +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
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