Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...
View   r2  >  r1  ...
TWikiIfDotPm 2 - 16 Jan 2007 - Main.TWikiContributor

TWikiIfDotPm 1 - 01 Feb 2006 - Main.TWikiContributor
Line: 1 to 1
Added:
>
>

Package TWiki::If

Support for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated.

ClassMethod new (\%operators) -> \%factory

Construct a new if node factory.
  • \%operators reference to a hash of operators.
Each operator must have the following fields: prec (precedence) type (0 unary 1 binary) exec (ref to a function to execute). If not provided, the default set of boolean operations supported by %IF is used.

ObjectMethod evaluate ($twiki) -> $result

Execute the parse node.

!!!new!!!

ObjectMethod parse ($string) -> \$if

  • $string - string containing an expression to parse
Construct a new search node by parsing the passed expression. Return the new object.

Revision 2r2 - 16 Jan 2007 - 04:12:02 - TWikiContributor
Revision 1r1 - 01 Feb 2006 - 12:01:25 - TWikiContributor
This site is powered by the TWiki collaboration platform.
All material on this collaboration platform is the property of the contributing authors.
All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4.
Syndicate this site RSSATOM