Standard Dialect

Alexandru Ciobanu edited this page May 26, 2015 · 3 revisions

This section describes the properties and behavior of the Standard Dialect

The Standard dialect can operate on any given culture. It supports three casing options:

  • Case-insensitive, all keywords, variables and properties are matched regardless of case.
  • Upper-case, all keywords are expected to be upper-case, while variables and properties are case-sensitive.
  • Lower-case, all keywords are expected to be lower-case, while variables and properties are case-sensitive.
Core dialect characters:
  • Tag start ({),
  • Tag end (}),
  • String literal start and end ("),
  • String literal escape (\),
  • Numeric literal decimal point (culture specific).

To insert a literal value of { a sequence of two consecutive {{ characters is required.

The following operators are supposed by the standard dialect:
  • Arithmetic neutral (+),
  • Arithmetic negation (-),
  • Arithmetic addition (+),
  • Arithmetic subtraction (-),
  • Arithmetic multiplication (*),
  • Arithmetic division (/),
  • Arithmetic modulo (%),
  • Bitwise complement of two (~),
  • Bitwise and (&),
  • Bitwise or (|),
  • Bitwise xor (^),
  • Bitwise shift left (<<),
  • Bitwise shift right (>>),
  • Logical not (!),
  • Logical and (&&),
  • Logical or (||),
  • Relational equals (==),
  • Relational not equals (!=),
  • Relational greater than (>),
  • Relational greater than or equals (>=),
  • Relational less than (<),
  • Relational less than or equals (<=),
  • Sequence (..),
  • Format (:).

For more details see Standard Operators.

The following expression flow characters are used in the standard dialect:
  • Group open ((),
  • Group close ()),
  • Group separator (,),
  • Member access (.).

For more details see Standard Operators.

The following directives are supported:
  • Interpolation ({$}),
  • Conditional Interpolation ({$ IF $}),
  • Preserve Formatting ({PREFORMATTED}...{END}),
  • Conditional Evaluation ({IF $ THEN}...{END}),
  • Conditional Evaluation with Alternative ({IF $ THEN}...{ELSE}...{END}),
  • Unconditional Repeat ({REPEAT $ TIMES}...{END}),
  • Sequence Enumeration ({FOR EACH ? IN $}...{END}).

For more details see Standard Directives.

The following special constants are defined:
  • True with a value of True.
  • False with a value of False.
  • NaN with a value of NaN.
  • Infinite with a value of Infinite.
  • Undefined with a value of Undefined.
Un-parsed text default behavior

The default is to trim excessive white-space characters for all un-parsed text. That means that all non-space characters will be replaced by space characters, and all adjacent white-spaces will be trimmed.

The {PREFORMATTED}...{END} directive can be used to disable this behavior for parts of the template.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.