Text.Parsing.Parser.String
- Package
- purescript-parsing
- Repository
- purescript-contrib/purescript-parsing
Primitive parsers for working with an input stream of type String
.
The behavior of these primitive parsers is based on the behavior of the
Data.String
module in the strings package.
In most JavaScript runtime environments, the String
is little-endian UTF-16.
The primitive parsers which return Char
will only succeed when the character
being parsed is a code point in the
Basic Multilingual Plane
(the “BMP”). These parsers can be convenient because of the good support
that PureScript has for writing Char
literals like 'あ'
, 'β'
, 'C'
.
The other primitive parsers, which return CodePoint
and String
types,
can parse the full Unicode character set. All of the primitive parsers
in this module can be used together.
#anyCodePoint Source
anyCodePoint :: forall m. Monad m => ParserT String m CodePoint
Match any Unicode character. Always succeeds.
#whiteSpace Source
whiteSpace :: forall m. Monad m => ParserT String m String
Match zero or more whitespace characters satisfying
Data.CodePoint.Unicode.isSpace
.
#skipSpaces Source
skipSpaces :: forall m. Monad m => ParserT String m Unit
Skip whitespace characters.