Module liquid::parser [] [src]

Parser

This module contains functions than can be used for writing plugins but should be ignored for simple usage.

Structs

BlockSplit

Describes the optional trailing part of a block split.

Functions

consume_value_token

Extracts a token from the token stream that can be used to express a value. For our purposes, this is either a string literal, number literal or an identifier that might refer to a variable.

expect

Confirm that the next token in a token stream is what you want it to be. The token iterator is moved to the next token in the stream.

parse

Parses the provided elements into a number of Renderable items This is the internal version of parse that accepts Elements tokenized by lexer::tokenize and does not register built-in blocks. The main use for this function is for writing custom blocks.

parse_output

Creates an Output, a wrapper around values, variables and filters used internally, from a list of Tokens. This is mostly useful for correctly parsing complex expressions with filters.

split_block

A sub-block aware splitter that will only split the token stream when it finds a delimter at the top level of the token stream, ignoring any it finds in nested blocks.

value_token

Recognises a value token, returning an error if a non-value token is presented.