Skip to content

Commit

Permalink
normalization of code order
Browse files Browse the repository at this point in the history
  • Loading branch information
bfarmer67 committed Sep 22, 2024
1 parent 36c656e commit 98cd592
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Hyperbee.AsyncExpressions/GotoTransformerVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,10 @@ protected override Expression VisitSwitch( SwitchExpression node )
switchTransition.DefaultNode = _states[defaultIndex];
}

continueToIndex = PopContinueTo();

switchTransition.ContinueTo = _states[continueToIndex];

_states[currentStateIndex].Transition = switchTransition;
_currentStateIndex = continueToIndex;
_currentStateIndex = PopContinueTo();

switchTransition.ContinueTo = _states[_currentStateIndex];

if ( _states[_currentStateIndex].Transition == null && _continueToIndexes.Count > 0 ) // BF: Feel like a bit of a hack.
_states[_currentStateIndex].Transition = new GotoTransition { TargetNode = _states[_continueToIndexes.Peek()] };
Expand Down

0 comments on commit 98cd592

Please sign in to comment.