private void AddStep(string formattedLine) { var tokens = GherkinParser.ParseOutStepAndParameters(formattedLine); if (tokens == null) // invalid gherkin step { lastStep = null; // so that any tables don't get added to the last valid step } else { lastStep = new NodeStep(tokens); lastScenario.Steps.Add(lastStep); } }