protected StreamPeeker(TabAwareCharacterStream stream)
 {
     this.Stream   = stream;
     StartPosition = stream.Position;
 }
Beispiel #2
0
 ///<summary>Indicates whether a stream is current at the last valid character.</summary>
 ///<remarks>IsEndOfStream() returns true if the stream is _after_ the last character, at '\0'.</remarks>
 public static bool IsAtLastCharacter(this TabAwareCharacterStream stream)
 {
     return(stream.DistanceFromEnd <= 1);
 }
 public TabAwarePeeker(TabAwareCharacterStream stream)
     : base(stream)
 {
     this.remainingSpaces = stream.remainingSpaces;
 }
Beispiel #4
0
 public static bool CompareCurrent(this TabAwareCharacterStream stream, string text, bool ignoreCase = false)
 {
     return(stream.CompareTo(stream.Position, text, ignoreCase));
 }