class PreProcessor (View source)

The pre-processor class.

Methods

static string
prepareWrappingStatements(string $str)

Preprocess recursive statements to identify the top-level (outer) statements within a parsed string.

static string
stripWhitespace(string $str)

Strip whitespace before or after delimiters when using <@~ or ~@>.

Details

static string prepareWrappingStatements(string $str)

Preprocess recursive statements to identify the top-level (outer) statements within a parsed string.

Parameters

string $str

Return Value

string The preprocessed string where all outer opening statement delimiters get an additional marker appended.

static string stripWhitespace(string $str)

Strip whitespace before or after delimiters when using <@~ or ~@>.

Parameters

string $str

Return Value

string The processed string