Zuzu::Runtime(3)

NAME
Zuzu::Runtime - interpreter and evaluator for ZuzuScript programs

DESCRIPTION
Creates runtime state, installs built-ins, and evaluates AST nodes produced by the parser.

INHERITANCE
Inherits from "Moo::Object".

ROLES
None.

ATTRIBUTES

  lib
Type: ArrayRef[Str].

Module search paths used by "import" resolution.

METHODS

  new
Constructs and returns a new instance of this class.

  evaluate
Dispatches this AST node to the matching runtime evaluator.

  finish
Runs pending object demolition hooks for a completed runtime.

  call
Invokes a global function by name with arguments.

  eval_program
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_block
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_let
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_assign
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_if
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_while
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_for
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_function_def
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_class_def
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_method_def
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_return
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_next
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_last
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_expr_stmt
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_import
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_literal
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_var
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_array
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_dict
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_index
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_dict_get
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_unary
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_binary
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_call
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_member_call
Evaluates the corresponding AST node kind and returns its runtime value.

  eval_new
Evaluates the corresponding AST node kind and returns its runtime value.

SEE ALSO
Subclasses: none in this distribution.

COPYRIGHT AND LICENCE
Zuzu::Runtime is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.