Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
Modifier and Type | Field and Description |
---|---|
private SymbolTable.Symbol |
SymbolTable.SymbolScope.mySymbol |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,SymbolTable.Symbol> |
SymbolTable.SymbolScope.ownSymbols |
private com.google.common.collect.Ordering<SymbolTable.Symbol> |
SymbolTable.symbolOrdering |
private com.google.common.collect.Table<Node,java.lang.String,SymbolTable.Symbol> |
SymbolTable.symbols
All symbols in the program, uniquely identified by the node where
they're declared and their name.
|
private java.util.List<SymbolTable.Symbol> |
SymbolTable.ThisRefCollector.thisStack |
Modifier and Type | Method and Description |
---|---|
private SymbolTable.Symbol |
SymbolTable.addSymbol(java.lang.String name,
JSType type,
boolean inferred,
SymbolTable.SymbolScope scope,
Node declNode) |
private SymbolTable.Symbol |
SymbolTable.copySymbolTo(StaticSlot sym,
Node declNode,
SymbolTable.SymbolScope scope) |
private SymbolTable.Symbol |
SymbolTable.copySymbolTo(StaticSlot sym,
SymbolTable.SymbolScope scope) |
SymbolTable.Symbol |
SymbolTable.declareInferredSymbol(SymbolTable.SymbolScope scope,
java.lang.String name,
Node declNode)
Declare a symbol after the main symbol table was constructed.
|
private SymbolTable.Symbol |
SymbolTable.declareSymbol(java.lang.String name,
JSType type,
boolean inferred,
SymbolTable.SymbolScope scope,
Node declNode,
JSDocInfo info) |
private SymbolTable.Symbol |
SymbolTable.findSymbolForScope(SymbolTable.SymbolScope scope)
Find the symbol associated with the given scope.
|
(package private) SymbolTable.Symbol |
SymbolTable.SymbolScope.getOwnSlot(java.lang.String name) |
SymbolTable.Symbol |
SymbolTable.getParameterInFunction(SymbolTable.Symbol sym,
java.lang.String paramName)
If
sym is a function, try to find a Symbol for
a parameter with the given name. |
SymbolTable.Symbol |
SymbolTable.SymbolScope.getQualifiedSlot(java.lang.String name)
Get the slot for a fully-qualified name (e.g., "a.b.c") by trying
to find property scopes at each part of the path.
|
SymbolTable.Symbol |
SymbolTable.SymbolScope.getSlot(java.lang.String name) |
SymbolTable.Symbol |
SymbolTable.getSymbolDeclaredBy(EnumType enumType)
Gets the symbol for the given enum.
|
SymbolTable.Symbol |
SymbolTable.getSymbolDeclaredBy(FunctionType fn)
Gets the symbol for the given constructor or interface.
|
SymbolTable.Symbol |
SymbolTable.getSymbolForInstancesOf(FunctionType fn)
Gets the symbol for the prototype of the given constructor or interface.
|
SymbolTable.Symbol |
SymbolTable.getSymbolForInstancesOf(SymbolTable.Symbol sym)
Gets the symbol for the prototype if this is the symbol for a constructor
or interface.
|
private SymbolTable.Symbol |
SymbolTable.getSymbolForName(Node source,
java.lang.String name) |
(package private) SymbolTable.Symbol |
SymbolTable.SymbolScope.getSymbolForScope() |
SymbolTable.Symbol |
SymbolTable.getSymbolForScope(SymbolTable.SymbolScope scope)
All local scopes are associated with a function, and some functions
are associated with a symbol.
|
private SymbolTable.Symbol |
SymbolTable.getSymbolForTypeHelper(JSType type,
boolean linkToCtor)
Gets all symbols associated with the given type.
|
private SymbolTable.Symbol |
SymbolTable.isAnySymbolDeclared(java.lang.String name,
Node declNode,
SymbolTable.SymbolScope scope)
Checks if any symbol is already declared at the given node and scope
for the given name.
|
private SymbolTable.Symbol |
SymbolTable.JSDocInfoCollector.lookupPossiblyDottedName(SymbolTable.SymbolScope scope,
java.lang.String dottedName) |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<SymbolTable.Symbol> |
SymbolTable.getAllSymbols() |
java.util.List<SymbolTable.Symbol> |
SymbolTable.getAllSymbolsForType(JSType type)
Gets all symbols associated with the given type.
|
java.lang.Iterable<SymbolTable.Symbol> |
SymbolTable.getAllSymbolsForTypeOf(SymbolTable.Symbol sym)
Get all symbols associated with the type of the given symbol.
|
java.util.List<SymbolTable.Symbol> |
SymbolTable.getAllSymbolsSorted()
Get the symbols in their natural ordering.
|
com.google.common.collect.Ordering<SymbolTable.Symbol> |
SymbolTable.getNaturalSymbolOrdering()
Gets the 'natural' ordering of symbols.
|
Modifier and Type | Method and Description |
---|---|
private void |
SymbolTable.createPropertyScopeFor(SymbolTable.Symbol s)
Build a property scope for the given symbol.
|
java.lang.Iterable<SymbolTable.Symbol> |
SymbolTable.getAllSymbolsForTypeOf(SymbolTable.Symbol sym)
Get all symbols associated with the type of the given symbol.
|
int |
SymbolTable.SymbolScope.getIndexOfSymbol(SymbolTable.Symbol sym)
Gets a unique index for the symbol in this scope.
|
SymbolTable.Symbol |
SymbolTable.getParameterInFunction(SymbolTable.Symbol sym,
java.lang.String paramName)
If
sym is a function, try to find a Symbol for
a parameter with the given name. |
java.util.List<SymbolTable.Reference> |
SymbolTable.getReferenceList(SymbolTable.Symbol symbol) |
java.lang.Iterable<SymbolTable.Reference> |
SymbolTable.getReferences(SymbolTable.Symbol symbol) |
SymbolTable.SymbolScope |
SymbolTable.getScope(SymbolTable.Symbol slot) |
private SymbolTable.SymbolScope |
SymbolTable.getScopeInFunction(SymbolTable.Symbol sym) |
SymbolTable.Symbol |
SymbolTable.getSymbolForInstancesOf(SymbolTable.Symbol sym)
Gets the symbol for the prototype if this is the symbol for a constructor
or interface.
|
private boolean |
SymbolTable.PropertyRefCollector.maybeDefineReference(Node n,
java.lang.String propName,
SymbolTable.Symbol ownerSymbol) |
private boolean |
SymbolTable.needsPropertyScope(SymbolTable.Symbol sym) |
private void |
SymbolTable.removeSymbol(SymbolTable.Symbol s) |
(package private) void |
SymbolTable.SymbolScope.setSymbolForScope(SymbolTable.Symbol sym) |
private void |
SymbolTable.toDebugString(java.lang.StringBuilder builder,
SymbolTable.Symbol symbol) |
Constructor and Description |
---|
Reference(SymbolTable.Symbol symbol,
Node node) |
SymbolScope(Node rootNode,
SymbolTable.SymbolScope parent,
JSType typeOfThis,
SymbolTable.Symbol mySymbol) |