0 | module Language.JSON.String.Parser
2 | import Language.JSON.String.Tokens
9 | stringChar : Grammar state JSONStringToken True Char
10 | stringChar = match JSTChar
11 | <|> match JSTSimpleEscape
12 | <|> match JSTUnicodeEscape
15 | quotedString : Grammar state JSONStringToken True String
16 | quotedString = let q = match JSTQuote in
17 | do chars <- between q q (many stringChar)
22 | parseString : List (WithBounds JSONStringToken) -> Maybe String
23 | parseString toks = case parse quotedString toks of
24 | Right (str, []) => Just str