diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2015-10-26 22:27:19 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2015-10-26 22:27:19 -0700 |
commit | a5128b3c739a79d2bf57de25023603387dcf9ce2 (patch) | |
tree | aec8bb454af64e6f17d6ca7b8ce0e68702d940ea /LICENSE | |
parent | 9293ef61f278ca339f62da5173fc68f9b6d5b482 (diff) | |
download | blogc-a5128b3c739a79d2bf57de25023603387dcf9ce2.tar.gz blogc-a5128b3c739a79d2bf57de25023603387dcf9ce2.tar.bz2 blogc-a5128b3c739a79d2bf57de25023603387dcf9ce2.zip |
Allow {% if VALUE1 == VALUE2 %}, with two defines
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.
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions