Added InitScope, for STATIC

This commit is contained in:
Tristan B. Velloza Kildaire 2021-06-04 21:28:30 +02:00
parent c8490bfe36
commit 948238d4e9
2 changed files with 7 additions and 15 deletions

View File

@ -532,14 +532,6 @@ public final class Parser
{
return InitScope.STATIC;
}
else if(getSymbolType(token) == SymbolType.PROTECTED)
{
return AccessorType.PROTECTED;
}
else if(getSymbolType(token) == SymbolType.PRIVATE)
{
return AccessorType.PRIVATE;
}
else
{
return InitScope.UNKNOWN;

View File

@ -104,9 +104,9 @@ public enum AccessorType
PUBLIC, PRIVATE, PROTECTED, UNKNOWN
}
public enum FunctionType
public enum InitScope
{
STATIC, VIRTUAL
STATIC, UNKNOWN
}
public class Assignment : Statement
@ -128,7 +128,7 @@ public class Entity : Statement
private AccessorType accessorType = AccessorType.PUBLIC;
/* Function/Modifier type */
private FunctionType functionType;
private InitScope initScope;
/* Name of the entity (class's name, function's name, variable's name) */
protected string name;
@ -148,14 +148,14 @@ public class Entity : Statement
return accessorType;
}
public void setModifierType(FunctionType functionType)
public void setModifierType(InitScope initScope)
{
this.functionType = functionType;
this.initScope = initScope;
}
public FunctionType getModifierType()
public InitScope getModifierType()
{
return functionType;
return initScope;
}
public string getName()