void AssertLine(ITokenLine expected, ITokenLine actual, string label) { Assert.That(actual.Tokens.Count, Is.EqualTo(expected.Tokens.Count), $"{label}.Tokens.Count"); for (var i = 0; i < actual.Tokens.Count; i++) { AssertToken(expected.Tokens[i], actual.Tokens[i], $"{label}.Tokens[{i}]"); } }
void ExtractLineTokens(IEnumerator <TokenData> it, ITokenLine line) { var current = it.Current; while (current.Type != Token.NewLineIndentation && current.Type != Token.BlockStartIndentation && current.Type != Token.BlockEndIndentation) { line.Tokens.Add(current); if (!it.MoveNext()) { _done = true; return; } current = it.Current; } }