[Pkg-javascript-commits] [node-acorn-jsx] 84/484: [loose parser] Use ✖ rather than question mark for placeholders
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:20:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-acorn-jsx.
commit e130dc3fbbb8e5abc514d65310d6b867f9167b7a
Author: Marijn Haverbeke <marijnh at gmail.com>
Date: Thu Jan 17 14:45:16 2013 +0100
[loose parser] Use ✖ rather than question mark for placeholders
This way, attempts to re-parse the pretty-printed code won't
be confused by the question marks.
---
acorn_loose.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/acorn_loose.js b/acorn_loose.js
index 70f2397..ed0c30b 100644
--- a/acorn_loose.js
+++ b/acorn_loose.js
@@ -13,7 +13,7 @@
// - Label consistency (no conflicts, break only to existing labels)
// is not enforced.
//
-// - Bogus Identifier nodes with a name of `"?"` are inserted whenever
+// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
// the parser got too confused to return anything meaningful.
//
// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
@@ -82,7 +82,7 @@
throw e;
}
resetTo(pos);
- if (replace) return {start: pos, end: pos, type: tt.name, value: "?"};
+ if (replace) return {start: pos, end: pos, type: tt.name, value: "✖"};
}
}
}
@@ -157,10 +157,10 @@
var dummy = new node_t(0);
dummy.type = "Identifier";
dummy.end = 0;
- dummy.name = "?";
+ dummy.name = "✖";
return dummy;
}
- function isDummy(node) { return node.name == "?"; }
+ function isDummy(node) { return node.name == "✖"; }
function eat(type) {
if (token.type === type) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git
More information about the Pkg-javascript-commits
mailing list