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:
Returns:
-
Language
language definition
- Language.require (name, cpath)
-
Require a language from a dynamic library.
Searches
cpath
for a parser that matchesname
. Ifcpath
is not provided, package.cpath is used.'
?
's in the paths are replaced byname
when searching for the dynamic library.Parameters:
Returns:
-
Language
language definition
Methods
Metamethods
- Language:__eq (other)
-
Check equality of two languages.
Parameters:
- other Language
Returns:
-
boolean