aboutsummaryrefslogtreecommitdiffstats
path: root/src/template-parser.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "build: removing src/utils and replacing with squareball"Rafael G. Martins2015-12-231-16/+16
| | | | This reverts commit 950e6c9148eca244a89d18a21d4ae4e5c3d1c646.
* build: removing src/utils and replacing with squareballRafael G. Martins2015-12-231-16/+16
| | | | | squareball is a new general purpose library for C99, based on the code removed from src/utils
* Allow {% if VALUE1 == VALUE2 %}, with two definesPalmer Dabbelt2015-10-261-5/+18
| | | | | | | | | | | | | | | I was surprised to see that blogc doesn't support testing for equality between two defined values, it just supports comparison between a variable and a constant string. I want to be able to compare two variables so I can build the same source with different "-D" argument on the command line to produce different outputs. This patch adds support for this pattern. I changed the parser to include the '"' at the beginning and end of a string, which allows the renderer to determine if the user passed in a string or a variable name. This is a bit hacky and causes some of the tests to fail -- these tests look at the string values coming out of the parser. I updated the tests to match the new behavior.
* fixed copyrightRafael G. Martins2015-05-251-1/+1
|
* minor fixesRafael G. Martins2015-05-181-9/+9
|
* renderer: implemented if statementsRafael G. Martins2015-05-181-1/+1
|
* template-parser: convert "if" operator into enumRafael G. Martins2015-05-171-22/+27
|
* template-parser: minor fixes. testsRafael G. Martins2015-05-171-4/+13
|
* template-parser: added real if statements. ignored by renderer for nowRafael G. Martins2015-05-171-13/+123
|
* template-parser: if -> ifdef, if not -> ifndefRafael G. Martins2015-05-171-38/+20
|
* minor fixes for freebsdRafael G. Martins2015-04-281-1/+1
|
* added global variable supportRafael G. Martins2015-04-271-34/+12
|
* template parser: added more testsRafael G. Martins2015-04-231-2/+2
|
* template parser: added "if not" supportRafael G. Martins2015-04-231-3/+31
|
* refactored blocksRafael G. Martins2015-04-211-25/+29
| | | | | | | | | - changed block names: - single_source -> entry - multiple_sources -> listing - multiple_sources_once -> listing_once - added -t cli option, to build listing pages, instead of guess it from the number of source files provided.
* template parser: ignore single bracketsRafael G. Martins2015-04-191-3/+1
|
* safe mallocs are better :)Rafael G. Martins2015-04-191-3/+3
|
* added renderer, without testsRafael G. Martins2015-04-191-2/+9
|
* added loader, error handling and cli. tests neededRafael G. Martins2015-04-181-17/+70
|
* do not allow variables inside multiple_sources_once blocksRafael G. Martins2015-04-181-12/+29
|
* removed unused variableRafael G. Martins2015-04-181-1/+0
|
* replaced leg-based parser with handmade parser for templatesRafael G. Martins2015-04-171-0/+296
yay! no leg parser needed anymore. parsers still needs some work and error handling, though.