private static CodeRange CreateCodeRange(IToken token, string text) { var startLocation = new CodeLocation(token.Line, token.CharPositionInLine); var endLocation = startLocation.Advance(text); return(new CodeRange(startLocation, endLocation)); }
public void Advance( int startLine, int startPos, string text, int endLine, int endPos) { var startLocation = new CodeLocation(startLine, startPos); var endLocation = startLocation.Advance(text); Assert.That(endLocation, Is.EqualTo(new CodeLocation(endLine, endPos))); }
private static CodeRange CreateCodeRange(IToken token, string text) { var startLocation = new CodeLocation(token.Line, token.CharPositionInLine); var endLocation = startLocation.Advance(text); return new CodeRange(startLocation, endLocation); }