mirror of https://github.com/tbklang/tlang.git
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();
|
||||
}
|
||||
/* If it is a modifier */
|
||||
else if(isModifier(tok))
|
||||
{
|
||||
statements ~= parseInitScope();
|
||||
}
|
||||
/* If it is a branch */
|
||||
else if (symbol == SymbolType.IF)
|
||||
{
|
||||
|
|
|
@ -156,6 +156,11 @@ public bool isAccessor(Token token)
|
|||
getSymbolType(token) == SymbolType.PROTECTED;
|
||||
}
|
||||
|
||||
public bool isModifier(Token token)
|
||||
{
|
||||
return getSymbolType(token) == SymbolType.STATIC;
|
||||
}
|
||||
|
||||
public bool isIdentifier_NoDot(Token tokenIn)
|
||||
{
|
||||
/* Make sure it isn't any other type of symbol */
|
||||
|
|
|
@ -106,7 +106,7 @@ public enum AccessorType
|
|||
|
||||
public enum InitScope
|
||||
{
|
||||
STATIC, UNKNOWN
|
||||
STATIC, VIRTUAL, UNKNOWN
|
||||
}
|
||||
|
||||
public class Assignment : Statement
|
||||
|
|
Loading…
Reference in New Issue