Merge branch 'vardec_varass_dependency' into feature/modifiers

This commit is contained in:
Tristan B. Velloza Kildaire 2024-02-29 19:42:08 +02:00
commit 93b26570ee
1 changed files with 12 additions and 4 deletions

View File

@ -564,8 +564,12 @@ public final class Parser
/* If it is a type */
if (symbolType == SymbolType.IDENT_TYPE)
{
/* Might be a function, might be a variable, or assignment */
structMember = parseName();
/* Might be a function definition or variable declaration */
structMember = parseTypedDeclaration();
/* Should have a semi-colon and consume it */
expect(SymbolType.SEMICOLON, lexer.getCurrentToken());
lexer.nextToken();
}
/* If it is an accessor */
else if (isAccessor(lexer.getCurrentToken()))
@ -2081,8 +2085,12 @@ public final class Parser
/* If it is a type */
if (symbolType == SymbolType.IDENT_TYPE)
{
/* Might be a function, might be a variable, or assignment */
structMember = parseName();
/* Might be a function definition or variable declaration */
structMember = parseTypedDeclaration();
/* Should have a semi-colon and consume it */
expect(SymbolType.SEMICOLON, lexer.getCurrentToken());
lexer.nextToken();
}
/* If it is a class */
else if(symbolType == SymbolType.CLASS)