Skip to content

Commit

Permalink
Merge branch 'master' of github.com:robpike/ivy
Browse files Browse the repository at this point in the history
  • Loading branch information
robpike committed Jan 8, 2015
2 parents 83ea6d3 + e9ae363 commit 014600a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ivy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main
package main // import "robpike.io/ivy"

import (
"bufio"
Expand Down
7 changes: 3 additions & 4 deletions parse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ func (p *Parser) next() scan.Token {
} else {
tok = <-p.scanner.Tokens
}
if tok.Type == scan.Error {
p.errorf("%q", tok)
}
p.curTok = tok
if tok.Type != scan.Newline {
// Show the line number before we hit the newline.
Expand Down Expand Up @@ -251,8 +254,6 @@ func (p *Parser) Line() ([]value.Expr, bool) {
func (p *Parser) expressionList() ([]value.Expr, bool) {
tok := p.next()
switch tok.Type {
case scan.Error:
p.errorf("%q", tok)
case scan.EOF:
return nil, false
case scan.Newline:
Expand All @@ -264,8 +265,6 @@ func (p *Parser) expressionList() ([]value.Expr, bool) {
}
tok = p.next()
switch tok.Type {
case scan.Error:
p.errorf("%q", tok)
case scan.EOF, scan.Newline:
default:
p.errorf("unexpected %q", tok)
Expand Down

0 comments on commit 014600a

Please sign in to comment.