Example #1
0
        public override Node ExitStep(Production node)
        {
            var values = GetChildValues(node);
            if (values.Count > 0)
            {
                var kindWord = (string) values[0];
                CurrentStepKind = LookupStepKind(kindWord);
                var stepBody = (string) values[1];
                var table = (Table) null;
                if (values.Count > 2)
                    table = (Table)values[3];

                var step = new Step(table)
                {
                    KindWord = kindWord,
                    Kind = CurrentStepKind,
                    Body = stepBody,
                    LineNumber = node.StartLine
                };
                node.AddValue(step);
            }
            return node;
        }
Example #2
0
 public StepDefinition(Regex regex, Delegate action, StepKinds kind, IProvideSteps stepSet)
     : base(regex, action)
 {
     Kind = kind;
     StepSet = stepSet;
 }