CSONParser
CSONParser();
CSONParser(const CSONParser&) = delete;
Creates a reusable CSON parser with its own token storage. Parsing returns independent values while token information remains parser-owned.
Data & serialization
Parse CSON text or files into Catalyst values and expression trees.
#include <mc/CSONParser.h>Parsing produces cvar data; it does not execute expressions. Parse failures are reported as CParseError.
class CSONParserCSONParser();
CSONParser(const CSONParser&) = delete;
Creates a reusable CSON parser with its own token storage. Parsing returns independent values while token information remains parser-owned.
~CSONParser();
cvar parse(const char* code, bool config = false);
cvar parse(const cstr& code, bool config = false);
Parses CSON text. config=true enables the configuration form.
Reads and parses a file; config=true enables configuration parsing.
CSONParser& operator=(const CSONParser&) = delete;
Tokens& tokens();
Borrows the token list from the most recent parse. Keep the parser alive and expect subsequent parses to replace that list.