File mu/Compound


class mu.Context

A Context is something that can be searched for variables and the like.

Inherits

State supers
Common

instance mu.Context

methods

deferred Context
  container;
Return the enclosing context.

Variable (v)
  localEntityNamed tom.String name;
Search the receiving context for a local variable or argument. Default implementation passes this to the container.

CustomMethod
  method;
Return the method containing the receiving compound. Default implementation passes this to the container.


class mu.Compound

A Compound is something that holds a bunch of expressions and declarations. It is itself also an expression.

Inherits

State supers
Context, Expression

instance mu.Compound

variables

public Context container;
The containing compound or method, container-wise.
tom.MutableDictionary variables;
The local variables, keyed on their name.
tom.MutableArray variables_ordered;
The local variables, in order. This is also faster when visiting all variables.
tom.MutableArray expressions;
The expressions in this compound.
mutable Expression last_expression;
The last expression. Not necessarily equals the last entry in expressions. It could be the expression value resulting from a local variable declaration (which is why it is mutable).

methods

id
  initWithContainer Context c;
Designated initializer.

void
  addExpression Expression top_expression;
Add the top_expression to the expressions, and update the last_expression.

void
  addVariable LocalVariable variable
pre
  [variable container] == self;
Note the new local variable.

Variable (lv)
  localEntityNamed tom.String name;
Search for an entity with the given name. If not found, pass to the container.

LocalVariable (lv)
  localVariable (Type, tom.String) (t, n)
            for Common decl;
Create a new local variable in the current compound.

CustomMethod
  method;
Ask the container.

tom.Indexed
  variables;
Return the variables_ordered.


class mu.MethodBody

A MethodBody is the compound used as the body of a method.

Inherits

State supers
Compound

instance mu.MethodBody

variables

redeclare CustomMethod container;
Our container (sort-of) is a method.

methods

redeclare CustomMethod
  container;
Redeclare our container accessor.

CustomMethod
  method;
Return the method containing the receiving compound, which is the container.


Generated by tm 1.01.