Add `!else` support for conditional block v0.14.0
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 5 Oct 2023 20:57:57 +0000 (16:57 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 6 Oct 2023 18:01:52 +0000 (14:01 -0400)
commit12b5dbc00bcadb1feb11cf7f0583de646a61aacf
treeccfdbc06ecff24c1d155debb43430dba6dbcf96c
parentfc21bb27ebb58b9b1dcd2184685d928ffabcc252
Add `!else` support for conditional block

This patch adds the support of `!else` within an `!if` context:

    !if something
      11 22 33
    !else
      44 55 66
    !end

This is just equivalent to:

    !if something
      11 22 33
    !end

    !if {not something}
      44 55 66
    !end

but more readable/natural.

Change-Id: I0efa68a65c485d7dbf8124cd51fc5ed3c1ac9f46
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
README.adoc
normand/normand.py
pyproject.toml
tests/fail-cond-blk-else-missing-end.nt [new file with mode: 0644]
tests/fail-macro-def-in-cond.nt
tests/pass-cond-blk-else.nt [new file with mode: 0644]
tests/pass-readme-learn-cond-1.nt
This page took 0.0243 seconds and 4 git commands to generate.