Mixin: Main

Eleven~ Main

Class actions for top-level rules to display and visit a tree. For the main rule:

  • Add optional arguments with visitor classes.
  • Add an optional RegExp argument to display the tree between visits and trace each visit.
Source:

Methods


_doVisits()

Create and apply all but the last visitor, check the last.

Source:
Throws:

error message, e.g., error count or _tree issue.

Type
string
Returns:

checked last visitor, last tree, trace if any.

Type
Array

dump()

dump: tree; Display and return the tree.

Source:

main()

main: tree; return the checked last visit as a function.

Source:
Throws:

error message, e.g., error count or _tree issue.

Type
string

run()

run: funct; Execute the function and return the result.

Source: