summaryrefslogtreecommitdiff
path: root/pointer.go
diff options
context:
space:
mode:
authorAdam Scarr <adam@vektah.net>2017-08-06 23:32:10 +1000
committerAdam Scarr <adam@vektah.net>2017-08-06 23:32:10 +1000
commit666ea93dba377f267a2c8ecf97378a420db18383 (patch)
tree5efee0b6e4ccf44b854d9bb65e4e6fa5e7f86548 /pointer.go
parent9d7779e8ca5404f26abbd8cce0314d9cee967bba (diff)
Eliminate a bunch of allocations
Diffstat (limited to 'pointer.go')
-rw-r--r--pointer.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/pointer.go b/pointer.go
deleted file mode 100644
index 7727833..0000000
--- a/pointer.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package parsec
-
-type Pointer struct {
- input string
- pos int
-}
-
-func (p Pointer) Advance(i int) Pointer {
- return Pointer{p.input, p.pos + i}
-}
-
-func (p Pointer) Get() string {
- if p.pos > len(p.input) {
- return ""
- }
- return p.input[p.pos:]
-}