Support for `static` without preceding accessor, has been added
This commit is contained in:
parent
82cffeaccb
commit
1ddd7f102b
|
@ -449,6 +449,11 @@ public final class Parser
|
||||||
{
|
{
|
||||||
statements ~= parseAccessor();
|
statements ~= parseAccessor();
|
||||||
}
|
}
|
||||||
|
/* If it is a modifier */
|
||||||
|
else if(isModifier(tok))
|
||||||
|
{
|
||||||
|
statements ~= parseInitScope();
|
||||||
|
}
|
||||||
/* If it is a branch */
|
/* If it is a branch */
|
||||||
else if (symbol == SymbolType.IF)
|
else if (symbol == SymbolType.IF)
|
||||||
{
|
{
|
||||||
|
|
|
@ -156,6 +156,11 @@ public bool isAccessor(Token token)
|
||||||
getSymbolType(token) == SymbolType.PROTECTED;
|
getSymbolType(token) == SymbolType.PROTECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool isModifier(Token token)
|
||||||
|
{
|
||||||
|
return getSymbolType(token) == SymbolType.STATIC;
|
||||||
|
}
|
||||||
|
|
||||||
public bool isIdentifier_NoDot(Token tokenIn)
|
public bool isIdentifier_NoDot(Token tokenIn)
|
||||||
{
|
{
|
||||||
/* Make sure it isn't any other type of symbol */
|
/* Make sure it isn't any other type of symbol */
|
||||||
|
|
|
@ -106,7 +106,7 @@ public enum AccessorType
|
||||||
|
|
||||||
public enum InitScope
|
public enum InitScope
|
||||||
{
|
{
|
||||||
STATIC, UNKNOWN
|
STATIC, VIRTUAL, UNKNOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Assignment : Statement
|
public class Assignment : Statement
|
||||||
|
|
Loading…
Reference in New Issue