Global

Members

(constant) actions

This is an object containing semantic actions for the Starling grammar. https://ohmjs.org/docs/api-reference#semantic-actions
Source:

(constant) starlingGrammar

This is the Starling grammar, defined for usage by ohm-js.
Source:

Methods

compile(star) → {Array}

Takes in a Starling string. Returns array with Starling string AST and Starling string compiled to Metamath.
Parameters:
Name Type Description
star string
Source:
Returns:
Type
Array
Example
compile("define 0;")

resolveReferences(ast) → {Array}

This function resolves references in the abstract syntax tree.
Parameters:
Name Type Description
ast Array
Source:
Returns:
Type
Array

transpile(ast) → {string}

This function transforms the Starling AST into Metamath.
Parameters:
Name Type Description
ast string
Source:
Returns:
Type
string