BEE Script is abstracted from BEE Tag. All BEE Script statements are to be pre-processed into BEE Tags before being passed to the compiler.
The standard Script-to-tag translation is as following:
BEE Script: tagname [name=value ...];
is translated to
BEE Tag: <beetagname [name=value ...]>
Some BEE Script statements have special syntax to make it more "natural" to programmers of other common scripting languages.
For example, Conditional statements ("if" and "elseif") and loop statements ("foreach" and "while") must have a small brackets containing the condition at the end of the statement. The block of statements that follow (for conditional execution or loop body) must be surrounded by a pair of curly brackets unless it is a single statement. Please see individual command syntax for details.
For function declaration, the "function" statement is NOT followed by a semi-colon (';'). Instead, it must be followed by an open curly bracket that starts the function body which will be ended by a close curly bracket. The pair of curly brackets cannot be omitted even when there is only one statement in the function body.
|