java.lang.Object
de.grogra.suggest.scope.BaseScope
de.grogra.suggest.scope.SymbolWithScope
de.grogra.suggest.scope.FunctionSymbol
- All Implemented Interfaces:
Member,Scope,Symbol,SymbolWithModifiers,TypedSymbol
- Direct Known Subclasses:
MethodSymbol
This symbol represents a function ala C, not a method ala Java.
You can associate a node in the parse tree that is responsible
for defining this symbol.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.antlr.v4.runtime.ParserRuleContextprotected booleanprotected TypebooleanFields inherited from class de.grogra.suggest.scope.SymbolWithScope
index, modifiers, nameFields inherited from class de.grogra.suggest.scope.BaseScope
enclosingScope, nestedScopesNotSymbols, symbolsFields inherited from interface de.grogra.suggest.scope.Member
ABSTRACT, ALL_VISIBILITY, CLASS, COMPLETE_NAME, CONSTRUCTOR, DECLARED, FIELD, FINAL, INTERFACE, JAVA_TYPE, METHOD, NATIVE, NEW, NODE, PACKAGE, PRIVATE, PROTECTED, PUBLIC, SCOPE, STATIC, STATIC_ONLY, STRICT, SUPER, SYNCHRONIZED, TRANSIENT, VOLATILE, XL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.antlr.v4.runtime.ParserRuleContextintintReturn the number of VariableSymbols specifically defined in the scope.getType()booleanisArray()resolveType(Scope scope) Symbol can be set a type that will be define latter in the file.voidsetDefNode(org.antlr.v4.runtime.ParserRuleContext defNode) voidvoidsetTypeResolved(boolean b) toString()Methods inherited from class de.grogra.suggest.scope.SymbolWithScope
addModifier, equals, getCompleteName, getEnclosingScope, getFullyQualifiedName, getInsertionOrderNumber, getModifiers, getName, getNumberOfSymbols, getQualifiedName, getQualifiedName, getScope, hashCode, setInsertionOrderNumber, setScopeMethods inherited from class de.grogra.suggest.scope.BaseScope
define, define, getAllNestedScopedSymbols, getAllSymbols, getEnclosingPathToRoot, getEnclosingScopeOfType, getMembers, getNestedScopedSymbols, getNestedScopes, getOuterMostEnclosingScope, getSymbol, getSymbolNames, getSymbols, nest, resolve, resolveFirst, setEnclosingScope, toQualifierString, toScopeStackString, toTestString, toTestStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.suggest.scope.Scope
define, define, getAllSymbols, getEnclosingPathToRoot, getNestedScopedSymbols, getNestedScopes, getSymbol, getSymbolNames, getSymbols, nest, resolve, resolveFirst, setEnclosingScope, toQualifierString
-
Field Details
-
defNode
protected org.antlr.v4.runtime.ParserRuleContext defNode -
retType
-
isArray
protected boolean isArray -
typeResolved
public boolean typeResolved -
typeAsText
-
-
Constructor Details
-
FunctionSymbol
-
-
Method Details
-
setDefNode
public void setDefNode(org.antlr.v4.runtime.ParserRuleContext defNode) -
getDefNode
public org.antlr.v4.runtime.ParserRuleContext getDefNode() -
getType
- Specified by:
getTypein interfaceTypedSymbol
-
isArray
public boolean isArray()- Specified by:
isArrayin interfaceTypedSymbol
-
setType
- Specified by:
setTypein interfaceTypedSymbol
-
getNumberOfVariables
public int getNumberOfVariables()Return the number of VariableSymbols specifically defined in the scope. This is useful as either the number of parameters or the number of parameters and locals depending on how you build the scope tree. -
getNumberOfParameters
public int getNumberOfParameters() -
resolveType
Description copied from interface:TypedSymbolSymbol can be set a type that will be define latter in the file. They can save the text as type and mark themselves as type unresovled. Then when the type is fetched for the first type it is looked in the type table.- Specified by:
resolveTypein interfaceTypedSymbol
-
setTypeResolved
public void setTypeResolved(boolean b) - Specified by:
setTypeResolvedin interfaceTypedSymbol
-
toString
- Overrides:
toStringin classSymbolWithScope
-