forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(compiler): Add a
kind
field to the parsed AST
The Aspirin team wants to use the output of `parseTemplate` in order to build some g3-internal tooling. However, our AST is very serialization-unfriendly. With this change, all AST nodes now have a `kind`, and can be reasonably navigated after serialization (although the inner fields are still pretty messy). Additionally, create a separate entrypoint that only reexports the AST nodes, so that we can control visibility on a more granular level to the AST alone.t push -f
- Loading branch information
Showing
3 changed files
with
168 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
export { | ||
BlockNode as TmplAstBlockNode, | ||
BoundAttribute as TmplAstBoundAttribute, | ||
BoundDeferredTrigger as TmplAstBoundDeferredTrigger, | ||
BoundEvent as TmplAstBoundEvent, | ||
BoundText as TmplAstBoundText, | ||
Content as TmplAstContent, | ||
Comment as TmplAstComment, | ||
DeferredBlock as TmplAstDeferredBlock, | ||
DeferredBlockError as TmplAstDeferredBlockError, | ||
DeferredBlockLoading as TmplAstDeferredBlockLoading, | ||
DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, | ||
DeferredBlockTriggers as TmplAstDeferredBlockTriggers, | ||
DeferredTrigger as TmplAstDeferredTrigger, | ||
Element as TmplAstElement, | ||
ForLoopBlock as TmplAstForLoopBlock, | ||
ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, | ||
HoverDeferredTrigger as TmplAstHoverDeferredTrigger, | ||
Icu as TmplAstIcu, | ||
IdleDeferredTrigger as TmplAstIdleDeferredTrigger, | ||
IfBlock as TmplAstIfBlock, | ||
IfBlockBranch as TmplAstIfBlockBranch, | ||
ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, | ||
InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, | ||
LetDeclaration as TmplAstLetDeclaration, | ||
NeverDeferredTrigger as TmplAstNeverDeferredTrigger, | ||
Node as TmplAstNode, | ||
RecursiveVisitor as TmplAstRecursiveVisitor, | ||
Reference as TmplAstReference, | ||
SwitchBlock as TmplAstSwitchBlock, | ||
SwitchBlockCase as TmplAstSwitchBlockCase, | ||
Template as TmplAstTemplate, | ||
Text as TmplAstText, | ||
TextAttribute as TmplAstTextAttribute, | ||
TimerDeferredTrigger as TmplAstTimerDeferredTrigger, | ||
UnknownBlock as TmplAstUnknownBlock, | ||
Variable as TmplAstVariable, | ||
ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, | ||
Visitor as TmplAstVisitor, | ||
NodeKind as TmplAstNodeKind, | ||
visitAll as tmplAstVisitAll, | ||
} from './render3/r3_ast'; |
Oops, something went wrong.