Global

Members

Operators :Object

Operators object that maps operator names to their corresponding symbols.

Type:
  • Object
Source:

booleanHandler :Object

Object that handles boolean operations.

Type:
  • Object
Source:

functionHandler :Object

Object that handles function operations.

Type:
  • Object
Source:

stringHandler :Object

Object that handles string operations.

Type:
  • Object
Source:

Methods

RegexpFromNames(names) → {RegExp}

Creates a regular expression pattern from an array of names.

Parameters:
Name Type Description
names Array.<string>

The array of names.

Source:
Returns:

The regular expression pattern.

Type
RegExp

dast2json(dAst) → {Object}

Converts a dAst object to JSON format.

Parameters:
Name Type Description
dAst Object

The dAst object to be converted.

Source:
Returns:
  • The converted JSON object.
Type
Object

dependencies(dAst) → {Object}

Adds dependencies to the given dAst object based on the function calls in the AST.

Parameters:
Name Type Description
dAst Object

The dAst object.

Source:
Returns:
  • The updated dAst object with added dependencies.
Type
Object

difference(setA, setB) → {Set}

Calculates the difference between two sets.

Parameters:
Name Type Description
setA Set

The first set.

setB Set

The second set.

Source:
Returns:
  • The difference between setA and setB.
Type
Set

factorial(num) → {Complex}

Calculates the factorial of a given number.

Parameters:
Name Type Description
num number

The number to calculate the factorial of.

Source:
Throws:
  • If the number has a non-zero imaginary part.

    Type
    Error
  • If the number is not an integer.

    Type
    Error
  • If the number is negative.

    Type
    Error
Returns:

The factorial of the given number.

Type
Complex

max(a, b) → {Object}

Returns the maximum of two complex numbers.

Parameters:
Name Type Description
a Object

The first complex number.

Properties
Name Type Description
re number

The real part of the first complex number.

im number

The imaginary part of the first complex number.

b Object

The second complex number.

Properties
Name Type Description
re number

The real part of the second complex number.

im number

The imaginary part of the second complex number.

Source:
Returns:
  • The maximum complex number.
Type
Object

min(a, b) → {Complex}

Returns the minimum of two complex numbers.

Parameters:
Name Type Description
a Complex

The first complex number.

b Complex

The second complex number.

Source:
Returns:

The minimum of the two complex numbers.

Type
Complex

print(…x) → {Array}

Prints the given values to the console.

Parameters:
Name Type Attributes Description
x * <repeatable>

The values to be printed.

Source:
Returns:
  • An array containing the printed values.
Type
Array

scopeAnalysis(dAst) → {Object}

Analyzes the scope of a given abstract syntax tree (AST).

Parameters:
Name Type Description
dAst Object

The abstract syntax tree (AST) to analyze.

Source:
Returns:
  • The modified abstract syntax tree (AST) with scope information.
Type
Object

template(dependencies, fullPath, code) → {string}

Generates a template for code generation.

Parameters:
Name Type Description
dependencies Array

The list of dependencies.

fullPath string

The full path of the file.

code string

The code to be generated.

Source:
Returns:
  • The generated template.
Type
string

write(…x) → {Array}

Writes the provided arguments to the console.

Parameters:
Name Type Attributes Description
x * <repeatable>

The values to be written to the console.

Source:
Returns:
  • An array containing the string representations of the provided values.
Type
Array