This commit is contained in:
nub31
2025-09-20 02:01:53 +02:00
parent 0afd4545f5
commit 73c9a10e8f
4 changed files with 19 additions and 11 deletions

View File

@@ -211,6 +211,8 @@ public sealed class Parser
private StatementSyntax ParseStatement()
{
var startIndex = _tokenIndex;
if (CurrentToken is SymbolToken symbol)
{
switch (symbol.Symbol)
@@ -236,12 +238,6 @@ public sealed class Parser
}
}
return ParseStatementExpression();
}
private StatementSyntax ParseStatementExpression()
{
var startIndex = _tokenIndex;
var expr = ParseExpression();
if (TryExpectSymbol(Symbol.Assign))