improving printout of functions
This commit is contained in:
parent
87eb04e440
commit
f488db734b
|
@ -66,6 +66,11 @@
|
||||||
if (typeof(x) === 'string') {
|
if (typeof(x) === 'string') {
|
||||||
return escapeString(x.toString());
|
return escapeString(x.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (baselib.functions.isProcedure(x)) {
|
||||||
|
return '#<procedure:' + x.displayName + '>';
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof(x) !== 'object' && typeof(x) !== 'function') {
|
if (typeof(x) !== 'object' && typeof(x) !== 'function') {
|
||||||
return x.toString();
|
return x.toString();
|
||||||
}
|
}
|
||||||
|
@ -105,6 +110,11 @@
|
||||||
if (typeof(x) === 'string') {
|
if (typeof(x) === 'string') {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (baselib.functions.isProcedure(x)) {
|
||||||
|
return '#<procedure:' + x.displayName + '>';
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof(x) !== 'object' && typeof(x) !== 'function') {
|
if (typeof(x) !== 'object' && typeof(x) !== 'function') {
|
||||||
return x.toString();
|
return x.toString();
|
||||||
}
|
}
|
||||||
|
@ -373,10 +383,16 @@
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (baselib.functions.isProcedure(x)) {
|
||||||
|
node = document.createElement("span");
|
||||||
|
node.appendChild(document.createTextNode('#<procedure: ' + x.displayName + '>'));
|
||||||
|
$(node).addClass("procedure");
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof(x) !== 'object' && typeof(x) !== 'function') {
|
if (typeof(x) !== 'object' && typeof(x) !== 'function') {
|
||||||
node = document.createElement("span");
|
node = document.createElement("span");
|
||||||
node.appendChild(document.createTextNode(x.toString()));
|
node.appendChild(document.createTextNode(x.toString()));
|
||||||
$(node).addClass("procedure");
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user