protected void HandleIf(TokenList aTokens, string xComparison) { string xLabel; var xLast = aTokens.Last(); if (xLast.Value == "{") { mBlocks.Start(aTokens, false); XS.Jump(GetJump(xComparison, true), BlockLabel("End")); } else { if (xLast.Matches("return")) { xLabel = FuncLabel("Exit"); } else { xLabel = GetLabel(xLast); } XS.Jump(GetJump(xComparison), xLabel); } }
protected void HandleIf(Assembler aAsm, TokenList aTokens, string xComparison) { string xLabel; var xLast = aTokens.Last(); if (xLast.Value == "{") { mBlocks.Start(aTokens, false); aAsm += GetJump(xComparison, true) + " " + BlockLabel("End"); } else { if (xLast.Matches("return")) { xLabel = FuncLabel("Exit"); } else { xLabel = GetLabel(xLast); } aAsm += GetJump(xComparison) + " " + xLabel; } }