class Marten::Template::Parser
- Marten::Template::Parser
- Reference
- Object
Overview
The Marten template parser.
This class allows to parse a raw template in order to produce a node set. Under the hood, the parser will leverage
a lexer (Marten::Template::Parser::Lexer
) in order to generate a Marten::Template::NodeSet
object, which
contains the set of nodes that were generated from the parsing process. These nodes are all able to be rendered
in order to then generate a final output for a given context.
Defined in:
marten/template/parser.crmarten/template/parser/lexer.cr
marten/template/parser/token.cr
marten/template/parser/token_type.cr
Constructors
Instance Method Summary
- #encountered_block_names : Array(String)
-
#parse(up_to : Array(String) | Nil | Tuple = nil) : NodeSet
Generates a set of nodes from the lexical tokens.
-
#shift_token
Extracts the next token from the available lexical tokens.
Constructor Detail
Instance Method Detail
Generates a set of nodes from the lexical tokens.