overflow: 'auto' };
// Toggle logging on and off. PARENT if non-null specifies the
- // parent of the log node. The log node is appended to the parent.
+ // parent of the log node. The log node is appended to PARENT.
// If PARENT is null, 'body' node is assumed.
Xex.LogToggle = function (parent)
{
return log;
}
- // Log ARG
+ // Log ARG (string). INDENT if specified is a number of columns to
+ // indent. If INDENT is -1, ARG is appended to the last log.
Xex.Log = function (arg, indent)
{
if (! log)
else
{
lines++;
- if (lines >= 60)
+ if (lines >= 256)
{
node = log.firstElement ();
- log.start = lines - 58;
+ log.start = lines - 254;
}
else
node = document.createElement ('li');
Xex.Subrountine = function (builtin, name, with_var, min_args, max_args)
{
- this.name = name;
- this.with_var = with_var;
- this.min_args = min_args;
- this.max_args = max_args;
+ Xex.Function.apply (this, [name, with_var, min_args, max_args]);
this.builtin = builtin;
}
Xex.SpecialForm = function (builtin, name, with_var, min_args, max_args)
{
- this.name = name;
- this.with_var = with_var;
- this.min_args = min_args;
- this.max_args = max_args;
+ Xex.Function.apply (this, [name, with_var, min_args, max_args]);
this.builtin = builtin;
}
Xex.Lambda = function (name, min_args, max_args, args, body)
{
- this.name = name;
- this.min_args = min_args;
- this.max_args = max_args;
+ Xex.Function.apply (this, [name, false, min_args, max_args]);
this.args = args;
this.body = body;
}
Xex.Macro = function (name, min_args, max_args, args, body)
{
- this.name = name;
- this.min_args = min_args;
- this.max_args = max_args;
+ Xex.Function.apply (this, [name, false, min_args, max_args]);
this.args = args;
this.body = body;
}