private void ProcessButtonEventFunction() { var buttonEventInstruction = new InstructionContext { Instruction = new ButtonEventInstruction() }; var nextToken = GetNextToken(); AssertValid(nextToken, "Expected: (", x => x.Type == TokenType.StartFunction); buttonEventInstruction.GotoLabel = ProcessLabelDefinition(false); nextToken = GetNextToken(); AssertValid(nextToken, "expected: )", x => x.Type == TokenType.EndFunction); nextToken = GetNextToken(); AssertValid(nextToken, "expected: ;", x => x.Type == TokenType.TerminateStatement); _instructionContextData.Add(buttonEventInstruction); }
private InstructionContext GetNewProgramInstruction(IInstruction instruction) { var p = new InstructionContext {Instruction = instruction}; return p; }