Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Templates > Tags

Tags

Available tags are:

  dotted-name          := symbol ( "." symbol ) *

  list-of-dotted-names := dotted-name ( "," dotted-name )*

  import-name := dotted-name [ "." "*" ]
  import-list := "*"
  import-list := import-name ( "," import-name )*

  list-of-assignable-expr := assignable-expr ( "," assignable-expr )*


  <module 
      [ name="symbolname" ]
      [ preserve | compress | pack | silent ] >
    ( <import>
    | <const>
    | <var>
    | <function>  
    | <class>
    | <namespace> ) * 
  </module>


  <import 
    ( href="path" | module="symbolmodule" | from="dotted-name" )
    ( as="symbolnew-name" | entities="import-list" )
    [ taglib="path-to-taglib-xml" ns="symbolnamespace" ]  >


  <namespace 
      name="symbolname"
      [ preserve | compress | pack | silent ] >
    ( <import>
    | <const>
    | <var>
    | <function>  
    | <class>
    | <namespace> ) *
  </namespace>
  

  <class 
      name="symbolname"
      [ extends="dotted-nameclass" ]
      [ implements="list-of-dotted-namesinterfaces" ]
      [ preserve | compress | pack | silent ] >
    ( <import>
    | <const>
    | <var>
    | <function>  
  </class>
  

  <function 
    name="symbolname" 
    ( ( param="symbolparam-name" [ default="exprconst" ] )* [ rest="symbolcollector" ]
    | params="arguments" )
    [ preserve | compress | pack | silent ] >

    ( <import> |
      statement ) *
  </function> 
  

  <var [static] name="symbolname" [ value="exprinitial-value" ] >

  <const name="symbolname" value="exprinitial-value" >


  <print 
    value="exprprintable"
    ( quote 
    | meta 
    | text 
    | nowrap 
    | nl2br 
    | compress 
    | caps 
    | capsfirst 
    | encode )
    | decode )
    | uppercase )
    | lowercase )
    | trim ) *
  >

  <replace ...as above... >
    cdata
  </replace> 


  <if (expr|true|false)="exprcondition" >
    statement *
  [ <else>
    statement * ]
  </if>

  <if (expr|true|false)="exprcondition-1" >
    statement *
  <elseif expr="exprcondition-2" >
    statement *
    ...
  <elseif (expr|true|false)="exprcondition-N" >
    statement *
  [ <else>
    statement * ]
  </if>


  <while [ label="symbollabel" ] (expr|true|false)="exprcondition" >
    statement *
  </while>


  <return [ value="exprreturn-value" ] >

  <break [ to="symbollabel" ] >

  <continue [ to="symbollabel" ] >


  <switch (expr|by)="exprcandidate" >
    ( <case value="exprvalue" >
      statement *
    | <default> 
      statement *
    )*
  </switch>


  <foreach 
      [ label="symbollabel" ] 
      [ index="list-of-assignable-exprindex" ]
      [ key="list-of-assignable-exprkey" ]
      [ value="list-of-assignable-exprvalue" ]
      (expr|in)="expriterable" >
    statement *
  </foreach>


  <for [ label="symbollabel" ] expr="forexprs" >
    statement *
  </for>


  <eval expr="expr" >

  <eval<--
    statements *
  //--></eval>


  <invoke 
    [ params="expr-listparameters" | ( param="exprparam" ) * ]
    method="symbolmethod" 
    from="exprself" 
    [ super ] >


  <call 
    [ params="expr-listparameters" | ( param="exprparam" ) * ]
    function="dotted-namefunction"  >


  <preserve>

  <compress>

  <pack>

  <silent>

See also  | Templates
Contributes notes:
Add a note
What's new | Anvil