Class: Check

Eleven~ Check

Base class for type checking.


new Check()

Source:

Methods


_literal(node)

Utility: accepts [ type value ], sets .type from tag, returns node.

Parameters:
Name Type Description
node Array

to check.

Source:

_require(type, node)

Utility: casts all operands to type if needed, sets .type, returns node.

Parameters:
Name Type Description
type string

expected.

node Array

tree to check.

Source:

_toType(type, node, index)

Utility: visits and casts node[index] to type if needed, returns node.

Parameters:
Name Type Description
type string

expected.

node Array

parent of subtree to check.

index number

of subtree in node.

Source: