changeset 17:5ebf123f3486

Documentation update and code cleanup.
author Mikhail Kryshen <mikhail@kryshen.net>
date Tue, 24 Mar 2009 19:36:09 +0300
parents 5a38106d7a21
children d53cd4995bd4
files doc/manual/manual.tema src/kryshen/tema/FunctionDataParser.java
diffstat 2 files changed, 27 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/doc/manual/manual.tema	Tue Mar 24 18:58:28 2009 +0300
     1.2 +++ b/doc/manual/manual.tema	Tue Mar 24 19:36:09 2009 +0300
     1.3 @@ -107,7 +107,26 @@
     1.4    output      <%:name%> 
     1.5  %>
     1.6  
     1.7 -[%!\ TODO: next_arg, data, has_more_data %]\\
     1.8 +<%function:next_arg
     1.9 +   description <%:\\
    1.10 +     Works in context of <%code:define%> function.
    1.11 +     Parses the next argument from the calling function input.%>
    1.12 +   output <%:next argument text%>
    1.13 +%>
    1.14 +
    1.15 +<%function:data
    1.16 +   description <%:\\
    1.17 +     Works in context of <%code:define%> function.
    1.18 +     Outputs remaining text passed to the calling function.%>
    1.19 +   output <%:next argument text%>
    1.20 +%>
    1.21 +
    1.22 +<%function:has_more_data
    1.23 +   description <%:\\
    1.24 +     Works in context of <%code:define%> function. Returns non-zero value if
    1.25 +     the calling function has more input data available.
    1.26 +   %>
    1.27 +%>
    1.28  
    1.29  <%function:export
    1.30    arguments   <%:definition name%>
    1.31 @@ -192,7 +211,13 @@
    1.32  
    1.33  <%function:while
    1.34    input_data  <%:code%>
    1.35 -  description <%:Repeatedly outputs it's evaluated data while it has non-zero value.%>
    1.36 +  description <%:Repeatedly outputs it's evaluated data while parses with non-zero value.%>
    1.37 +%>
    1.38 +
    1.39 +<%function:if
    1.40 +  arguments   <%:condition%>
    1.41 +  input_data  <%:text%>
    1.42 +  description <%:Outputs the input text if the condition parses with non-zero value.%>
    1.43  %>
    1.44  
    1.45  [%!\ TODO: all functions defined in Control.java %]\\
     2.1 --- a/src/kryshen/tema/FunctionDataParser.java	Tue Mar 24 18:58:28 2009 +0300
     2.2 +++ b/src/kryshen/tema/FunctionDataParser.java	Tue Mar 24 19:36:09 2009 +0300
     2.3 @@ -26,8 +26,6 @@
     2.4  import java.io.Writer;
     2.5  import java.util.ArrayList;
     2.6  import java.util.List;
     2.7 -import static kryshen.tema.TemplateParser.Result;
     2.8 -import static kryshen.tema.TemplateParser.DataFormat;
     2.9  import kryshen.tema.TemplateParser.DataFormat;
    2.10  import static kryshen.tema.TemplateParser.Terminator;
    2.11  import kryshen.tema.io.CopyWriter;