| Commit message (Collapse) | Author | Age |
| |
|
|
| |
Fixed tests to use the new apis
|
| |
|
|
|
| |
Certain conditions on an if statement could cause a crash, bug
introduced when adding errors everywhere a few patches ago.
|
| |
|
|
|
| |
The var binding warning before was just a printf(), change it so that it
outputs some helpful text to the template's errout.
|
| |\ |
|
| | |
| |
| |
| | |
Fixed various memory corruption bugs in the parsing step
|
| | |
| |
| |
| |
| | |
Reset the output buffer when TMPL_render() is called so that only only
the latest render errors are preserved.
|
| |/
|
|
|
|
| |
If a loop was defined in the template, but no loop was defined
in the varlist, render() would infinite loop while trying to
execute. Fixs that.
|
| |
|
|
| |
Fixed a bug where rendering a template multiple times would fail.
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| | |
Added the -Wextra flag to the makefile for debug builds, and squashed
all the warning that came up.
|
| |/
|
|
|
| |
Added the -Wextra flag to the makefile for debug builds, and squashed
all the warning that came up.
|
| | |
|
| |
|
|
|
| |
Added a break statement that can break out of loops, also added
some tests to test the functionality of the same.
|
| |
|
|
| |
Added more system tests for loop breaking
|
| |
|
|
|
|
| |
Sill needs some more tests, like: make sure variable scoping is
still correct after breaking out of a loop, how about multiple
loops?
|
| |
|
|
| |
Added break statements that can be used to break out of loops
|
| |
|
|
| |
Cleanning up prints after the last commit
|
| |
|
|
| |
Added a break statement that can break out of loops.
|
| |
|
|
| |
Corrected a bunch of spelling mistakes in the readme and the Makefile
|
| |
|
|
|
| |
Tokenize now has a doubly linked list of toekns, for additionall
help parsing break/continue instructions.
|
| |
|
|
|
| |
Added documentation for each function in the include/ctemplates.h file
Also did some spellchecking on the readme.
|
| |
|
|
|
|
| |
Allow bstringify (and therefore TMPL_render()) to accept NULL
as the size. When NULL is passed as the size, the size of the
resulting string is not stored anywhere.
|
| |
|
|
|
|
|
| |
Added a method
const char* TMPL_err(TMPL_templates* t, size_t* size);
t is the template that had an error
size is a pointer, size of the error message is returned;
|
| |\ |
|
| | | |
|
| |/ |
|
| |
|
|
| |
Added const qualifier for clarity.
|
| |
|
|
|
|
| |
Added a src/ and build/ directory
Added a include/ directory
Included file is smaller
|
| | |
|
| |
|
|
| |
Added another test case to the test file.
|
| |
|
|
|
|
|
| |
When compileing with DEBUG=true, gcc will build with no
optimizations and with debugging symbols.
When compileing without DEBUG=true, gcc with build with
-O3 and no debugging symbols.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Added an is_whitespace() function
* <TMPL_VAR ...> may have whitespace between
* name = "..."
* default = "..."
* <TMPL_IF ...> may have whitespace between
* name = "..."
* value = "..."
* <TMPL_ELSEIF ...> may have whitespace between
* name = "..."
* value = "..."
|
| |
|
|
| |
Added a few more tests.
|
| |
|
|
|
| |
Added documentation that explains how to use TMPL_IF and
TMPL_ELSEIF to check for a variable's existance.
|
| |
|
|
| |
Added `void print_ast(TMPL_node)` as a debugging function.
|
| |
|
|
|
| |
Elseif now works exactly like if, where it will check for the
existance of a variable if it does not have a value field.
|
| |
|
|
| |
Updated copyright to cover 2018, and updated email to alex@cogarr.net
|
| |
|
|
| |
Added a function print_varlist(TMPL_varlist* vl) for debugging
|
| | |
|
| |
|
|
| |
Changed test file path from windows style to unix style.
|
| |
|
|
|
|
| |
removed an object file that somehow made it into the repo
Also chagned makefile to use unix style paths instead of
windows style paths.
|
| |
|
|
|
| |
Fixed a bug where the <TMPL_IF> tag was not correctly checking if a
variable exists if it does not have a "testval" attribute.
|
| |
|
|
|
| |
Added some tests for good input.
Also fixed a bug where an empty loop would crash.
|
| |
|
|
|
| |
Fixed a bug where adding a var to a varlist would sometimes cause memroy
corruption
|
| |
|
|
| |
Added some more documentation, and removed some extranious prints
|
| |
|
|
| |
Also removed debug prints
|
| |
|
|
|
|
| |
Fixed bug with tokenizing,
also fixed a bug with parsing loops
also fixed a bug with adding vars to a varlist
|
| |
|
|
| |
Render function now returns the length of the string it returns
|