Documentation ¶
Overview ¶
Package template converts strings to postfix expressions. In some respects it is separate from tapestry; the postfix expressions themselves require translation into tapestry commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expression ¶
type Expression = postfix.Expression
Expression provides a local alias for postfix.Expression; a series of postfix.Function records.
func Parse ¶
func Parse(template string) (ret Expression, err error)
Parse the passed template string into an expression.
func ParseExpression ¶
func ParseExpression(str string) (ret Expression, err error)
ParseExpression reads a series of simple operand and operator phrases and creates a series of postfix.Function records. ex. "(5+6)*(1+2)" -> 5 6 ADD 1 2 ADD MUL where MUL and ADD are types.Operator, while the numbers are types.Number.
Click to show internal directories.
Click to hide internal directories.