Package | Description |
---|---|
com.google.javascript.jscomp.parsing |
Provides utilities to help with parsing JSDoc annotations and performing AST
transformations.
|
com.google.javascript.jscomp.parsing.parser | |
com.google.javascript.jscomp.parsing.parser.trees |
Modifier and Type | Method and Description |
---|---|
private static ParseTree |
IRFactory.findNearestNode(ParseTree tree) |
Modifier and Type | Method and Description |
---|---|
private static int |
IRFactory.charno(ParseTree node) |
private Node |
IRFactory.TransformDispatcher.convertTypeTree(ParseTree typeTree) |
private static ParseTree |
IRFactory.findNearestNode(ParseTree tree) |
private Comment |
IRFactory.getJsDoc(ParseTree tree) |
private JSDocInfo |
IRFactory.handleInlineJsDoc(ParseTree node) |
private JSDocInfo |
IRFactory.handleJsDoc(ParseTree node) |
private Node |
IRFactory.justTransform(ParseTree node) |
private static int |
IRFactory.lineno(ParseTree node) |
private Node |
IRFactory.maybeInjectCastNode(ParseTree node,
JSDocInfo info,
Node irNode) |
(package private) void |
IRFactory.TransformDispatcher.maybeProcessAccessibilityModifier(Node n,
ParseTree tree,
TokenType type) |
private void |
IRFactory.TransformDispatcher.maybeProcessType(Node typeTarget,
ParseTree typeTree) |
(package private) boolean |
IRFactory.TransformDispatcher.maybeReportGetter(ParseTree node)
Reports an illegal getter and returns true if the language mode is too low.
|
(package private) boolean |
IRFactory.TransformDispatcher.maybeReportSetter(ParseTree node)
Reports an illegal setter and returns true if the language mode is too low.
|
(package private) void |
IRFactory.TransformDispatcher.maybeWarnEs6Feature(ParseTree node,
FeatureSet.Feature feature) |
(package private) void |
IRFactory.TransformDispatcher.maybeWarnTypeSyntax(ParseTree node,
FeatureSet.Feature feature) |
Node |
IRFactory.TransformDispatcher.process(ParseTree node) |
(package private) Node |
IRFactory.TransformDispatcher.processIllegalToken(ParseTree node) |
private void |
IRFactory.setSourceInfo(Node irNode,
ParseTree node) |
private boolean |
IRFactory.shouldAttachJSDocHere(ParseTree tree) |
private Node |
IRFactory.transform(ParseTree tree) |
private Node |
IRFactory.transformBlock(ParseTree node) |
private Node |
IRFactory.transformNodeWithInlineJsDoc(ParseTree node)
Names and destructuring patterns, in parameters or variable declarations are special,
because they can have inline type docs attached.
|
(package private) Node |
IRFactory.TransformDispatcher.transformOrEmpty(IdentifierToken token,
ParseTree parent) |
(package private) Node |
IRFactory.TransformDispatcher.transformOrEmpty(ParseTree tree,
ParseTree parent) |
(package private) Node |
IRFactory.TransformDispatcher.unsupportedLanguageFeature(ParseTree node,
java.lang.String feature) |
Modifier and Type | Method and Description |
---|---|
private boolean |
IRFactory.TransformDispatcher.checkParameters(com.google.common.collect.ImmutableList<ParseTree> params) |
private Node |
IRFactory.TransformDispatcher.transformList(int type,
com.google.common.collect.ImmutableList<ParseTree> list) |
private Node |
IRFactory.TransformDispatcher.transformListOrEmpty(int type,
com.google.common.collect.ImmutableList<ParseTree> list) |
Modifier and Type | Method and Description |
---|---|
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseAmbientNamespaceElements() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseCaseClauses() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseCaseStatementsOpt() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseClassElements(boolean isAmbient) |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseEnumMembers() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseExportSpecifierSet() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseGlobalSourceElements() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseImportSpecifierSet() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseInterfaceElements() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseNamespaceElements() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseSourceElementList() |
private com.google.common.collect.ImmutableList<ParseTree> |
Parser.parseStatementList() |
Modifier and Type | Method and Description |
---|---|
private void |
Parser.maybeReportNoInitializer(TokenType token,
ParseTree lvalue)
Reports if declaration requires an initializer, assuming initializer is absent.
|
private ParseTree |
Parser.parseForInStatement(SourcePosition start,
ParseTree initializer) |
private ParseTree |
Parser.parseForOfStatement(SourcePosition start,
ParseTree initializer) |
private ParseTree |
Parser.parseForStatement(SourcePosition start,
ParseTree initializer) |
private TemplateLiteralExpressionTree |
Parser.parseTemplateLiteral(ParseTree operand)
Constructs a template literal expression tree.
|
private void |
Parser.resetScanner(ParseTree tree) |
private FormalParameterListTree |
Parser.transformArrowFunctionParameters(SourcePosition start,
ParseTree tree) |
private ParseTree |
Parser.transformLeftHandSideExpression(ParseTree tree)
Transforms a LeftHandSideExpression into a LeftHandSidePattern if possible.
|
Modifier and Type | Field and Description |
---|---|
ParseTree |
FinallyTree.block |
ParseTree |
ForInStatementTree.body |
ParseTree |
TryStatementTree.body |
ParseTree |
ForStatementTree.body |
ParseTree |
WithStatementTree.body |
ParseTree |
WhileStatementTree.body |
ParseTree |
ForOfStatementTree.body |
ParseTree |
DoWhileStatementTree.body |
ParseTree |
TryStatementTree.catchBlock |
ParseTree |
CatchTree.catchBody |
ParseTree |
ForInStatementTree.collection |
ParseTree |
ComprehensionForTree.collection |
ParseTree |
ForOfStatementTree.collection |
ParseTree |
IfStatementTree.condition |
ParseTree |
ForStatementTree.condition |
ParseTree |
WhileStatementTree.condition |
ParseTree |
ConditionalExpressionTree.condition |
ParseTree |
DoWhileStatementTree.condition |
ParseTree |
AmbientDeclarationTree.declaration |
ParseTree |
ExportDeclarationTree.declaration |
ParseTree |
ComputedPropertyMemberVariableTree.declaredType |
ParseTree |
IndexSignatureTree.declaredType |
ParseTree |
MemberVariableTree.declaredType |
ParseTree |
VariableDeclarationTree.declaredType |
ParseTree |
DefaultParameterTree.defaultValue |
ParseTree |
ArrayTypeTree.elementType |
ParseTree |
IfStatementTree.elseClause |
ParseTree |
CatchTree.exception |
ParseTree |
ExpressionStatementTree.expression |
ParseTree |
ParenExpressionTree.expression |
ParseTree |
ComprehensionIfTree.expression |
ParseTree |
CaseClauseTree.expression |
ParseTree |
SpreadExpressionTree.expression |
ParseTree |
WithStatementTree.expression |
ParseTree |
TemplateSubstitutionTree.expression |
ParseTree |
YieldExpressionTree.expression |
ParseTree |
ReturnStatementTree.expression |
ParseTree |
SwitchStatementTree.expression |
ParseTree |
TryStatementTree.finallyBlock |
ParseTree |
FunctionDeclarationTree.functionBody |
ParseTree |
IfStatementTree.ifClause |
ParseTree |
ForStatementTree.increment |
ParseTree |
ForInStatementTree.initializer |
ParseTree |
ComprehensionForTree.initializer |
ParseTree |
ForStatementTree.initializer |
ParseTree |
ForOfStatementTree.initializer |
ParseTree |
VariableDeclarationTree.initializer |
ParseTree |
BinaryOperatorTree.left |
ParseTree |
ConditionalExpressionTree.left |
ParseTree |
DefaultParameterTree.lhs |
ParseTree |
VariableDeclarationTree.lvalue |
ParseTree |
MemberLookupExpressionTree.memberExpression |
ParseTree |
ComputedPropertyMethodTree.method |
ParseTree |
IndexSignatureTree.name |
ParseTree |
TemplateLiteralExpressionTree.operand |
ParseTree |
NewExpressionTree.operand |
ParseTree |
CallExpressionTree.operand |
ParseTree |
MemberLookupExpressionTree.operand |
ParseTree |
UnaryExpressionTree.operand |
ParseTree |
MemberExpressionTree.operand |
ParseTree |
PostfixExpressionTree.operand |
ParseTree |
TypeAliasTree.original |
ParseTree |
TypedParameterTree.param |
ParseTree |
OptionalParameterTree.param |
ParseTree |
ComputedPropertyMemberVariableTree.property |
ParseTree |
ComputedPropertyGetterTree.property |
ParseTree |
ComputedPropertyDefinitionTree.property |
ParseTree |
ComputedPropertyMethodTree.property |
ParseTree |
ComputedPropertySetterTree.property |
ParseTree |
ComputedPropertyGetterTree.returnType |
ParseTree |
CallSignatureTree.returnType |
ParseTree |
GetAccessorTree.returnType |
ParseTree |
FunctionTypeTree.returnType |
ParseTree |
FunctionDeclarationTree.returnType |
ParseTree |
BinaryOperatorTree.right |
ParseTree |
ConditionalExpressionTree.right |
ParseTree |
LabelledStatementTree.statement |
ParseTree |
ClassDeclarationTree.superClass |
ParseTree |
ComprehensionTree.tailExpression |
ParseTree |
SetAccessorTree.type |
ParseTree |
ComputedPropertySetterTree.type |
ParseTree |
TypedParameterTree.typeAnnotation |
ParseTree |
PropertyNameAssignmentTree.value |
ParseTree |
ComputedPropertyDefinitionTree.value |
ParseTree |
ThrowStatementTree.value |
Modifier and Type | Field and Description |
---|---|
com.google.common.collect.ImmutableList<ParseTree> |
ArgumentListTree.arguments |
com.google.common.collect.ImmutableList<ParseTree> |
SwitchStatementTree.caseClauses |
com.google.common.collect.ImmutableList<ParseTree> |
ComprehensionTree.children |
com.google.common.collect.ImmutableList<ParseTree> |
TemplateLiteralExpressionTree.elements |
com.google.common.collect.ImmutableList<ParseTree> |
ArrayLiteralExpressionTree.elements |
com.google.common.collect.ImmutableList<ParseTree> |
NamespaceDeclarationTree.elements |
com.google.common.collect.ImmutableList<ParseTree> |
ArrayPatternTree.elements |
com.google.common.collect.ImmutableList<ParseTree> |
ClassDeclarationTree.elements |
com.google.common.collect.ImmutableList<ParseTree> |
InterfaceDeclarationTree.elements |
com.google.common.collect.ImmutableList<ParseTree> |
ExportDeclarationTree.exportSpecifierList |
com.google.common.collect.ImmutableList<ParseTree> |
CommaExpressionTree.expressions |
com.google.common.collect.ImmutableList<ParseTree> |
ObjectPatternTree.fields |
java.util.LinkedHashMap<IdentifierToken,ParseTree> |
GenericTypeListTree.generics |
com.google.common.collect.ImmutableList<ParseTree> |
ImportDeclarationTree.importSpecifierList |
com.google.common.collect.ImmutableList<ParseTree> |
ClassDeclarationTree.interfaces |
com.google.common.collect.ImmutableList<ParseTree> |
EnumDeclarationTree.members |
com.google.common.collect.ImmutableList<ParseTree> |
RecordTypeTree.members |
com.google.common.collect.ImmutableList<ParseTree> |
FormalParameterListTree.parameters |
com.google.common.collect.ImmutableList<ParseTree> |
ObjectLiteralExpressionTree.propertyNameAndValues |
com.google.common.collect.ImmutableList<ParseTree> |
ProgramTree.sourceElements |
com.google.common.collect.ImmutableList<ParseTree> |
DefaultClauseTree.statements |
com.google.common.collect.ImmutableList<ParseTree> |
CaseClauseTree.statements |
com.google.common.collect.ImmutableList<ParseTree> |
BlockTree.statements |
com.google.common.collect.ImmutableList<ParseTree> |
InterfaceDeclarationTree.superInterfaces |
com.google.common.collect.ImmutableList<ParseTree> |
ParameterizedTypeTree.typeArguments |
com.google.common.collect.ImmutableList<ParseTree> |
UnionTypeTree.types |
Constructor and Description |
---|
ArgumentListTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> arguments) |
ArrayLiteralExpressionTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> elements) |
ArrayPatternTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> elements) |
BlockTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> statements) |
CaseClauseTree(SourceRange location,
ParseTree expression,
com.google.common.collect.ImmutableList<ParseTree> statements) |
ClassDeclarationTree(SourceRange location,
IdentifierToken name,
GenericTypeListTree generics,
ParseTree superClass,
com.google.common.collect.ImmutableList<ParseTree> interfaces,
com.google.common.collect.ImmutableList<ParseTree> elements) |
ClassDeclarationTree(SourceRange location,
IdentifierToken name,
GenericTypeListTree generics,
ParseTree superClass,
com.google.common.collect.ImmutableList<ParseTree> interfaces,
com.google.common.collect.ImmutableList<ParseTree> elements) |
CommaExpressionTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> expressions) |
ComprehensionTree(SourceRange location,
ComprehensionTree.ComprehensionType type,
com.google.common.collect.ImmutableList<ParseTree> children,
ParseTree tailExpression) |
DefaultClauseTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> statements) |
EnumDeclarationTree(SourceRange location,
IdentifierToken name,
com.google.common.collect.ImmutableList<ParseTree> members) |
ExportDeclarationTree(SourceRange location,
boolean isDefault,
boolean isExportAll,
ParseTree declaration,
com.google.common.collect.ImmutableList<ParseTree> exportSpecifierList,
LiteralToken from) |
FormalParameterListTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> parameters) |
GenericTypeListTree(SourceRange location,
java.util.LinkedHashMap<IdentifierToken,ParseTree> generics) |
ImportDeclarationTree(SourceRange location,
IdentifierToken defaultBindingIdentifier,
com.google.common.collect.ImmutableList<ParseTree> importSpecifierList,
IdentifierToken nameSpaceImportIdentifier,
LiteralToken moduleSpecifier) |
InterfaceDeclarationTree(SourceRange location,
IdentifierToken name,
GenericTypeListTree generics,
com.google.common.collect.ImmutableList<ParseTree> superInterfaces,
com.google.common.collect.ImmutableList<ParseTree> elements) |
InterfaceDeclarationTree(SourceRange location,
IdentifierToken name,
GenericTypeListTree generics,
com.google.common.collect.ImmutableList<ParseTree> superInterfaces,
com.google.common.collect.ImmutableList<ParseTree> elements) |
NamespaceDeclarationTree(SourceRange location,
NamespaceNameTree name,
com.google.common.collect.ImmutableList<ParseTree> elements) |
ObjectLiteralExpressionTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> propertyNameAndValues) |
ObjectPatternTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> fields) |
ParameterizedTypeTree(SourceRange location,
TypeNameTree typeName,
com.google.common.collect.ImmutableList<ParseTree> typeArguments) |
ProgramTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> sourceElements,
com.google.common.collect.ImmutableList<Comment> sourceComments) |
RecordTypeTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> members) |
SwitchStatementTree(SourceRange location,
ParseTree expression,
com.google.common.collect.ImmutableList<ParseTree> caseClauses) |
TemplateLiteralExpressionTree(SourceRange location,
ParseTree operand,
com.google.common.collect.ImmutableList<ParseTree> elements) |
UnionTypeTree(SourceRange location,
com.google.common.collect.ImmutableList<ParseTree> types) |