|
|
@@ -186,14 +186,15 @@ proto.size = function size(){
|
|
|
return this._equalities.length + this._regexes.length;
|
|
|
};
|
|
|
|
|
|
-proto.debugString = function debugString(){
|
|
|
- var debug = "[ ";
|
|
|
- for (var i = 0; i < this._equalities.length; i++){
|
|
|
- debug += this._equalities[i].toString() + " ";
|
|
|
- }
|
|
|
- for (var j = 0; j < this._regexes.length; j++){
|
|
|
- debug += this._regexes[j].shortDebugString() + " ";
|
|
|
- }
|
|
|
- debug += "]";
|
|
|
+proto.debugString = function debugString() {
|
|
|
+ var debug = "[" +
|
|
|
+ this._equalities.map(function(eq) {
|
|
|
+ return JSON.stringify(eq);
|
|
|
+ })
|
|
|
+ .concat(this._regexes.map(function(re) {
|
|
|
+ return JSON.stringify(re);
|
|
|
+ }))
|
|
|
+ .join(", ") +
|
|
|
+ "]";
|
|
|
return debug;
|
|
|
};
|