group yao

Public function definitions and types for Yao.


typedef y_Status (*yao_ParseAddImportsFunc)(struct yao_Parse *p)

A function type for a function to add more data into an import map when a new import map is pushed onto the stack.

This is for Rig and Ur, especially, for them to add their keywords and such to the new import map so that no import declarations are required.

Param p:

The parser.


An error code, if any.


p must not be NULL.


y_Status yao_read(y_str package, yvm_Yvm y, y_u32 errlim, y_Path path, y_Path *pkg, yao_ParseAddImportsFunc add)

Reads a Yao script file and parses it into executable Yao code.

This does not handle any package files; the file is assumed to be a bare script file.

  • package – The name of the top-level package in the file, including all package components.

  • y – The Yvm code container to fill with the parsed code.

  • errlim – The error limit. Zero means no limit.

  • path – The path to the file to parse.

  • pkg – A pointer to the package file to read. If this is NULL, no package file is read. Otherwise, the given path is used.

  • add – A function to add extra imports, if needed. Can be NULL.


An error code, if any.


y must not be NULL.


path must be valid.