Skip to content

Commit

Permalink
Fix compatibility with latest go-buffruneio (pelletier#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
pelletier authored Feb 27, 2017
1 parent 22139eb commit d0ec431
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type tomlLexer struct {
// Basic read operations on input

func (l *tomlLexer) read() rune {
r, err := l.input.ReadRune()
r, _, err := l.input.ReadRune()
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -89,7 +89,7 @@ func (l *tomlLexer) emit(t tokenType) {
}

func (l *tomlLexer) peek() rune {
r, err := l.input.ReadRune()
r, _, err := l.input.ReadRune()
if err != nil {
panic(err)
}
Expand All @@ -99,7 +99,7 @@ func (l *tomlLexer) peek() rune {

func (l *tomlLexer) follow(next string) bool {
for _, expectedRune := range next {
r, err := l.input.ReadRune()
r, _, err := l.input.ReadRune()
defer l.input.UnreadRune()
if err != nil {
panic(err)
Expand Down Expand Up @@ -219,7 +219,7 @@ func (l *tomlLexer) lexRvalue() tomlLexStateFn {
break
}

possibleDate := string(l.input.Peek(35))
possibleDate := string(l.input.PeekRunes(35))
dateMatch := dateRegexp.FindString(possibleDate)
if dateMatch != "" {
l.fastForward(len(dateMatch))
Expand Down

0 comments on commit d0ec431

Please sign in to comment.