mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 12:42:02 +03:00
18 lines
367 B
Idris
18 lines
367 B
Idris
|
module Language.JSON.String
|
||
|
|
||
|
import Language.JSON.String.Lexer
|
||
|
import Language.JSON.String.Parser
|
||
|
import Language.JSON.String.Tokens
|
||
|
import Text.Lexer
|
||
|
|
||
|
%default total
|
||
|
|
||
|
export
|
||
|
permissiveStringLit : Lexer
|
||
|
permissiveStringLit
|
||
|
= quo <+> manyUntil quo (esc any <|> any) <+> opt quo
|
||
|
|
||
|
export
|
||
|
stringValue : String -> Maybe String
|
||
|
stringValue x = parseString !(lexString x)
|