Skip to content
Browse files

Change parsePush to ParseId

  • Loading branch information...
1 parent 506cfbe commit 94703dc6ca92f3f4666782472c06a1a3ecdb5fbd unknown committed Mar 19, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 parser.go
View
8 parser.go
@@ -100,8 +100,8 @@ func parseFunc(input <-chan *token) ([]pFunc, error) {
return ret, err
}
case kBS:
- next, err := parsePush(input)
- ret = append(ret, next)
+ next, err := parseId(input)
+ ret = append(ret, pPushFunc(next))
if err != nil {
return ret, err
}
@@ -112,13 +112,13 @@ func parseFunc(input <-chan *token) ([]pFunc, error) {
panic("unreachable")
}
-func parsePush(input <-chan *token) (pPushFunc, error) {
+func parseId(input <-chan *token) (string, error) {
t, ok := <-input
if !ok {
return "", &syntaxError{"identifier", "EOF"}
}
if t.k != kId {
return "", &syntaxError{"identifier", t.String()}
}
- return pPushFunc(t.data), nil
+ return string(t.data), nil
}

0 comments on commit 94703dc

Please sign in to comment.
Something went wrong with that request. Please try again.