Added a simple sexp matcher
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
|
||||
"git.codemonkeysoftware.net/b/gigaparsec"
|
||||
pbytes "git.codemonkeysoftware.net/b/gigaparsec/bytes"
|
||||
"git.codemonkeysoftware.net/b/gigaparsec/cursor"
|
||||
"git.codemonkeysoftware.net/b/peachy-go/shortcircuit"
|
||||
)
|
||||
|
||||
@@ -152,7 +151,7 @@ func Parse(data []byte) (Sexp, error) {
|
||||
gigaparsec.End[byte](),
|
||||
func(s Sexp, _ struct{}) Sexp { return s },
|
||||
)
|
||||
result, err := gigaparsec.Run(parser, cursor.NewSlice(data))
|
||||
result, err := gigaparsec.Run(parser, bytes.NewReader(data))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("csexp.Parse: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user