Beispiel #1
0
        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);
        }
Beispiel #2
0
 private InstructionContext GetNewProgramInstruction(IInstruction instruction)
 {
     var p = new InstructionContext {Instruction = instruction};
     return p;
 }