public void AssignmentEnd(string assignmentOperator) { //TODO check if there are any possibilities of assignmentLeftSide longer than 2 instructions? var operationType = _assignmentLeftSide.Last().Symbol.Type; var assignmentInstruction = AssemblyBuilderHelpers.GetInstructionForOperator(assignmentOperator, true, operationType); if (!IsInsideConstDef) { AddInstructions(new List <AssemblyElement>(_assignmentLeftSide)); } _assignmentLeftSide = new List <SymbolInstruction>(); AddInstruction(assignmentInstruction); }
public void ExitOperator(string operatorText, bool twoArg = true) { var instruction = AssemblyBuilderHelpers.GetInstructionForOperator(operatorText, twoArg); _activeContext.SetEndInstruction(instruction); }