private void Expression(Stack<ExpressionOperation> operations)
{
Term(operations);
while (AssemblyTokenizer.IsExpressionOperation(tokens[pos].Type))
{
if (Accept(TokenType.Add))
{
Term(operations);
operations.Push(new ExpressionOperation(TokenType.Add));
}
else if (Accept(TokenType.Subtract))
{
Term(operations);
operations.Push(new ExpressionOperation(TokenType.Subtract));
}
else
throw new AssemblerException("Expected expression operation.");
}
}