public SimpleKey(bool isPossible, bool isRequired, int tokenNumber, Cursor cursor) { IsPossible = isPossible; IsRequired = isRequired; TokenNumber = tokenNumber; this.cursor = new Cursor(cursor); }
public void ShouldProvideAnOneIndexedMark() { var cursor = new Cursor(); var result = cursor.Mark(); result.Line.Should().Be(1, "the mark should be at line 1"); result.Column.Should().Be(1, "the mark should be at column 1"); }
public SimpleKey() { cursor = new Cursor(); }
/// <summary> /// Initializes a new instance of the <see cref="Scanner"/> class. /// </summary> /// <param name="input">The input.</param> /// <param name="skipComments">Indicates whether comments should be ignored</param> public Scanner(TextReader input, bool skipComments = true) { analyzer = new CharacterAnalyzer<LookAheadBuffer>(new LookAheadBuffer(input, MaxBufferLength)); cursor = new Cursor(); SkipComments = skipComments; }
/// <summary> /// Initializes a new instance of the <see cref="Scanner"/> class. /// </summary> /// <param name="input">The input.</param> public Scanner(TextReader input) { analyzer = new CharacterAnalyzer<LookAheadBuffer>(new LookAheadBuffer(input, MaxBufferLength)); cursor = new Cursor(); }
public Cursor(Cursor cursor) { Index = cursor.Index; Line = cursor.Line; LineOffset = cursor.LineOffset; }