static_support
Tristan B. V. Kildaire 2021-06-04 14:52:22 +02:00
parent 0bf4a7f658
commit c8490bfe36
1 changed files with 22 additions and 2 deletions

View File

@ -526,6 +526,26 @@ public final class Parser
}
}
private InitScope getInitScope(Token token)
{
if(getSymbolType(token) == SymbolType.STATIC)
{
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;
}
}
/* STATUS: Not being used yet */
/**
@ -536,8 +556,8 @@ public final class Parser
{
Entity entity;
/* Save and consume the accessor */
AccessorType accessorType = getAccessorType(getCurrentToken());
/* Save and consume the init-scope */
InitScope initScope = getInitScope(getCurrentToken());
nextToken();
/* TODO: Implement me and fix the above */