We need to resets current_block to a nullptr after parsing the template
in `parse_into`, otherwise, current_block will refer to local stack
space after we return from Parser::parse.
* Fixed headers and linter marks applied
Headers were wrong.
Applied some linter suggestions. There are still many left.
* CMake adjusted for single header
CMake can now install the single header.
Removed an unneeded header.
---------
Co-authored-by: Berscheid <1885260+pantor@users.noreply.github.com>
* 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.
* add block and extend feature
* constify, code cleaning
* update single include
* add html language to readme
* clean tests
* constantify, update year
* switched order in token::kind::id of function and operator behavior
* add tests
* fixed nested function order
* created single include
Co-authored-by: pantor <lars.berscheid@online.de>
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>
* 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
* 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>