summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'state.go')
-rw-r--r--state.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/state.go b/state.go
index 8aab3e2..e567777 100644
--- a/state.go
+++ b/state.go
@@ -1,24 +1,10 @@
package goparsify
import (
- "fmt"
"unicode"
"unicode/utf8"
)
-// Error represents a parse error. These will often be set, the parser will back up a little and
-// find another viable path. In general when combining errors the longest error should be returned.
-type Error struct {
- pos int
- expected string
-}
-
-// Pos is the offset into the document the error was found
-func (e Error) Pos() int { return e.pos }
-
-// Error satisfies the golang error interface
-func (e Error) Error() string { return fmt.Sprintf("offset %d: expected %s", e.pos, e.expected) }
-
// State is the current parse state. It is entirely public because parsers are expected to mutate it during the parse.
type State struct {
// The full input string