frostc-1.0.0.0: The Frost Programming Language Compiler
Safe HaskellSafe-Inferred
LanguageHaskell2010

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.

parseLiteral :: Parser Literal Source #

Parses a literal, which can be an array, character, float, integer, boolean, null, or a structure. Returns the parsed 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.

parseNull :: Parser Literal Source #

Parses a null literal. Returns a Literal of type LNull.

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.