angular_ast library

Classes

AnnotationAst
Represents an annotation @annotation on an element.
AttributeAst
Represents a static attribute assignment (i.e. not bound to an expression).
BananaAst
Represents the [(property)]="value" syntax.
CloseElementAst
Represents the closing DOM element that was parsed.
CommentAst
Represents a comment block of static text.
ContainerAst
Represents an <ng-container> element.
DesugarVisitor
Desugars complex nodes such as [(banana)] into simpler forms.
ElementAst
Represents a DOM element that was parsed, that could be upgraded.
EmbeddedContentAst
Represents an <ng-content> element AST.
EmbeddedTemplateAst
Represents an embedded template (i.e. is not directly rendered in DOM).
EventAst
Represents an event listener (eventName.reductions)="expression" on an element.
ExceptionHandler
HumanizingTemplateAstVisitor
Provides a human-readable view of a template AST tree.
IdentityTemplateAstVisitor<C>
An TemplateAstVisitor that does nothing but return the AST node back.
InterpolationAst
Represents a bound text element to an expression.
LetBindingAst
Represents a 'let-' binding attribute within a
MinimizeWhitespaceVisitor
Applies whitespace reduction to implement (preserveWhitespace: false).
NgAnalyzerRecoveryProtocol
NgAttributeValueToken
NgLexer
Separates an Angular template into a series of lexical tokens.
NgParser
NgToken
Represents a Angular text/token entities.
ParsedAnnotationAst
Represents a real(non-synthetic) parsed AnnotationAst. Preserves offsets.
ParsedAttributeAst
Represents a real(non-synthetic) parsed AttributeAst. Preserves offsets.
ParsedBananaAst
Represents a real, non-synthetic [(property)]="value" syntax.
ParsedCloseElementAst
Represents a real, non-synthetic DOM close element that was parsed.
ParsedDecoratorAst
Represents an interface for a parsed element decorator.
ParsedElementAst
Represents a real, non-synthetic DOM element that was parsed, that could be upgraded.
ParsedEmbeddedContentAst
ParsedEventAst
Represents a real, non-synthetic event listener (event)="expression" on an element.
ParsedInterpolationAst
ParsedLetBindingAst
Represents a real, non-synthetic let- binding: let-var="value".
ParsedPropertyAst
Represents a real, non-synthetic bound property assignment [name.postfix.unit]="value"for an element.
ParsedReferenceAst
Represents a real, non-synthetic reference to an element or exported directive instance.
ParsedStarAst
Represents a real, non-synthetic sugared form of *directive="value".
ParserErrorCode
PropertyAst
Represents a bound property assignment [name.postfix.unit]="value"for an element.
RecoveringExceptionHandler
RecoveryProtocol
RecoverySolution
Setting nextState as null causes scanner to retain original state. Setting tokenToReturn as null causes scanner to consume current token and simply move to next token.
RecursiveTemplateAstVisitor<C>
An TemplateAstVisitor that recursively visits all children of an AST node, in addition to itself.
ReferenceAst
Represents a reference to an element or exported directive instance.
StandaloneTemplateAst
A marker interface for TemplateAst types that do not need to be attached.
StarAst
Represents the sugared form of *directive="value".
SyntheticTemplateAst
An AST node that was created programmatically (not from parsed source).
TagOffsetInfo
Mixin used to preserve offsets of tokens to be able to reproduce the same text. In addition, preserves offsets in cases where banana syntax and template syntax are desugared.
TemplateAst
Represents an AST node parsed from an Angular template.
TemplateAstVisitor<R, C>
A visitor for TemplateAst trees that may process each node.
TextAst
Represents a block of static text (i.e. not bound to a directive).
ThrowingExceptionHandler

Enums

NgTokenType
The types of tokens that can be returned by the NgScanner.

Functions

parse(String template, {required String sourceUrl, bool desugar = true, ExceptionHandler exceptionHandler = const ThrowingExceptionHandler()}) List<TemplateAst>
Returns template parsed as an abstract syntax tree.

Exceptions / Errors

AngularParserException
Exception class to be used in AngularAst parser.