public void should_return_true_on_nonempty_trypeek(IPeekable <string> subject, string expected) { string value; subject.TryPeek(out value).Should().BeTrue(); value.Should().Be(expected); }
public Peekable(IPeekable peekable) { this._peekable = peekable; }
public LrParser(LalrGrammar grammar, IPeekable <TToken> tokenStream) : base(grammar, tokenStream) { }
public CharacterReader(TextReader original) { _reader = original; _peekable = this.AsPeekable(); }
public LexerBase(TextReader reader) { Reader = new CharacterReader(reader); _peekable = Lex().AsPeekable(); }
public void should_not_remove_value_on_peek(IPeekable <string> subject, string expected) { subject.Peek().Should().Be(expected); subject.Peek().Should().Be(expected); }
public void should_return_false_on_empty_trypeek(IPeekable <int> subject) { int value; subject.TryPeek(out value).Should().Be(false); }
public void should_correctly_peek_item(IPeekable <string> subject, string expected) { subject.Peek().Should().Be(expected); }
public void should_throw_when_peeking_empty(IPeekable <int> subject) { Action act = () => subject.Peek(); act.Should().Throw <InvalidOperationException>(); }