Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ast.Parser.Literal
Synopsis
Documentation
trueSymbol :: String Source #
Symbol for the boolean true
literal.
falseSymbol :: String Source #
Symbol for the boolean false
literal.
nullSymbol :: String Source #
Symbol for the null
literal.
parseInt :: Parser Literal Source #
Parses an integer literal, supporting signed values.
Returns a Literal
of type LInt
.
parseFloat :: Parser Literal Source #
Parses a floating-point literal.
Returns a Literal
of type LFloat
.
parseBool :: Parser Literal Source #
Parses a boolean literal (true
or false
).
Returns a Literal
of type LBool
.
parseChar :: Parser Literal Source #
Parses a character literal (e.g., a
).
Returns a Literal
of type LChar
.
parseArray :: Parser Literal Source #
Parses an array of literals.
Supports string literals as arrays of characters or standard arrays of literals.
Returns a Literal
of type LArray
.
parseStruct :: Parser Literal Source #
Parses a structure literal, which includes a name and fields.
Fields are key-value pairs where the key is a field name and the value is a literal.
Returns a Literal
of type LStruct
.