* add block and extend feature
* constify, code cleaning
* update single include
* add html language to readme
* clean tests
* constantify, update year
* 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>
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.
* 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