Class: MaiaCompiler

MaiaCompiler()

new MaiaCompiler()

MaiaScript compiler class.
Source:

Methods

compile(xml) → {string}

Compiles the MaiaScript XML tree for JavaScript.
Parameters:
Name Type Description
xml xml The XML data.
Source:
Returns:
XML data converted to JavaScript.
Type
string

parse(mil, parentNodeInfo, isKernelFunction) → {string}

Compiles the code in Maia Internal Language (MIL) for JavaScript.
Parameters:
Name Type Description
mil json Code in Maia Internal Language (MIL).
parentNodeInfo string Parent node data.
isKernelFunction boolean Parent node is a kernel function.
Source:
Returns:
MIL code converted to JavaScript.
Type
string

parseComplexNumber(text) → {string}

Compiles a complex number to JSON.
Parameters:
Name Type Description
text string The expression representing the complex number.
Source:
Returns:
Number converted to JSON.
Type
string

xmlToJson(xml) → {json}

Convert XML to JSON.
Parameters:
Name Type Description
xml xml The XML data.
Source:
Returns:
XML data converted to a JSON object.
Type
json

xmlToMil(xml, itemName) → {json}

Compiles the MaiaScript XML tree for Maia Internal Code (MIL).
Parameters:
Name Type Description
xml xml The XML data.
itemName string Name of the item being analyzed.
Source:
Returns:
XML data converted to a MIL object.
Type
json

(inner) init()

Creates the attributes of the class.
Source: