Skip to content

Commit

Permalink
Small grammar fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Joy-less committed Aug 10, 2023
1 parent 267a140 commit 9d4d90f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public AssignmentStatement(ScriptLoadingContext lcontext, Expression firstExpres
// Replace e.g. "a += b" with "a = a + b"
if (assignmentType != "=")
{
TokenType ArithmeticOperation = assignmentType switch
TokenType operationTokenType = assignmentType switch
{
"+=" => TokenType.Op_Add,
"-=" => TokenType.Op_MinusOrSub,
Expand All @@ -91,7 +91,7 @@ public AssignmentStatement(ScriptLoadingContext lcontext, Expression firstExpres

object operatorChain = BinaryOperatorExpression.BeginOperatorChain();
BinaryOperatorExpression.AddExpressionToChain(operatorChain, firstExpression);
BinaryOperatorExpression.AddOperatorToChain(operatorChain, new Token(ArithmeticOperation, first.SourceId, first.FromLine, first.FromCol, first.ToLine, first.ToCol, first.PrevLine, first.PrevCol));
BinaryOperatorExpression.AddOperatorToChain(operatorChain, new Token(operationTokenType, first.SourceId, first.FromLine, first.FromCol, first.ToLine, first.ToCol, first.PrevLine, first.PrevCol));
BinaryOperatorExpression.AddExpressionToChain(operatorChain, m_RValues[0]);
m_RValues[0] = BinaryOperatorExpression.CommitOperatorChain(operatorChain, lcontext);
}
Expand Down

0 comments on commit 9d4d90f

Please sign in to comment.