diff options
Diffstat (limited to 'docu')
-rw-r--r-- | docu/language_definition.html | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/docu/language_definition.html b/docu/language_definition.html index 58d2abd..f4bbf52 100644 --- a/docu/language_definition.html +++ b/docu/language_definition.html @@ -164,22 +164,28 @@ <td>More info: <a href="#builtin_if_short">short if-clause</a></td> </tr> <tr> + <td>\~</td> + <td>~</td> + <td><a href="#basic_elems_text">Text elements</a></td> + <td>More info: <a href="#builtin_if_short">short comparasions</a></td> + </tr> + <tr> <td>\{</td> <td>{</td> <td><a href="#basic_elems_text">Text elements</a></td> - <td>More info: <a href="#builtin_if_short">short if-clause</a></td> + <td>More info: <a href="#builtin_if_short">short if-clause</a>, <a href="#builtin_if_short">short comparasions</a></td> </tr> <tr> <td>\}</td> <td>}</td> <td><a href="#basic_elems_text">Text elements</a></td> - <td>More info: <a href="#builtin_if_short">short if-clause</a></td> + <td>More info: <a href="#builtin_if_short">short if-clause</a>, <a href="#builtin_if_short">short comparasions</a></td> </tr> <tr> <td>\|</td> <td>|</td> <td><a href="#basic_elems_text">Text elements</a></td> - <td>More info: <a href="#builtin_if_short">short if-clause</a></td> + <td>More info: <a href="#builtin_if_short">short if-clause</a>, <a href="#builtin_if_short">short comparasions</a></td> </tr> <tr> <td>\\</td> @@ -277,6 +283,14 @@ </ste:if>]]></pre></code> If the variable <code>foo</code> has the content <code>bar</code>, <code>:-)</code> will be returned, <code>:-(</code> otherwise. </p> + <h4 id="builtin_cmp_short">Short syntax for if-clause</h4> + <p>Because comparisons are used often, there is an short syntax:</p> + <p><code>~{a|operator|b}</code></p> + <p>This is equavilent to:</p> + <p><code><![CDATA[<ste:cmp text_a="a" op="operator" text_b="b" />]]></code></p> + <p><code>~</code>, <code>{</code>, <code>|</code> and <code>}</code> can be <a href="#escaping">escaped</a></p> + <p>Because this is implemented as a simple substitution, you can only use <a href="#basic_elems_text">Text</a> and <a href="#basic_elems_variable">Variables</a>. And <code>"</code> must be escaped.</p> + <p><strong>WARNING:</strong> short comparasions can not be nested! They can be inside <a href="#builtin_if_short">short if-clauses</a>, but not the other way around!</p> <h3 id="builtin_not">ste:not</h3> <p>The ste:not Tag will logically invert its content. If it is an empty text (i.e. false), it will return a non-empty text (i.e. true) and vice versa.</p> |