Struct in stdx_tml.h

TMLParseResult

typedef struct TMLParseResult{
  int ok;
  char error[256];
  u32 line;
  u32 column;
  TMLDocument *document;
}TMLParseResult;
Function in stdx_tml.h

tml_parse

Parse a TML document from a UTF-8 source string.

X_TML_API TMLParseResult tml_parse(char const *source);

Parameters

char const *source
Null-terminated source text.

Returns

Parse result structure. On success: - result.ok is non-zero - result.document contains the parsed immutable document On failure: - result.ok is 0 - result.error contains a human-readable error message - result.line and result.column identify the error location The returned document must be released with: tml_document_free()