TemplateParser class

Converts template source into a TemplateNode syntax tree.

The parser recognizes escaped ({{ ... }}) and raw ({!! ... !!}) output, plus layout, section, yield, include, CSRF, conditional, and loop directives.

Constructors

TemplateParser(String source)
Creates a parser and tokenizes source.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseNodes({required Set<String> stopAt}) List<Node>
Parses nodes until end-of-file or a directive named in stopAt.
parseTemplate() TemplateNode
Parses the complete source and returns its template tree.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited