public abstract class DataAggregateSymbol extends SymbolWithScope implements MemberSymbol, Type
| Modifier and Type | Field and Description |
|---|---|
protected org.antlr.v4.runtime.ParserRuleContext |
defNode |
protected int |
nextFreeFieldSlot |
protected int |
typeIndex |
index, nameenclosingScope, nestedScopesNotSymbols, symbols| Constructor and Description |
|---|
DataAggregateSymbol(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
define(Symbol sym)
Define a symbol in this scope, throw IllegalArgumentException
if sym already defined in this scope.
|
List<? extends FieldSymbol> |
getDefinedFields() |
org.antlr.v4.runtime.ParserRuleContext |
getDefNode() |
List<? extends FieldSymbol> |
getFields() |
Map<String,? extends MemberSymbol> |
getMembers() |
int |
getNumberOfDefinedFields()
get the number of fields defined specifically in this class
|
int |
getNumberOfFields()
get the total number of fields visible to this class
|
int |
getSlotNumber() |
List<MemberSymbol> |
getSymbols()
Return the symbols defined within this scope.
|
int |
getTypeIndex()
It is useful during type computation and code gen to assign an int
index to the primitive types and possibly user-defined types like
structs and classes.
|
void |
setDefNode(org.antlr.v4.runtime.ParserRuleContext defNode) |
void |
setSlotNumber(Symbol sym) |
void |
setTypeIndex(int typeIndex) |
equals, getEnclosingScope, getFullyQualifiedName, getInsertionOrderNumber, getName, getNumberOfSymbols, getParentScope, getQualifiedName, getQualifiedName, getScope, hashCode, setInsertionOrderNumber, setScopegetAllNestedScopedSymbols, getAllSymbols, getEnclosingPathToRoot, getEnclosingScopeOfType, getNestedScopedSymbols, getNestedScopes, getOuterMostEnclosingScope, getParentScopes, getSymbol, getSymbolNames, nest, resolve, setEnclosingScope, toQualifierString, toScopeStackString, toString, toTestString, toTestStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitequals, getInsertionOrderNumber, getName, getScope, hashCode, setInsertionOrderNumber, setScopegetAllSymbols, getEnclosingPathToRoot, getNestedScopedSymbols, getNestedScopes, getParentScopes, getSymbol, getSymbolNames, nest, resolve, setEnclosingScope, toQualifierStringprotected org.antlr.v4.runtime.ParserRuleContext defNode
protected int nextFreeFieldSlot
protected int typeIndex
public DataAggregateSymbol(String name)
public void setDefNode(org.antlr.v4.runtime.ParserRuleContext defNode)
public org.antlr.v4.runtime.ParserRuleContext getDefNode()
public void define(Symbol sym) throws IllegalArgumentException
ScopeScope.getSymbols() returns the list in definition order.define in interface Scopedefine in class BaseScopeIllegalArgumentExceptionpublic List<MemberSymbol> getSymbols()
ScopegetSymbols in interface ScopegetSymbols in class BaseScopepublic Map<String,? extends MemberSymbol> getMembers()
getMembers in class BaseScopepublic int getNumberOfDefinedFields()
public int getNumberOfFields()
public List<? extends FieldSymbol> getDefinedFields()
public List<? extends FieldSymbol> getFields()
public void setSlotNumber(Symbol sym)
public int getSlotNumber()
getSlotNumber in interface MemberSymbolpublic int getTypeIndex()
TypegetTypeIndex in interface Typepublic void setTypeIndex(int typeIndex)
Copyright © 2016 ANTLR. All Rights Reserved.