Revised error reporting

This commit is contained in:
eanderton
2014-08-06 07:34:01 -04:00
parent dd04a2f3cd
commit 7d9a3c25bd
3 changed files with 25 additions and 21 deletions
+4
View File
@@ -64,6 +64,10 @@ func (i token) String() string {
return fmt.Sprintf("%q", i.val)
}
func (i token) Pos() string {
return fmt.Sprintf("(%d, %d)", i.line + 1, i.col + 1)
}
func isSpace(r rune) bool {
return r == ' ' || r == '\t'
}