From: handa Date: Sat, 20 Mar 2010 09:00:49 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ALPHA~7 X-Git-Url: http://git.chise.org/gitweb/?p=m17n%2Fm17n-lib-js.git;a=commitdiff_plain;h=638a2d3bc738205e2b683356dc3f669ff4b3eab3 *** empty log message *** --- diff --git a/xex.js b/xex.js index 19683a1..705a99b 100644 --- a/xex.js +++ b/xex.js @@ -37,7 +37,7 @@ var Xex = {}; 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) { @@ -57,7 +57,8 @@ var Xex = {}; 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) @@ -76,10 +77,10 @@ var Xex = {}; else { lines++; - if (lines >= 60) + if (lines >= 256) { node = log.firstElement (); - log.start = lines - 58; + log.start = lines - 254; } else node = document.createElement ('li'); @@ -158,10 +159,7 @@ Xex.Function = function (name, with_var, min_args, max_args) 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; } @@ -179,10 +177,7 @@ Xex.Subrountine.prototype.Call = function (domain, vari, args) 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; } @@ -193,9 +188,7 @@ Xex.SpecialForm.prototype.Call = function (domain, vari, args) 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; } @@ -246,9 +239,7 @@ Xex.Lambda.prototype.Call = function (domain, vari, args) 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; }