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 |
---|---|
(package private) void |
IRFactory.TransformDispatcher.maybeProcessAccessibilityModifier(Node n,
ParseTree tree,
TokenType type) |
private static int |
IRFactory.transformBinaryTokenType(TokenType token) |
private static int |
IRFactory.transformBooleanTokenType(TokenType token) |
private static int |
IRFactory.transformPostfixTokenType(TokenType token) |
private static int |
IRFactory.transformUnaryTokenType(TokenType token) |
Modifier and Type | Field and Description |
---|---|
TokenType |
Keywords.type |
TokenType |
Token.type |
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<TokenType,Keywords> |
Keywords.KEYWORDS_BY_TYPE |
Modifier and Type | Method and Description |
---|---|
static TokenType |
Keywords.getTokenType(java.lang.String value) |
private TokenType |
Parser.maybeParseAccessibilityModifier() |
private TokenType |
Parser.peekType()
Returns the TokenType of the next token.
|
private TokenType |
Parser.peekType(int index)
Returns the TokenType of the index-th next token.
|
static TokenType |
TokenType.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TokenType[] |
TokenType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
private Token |
Scanner.createToken(TokenType type,
int beginToken) |
private Token |
Parser.eat(TokenType expectedTokenType)
Consumes the next token.
|
private Token |
Parser.eatOpt(TokenType expectedTokenType)
Consumes the next token if it is of the expected type.
|
static Keywords |
Keywords.get(TokenType token) |
static boolean |
Keywords.isKeyword(TokenType token) |
static boolean |
Keywords.isStrictKeyword(TokenType token)
Returns true if
token is a "future reserved word" which can
be used as a variable identifier, but only in non-strict mode. |
private void |
Parser.maybeReportNoInitializer(TokenType token,
ParseTree lvalue)
Reports if declaration requires an initializer, assuming initializer is absent.
|
private LiteralToken |
Scanner.nextTemplateLiteralTokenShared(TokenType endType,
TokenType middleType) |
private ParseTree |
Parser.parseClassMemberDeclaration(boolean allowStatic,
boolean isAmbient,
TokenType access) |
private ParseTree |
Parser.parseComprehension(ComprehensionTree.ComprehensionType type,
TokenType startToken,
TokenType endToken) |
private FunctionDeclarationTree |
Parser.parseFunctionTail(SourcePosition start,
IdentifierToken name,
boolean isStatic,
boolean isGenerator,
TokenType access,
FunctionDeclarationTree.Kind kind) |
private ParseTree |
Parser.parseGetAccessor(TokenType access) |
private FunctionDeclarationTree |
Parser.parseMethodSignature(SourcePosition start,
IdentifierToken name,
boolean isStatic,
boolean isGenerator,
boolean isOptional,
TokenType access) |
private ParseTree |
Parser.parseSetAccessor(TokenType access) |
private VariableDeclarationTree |
Parser.parseVariableDeclaration(TokenType binding,
Parser.Expression expressionIn) |
private boolean |
Parser.peek(int index,
TokenType expectedType)
Returns true if the index-th next token is of the expected type.
|
private boolean |
Parser.peek(TokenType expectedType)
Returns true if the next token is of the expected type.
|
Constructor and Description |
---|
Keywords(java.lang.String value,
TokenType type) |
LiteralToken(TokenType type,
java.lang.String value,
SourceRange location) |
Token(TokenType type,
SourceRange location) |
Modifier and Type | Field and Description |
---|---|
TokenType |
ComputedPropertyGetterTree.access |
TokenType |
MemberVariableTree.access |
TokenType |
FunctionDeclarationTree.access |
TokenType |
ComputedPropertyMemberVariableTree.access |
TokenType |
ComputedPropertyMethodTree.access |
TokenType |
ComputedPropertySetterTree.access |
TokenType |
VariableDeclarationListTree.declarationType |
Constructor and Description |
---|
ComputedPropertyGetterTree(SourceRange location,
ParseTree property,
boolean isStatic,
TokenType access,
ParseTree returnType,
BlockTree body) |
ComputedPropertyMemberVariableTree(SourceRange location,
ParseTree property,
boolean isStatic,
TokenType access,
ParseTree declaredType) |
ComputedPropertyMethodTree(SourceRange location,
TokenType access,
ParseTree property,
ParseTree method) |
ComputedPropertySetterTree(SourceRange location,
ParseTree property,
boolean isStatic,
TokenType access,
IdentifierToken parameter,
ParseTree type,
BlockTree body) |
FunctionDeclarationTree(SourceRange location,
IdentifierToken name,
GenericTypeListTree generics,
boolean isStatic,
boolean isGenerator,
boolean isOptional,
TokenType access,
FunctionDeclarationTree.Kind kind,
FormalParameterListTree formalParameterList,
ParseTree returnType,
ParseTree functionBody) |
MemberVariableTree(SourceRange location,
IdentifierToken name,
boolean isStatic,
boolean isOptional,
TokenType access,
ParseTree declaredType) |
VariableDeclarationListTree(SourceRange location,
TokenType declarationType,
com.google.common.collect.ImmutableList<VariableDeclarationTree> declarations) |