Rui Barreiroadded jsonbb6aaad6 years agoHistory
26 lines · 705 B · Text
RawDownload
module Language.JSON.String.Parser import Language.JSON.String.Tokensimport Text.Lexerimport Text.Parser %default total privatestringChar : Grammar JSONStringToken True CharstringChar = match JSTChar         <|> match JSTSimpleEscape         <|> match JSTUnicodeEscape privatequotedString : Grammar JSONStringToken True StringquotedString = let q = match JSTQuote in                   do chars <- between q q (many stringChar)                      eof                      pure $ pack chars exportparseString : List JSONStringToken -> Maybe StringparseString toks = case parse quotedString toks of                        Right (str, []) => Just str                        _ => Nothing

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t