diff options
Diffstat (limited to 'articles')
-rw-r--r-- | articles/asciideck/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/articles/asciideck/index.html b/articles/asciideck/index.html index a7b09d70..17efbfcb 100644 --- a/articles/asciideck/index.html +++ b/articles/asciideck/index.html @@ -80,9 +80,9 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><b><font color="#000000">comment_line</font></b>(<font color="#009900">St</font>) → - «<font color="#FF0000">"//"</font>, <font color="#009900">Comment0</font><font color="#990000">/</font><font color="#FF6600">bits</font>» <font color="#990000">=</font> <b><font color="#000000">read_line</font></b>(<font color="#009900">St</font>), + <font color="#990000"><<</font><font color="#FF0000">"//"</font>, <font color="#009900">Comment0</font><font color="#990000">/</font><font color="#FF6600">bits</font><font color="#990000">>></font> <font color="#990000">=</font> <b><font color="#000000">read_line</font></b>(<font color="#009900">St</font>), <font color="#009900">Comment</font> <font color="#990000">=</font> <b><font color="#000000">trim</font></b>(<font color="#009900">Comment0</font>), - {<font color="#FF6600">comment_line</font>, #{«<font color="#FF0000">"subs"</font>» ⇒ «<font color="#FF0000">"verbatim"</font>»}, <font color="#009900">Comment</font>, <b><font color="#000000">ann</font></b>(<font color="#009900">St</font>)}<font color="#990000">.</font></tt></pre> + {<font color="#FF6600">comment_line</font>, #{<font color="#990000"><<</font><font color="#FF0000">"subs"</font><font color="#990000">>></font> <font color="#990000">=></font> <font color="#990000"><<</font><font color="#FF0000">"verbatim"</font><font color="#990000">>></font>}, <font color="#009900">Comment</font>, <b><font color="#000000">ann</font></b>(<font color="#009900">St</font>)}<font color="#990000">.</font></tt></pre> </div></div> <p>When the line begins with <code>//</code> this matches: we have a comment line and we return the block we just parsed. When the line doesn't begin with <code>//</code> the function will crash and Asciideck will try the next parse function in the list.</p> <p>This makes the code easy to read and improve. I am very happy with how it turned out.</p> |