Class Language

A language definition used by a Parser to parse a document.

Analogous to TSLanguage.

Functions

Language.load (path, name) Load a language from a dynamic library.
Language.require (name, cpath) Require a language from a dynamic library.

Methods

Language:version () Get the ABI version number for this language.

Metamethods

Language:__eq (other) Check equality of two languages.


Functions

Language.load (path, name)
Load a language from a dynamic library.

Parameters:

  • path string path to the dynamic library
  • name string name of the language

Returns:

    Language language definition
Language.require (name, cpath)
Require a language from a dynamic library.

Searches cpath for a parser that matches name. If cpath is not provided, package.cpath is used.

'?'s in the paths are replaced by name when searching for the dynamic library.

Parameters:

  • name string name of the language
  • cpath optional string paths to search for the library

Returns:

    Language language definition

Methods

Language:version ()
Get the ABI version number for this language.

Returns:

    integer version

Metamethods

Language:__eq (other)
Check equality of two languages.

Parameters:

Returns:

    boolean
generated by LDoc 1.5.0 Last updated 2024-04-16 14:22:44