8000 remove console.debug() calls · dragoncoder047/pickle@0ca8edd · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ca8edd

Browse files
remove console.debug() calls
1 parent 82adb40 commit 0ca8edd

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

pickle.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ class PickleTokenizer {
256256
* @returns {PickleToken}
257257
*/
258258
errorToken(message = "") {
259-
console.debug("errorToken()", message);
260259
// always advance to allow more tokenizing
261260
if (this.bi == this.i) this.i++;
262261
return this.makeToken("error", this.string.slice(this.bi, this.i), message || `unexpected ${this.peek(-1)}`);
@@ -281,7 +280,6 @@ class PickleTokenizer {
281280
this.bi = this.i;
282281
// Try colon block string, to allow colon in operators
283282
if (this.test(/^:\s*\n/)) {
284-
console.debug("trying colon string");
285283
var i = this.i;
286284
var lines = [];
287285
this.chomp(/^:\s*\n/);
@@ -293,11 +291,9 @@ class PickleTokenizer {
293291
indent = indent[0];
294292
var ensure_same = /^([\t ])\1*/.exec(indent);
295293
if (!ensure_same) return this.makeToken("error", indent, "mix of tabs and spaces indenting block");
296-
console.debug("indent is", indent.length, indent[0] == "\t" ? "tabs" : "spaces");
297294
while (true) {
298295
var line = this.chomp(/^[^\n]*/);
299296
lines.push(line[0] || "");
300-
console.debug("got line", line[0]);
301297
if (!this.chomp("\n")) break;
302298
if (!this.chomp(indent)) {
303299
var b = this.lineColumn();
@@ -330,7 +326,6 @@ class PickleTokenizer {
330326
{ type: "symbol.operator", re: /^[-~`!@#$%^&*_+=[\]|\\:<>,.?/]+/, significant: true, groupNum: 0 },
331327
]
332328
for (var { type, re, significant, groupNum } of TOKEN_REGEXES) {
333-
console.debug("trying", type);
334329
if (this.test(re)) {
335330
var match = this.chomp(re);
336331
if (significant) return this.makeToken(type, match[groupNum]);
@@ -339,11 +334,9 @@ class PickleTokenizer {
339334
}
340335
// Try strings
341336
if (this.test("{")) {
342-
console.debug("trying brace string");
343337
var j = 0, depth = 0, string = "";
344338
do {
345339
var ch = this.peek(j);
346-
console.debug("peek", ch, "depth=", depth);
347340
if (ch == undefined) return this.errorToken("unclosed {");
348341
if (ch == "{") depth++;
349342
else if (ch == "}") depth--;
@@ -354,12 +347,10 @@ class PickleTokenizer {
354347
return this.makeToken("string.curly", string.slice(1, -1));
355348
}
356349
else if (this.test(/^['"]/)) {
357-
console.debug("trying quote string");
358350
var q = this.chomp(/^['"]/)[0];
359351
var j = 0, string = "";
360352
while (true) {
361353
var ch = this.peek(j);
362-
console.debug("peek", ch);
363354
// newlines must be backslash escaped
364355
if (ch == undefined || ch == "\n") {
365356
this.i += j;

0 commit comments

Comments
 (0)
0