[Pkg-javascript-commits] [node-acorn-jsx] 264/484: Remove `copyToken` from acorn_loose (not needed anymore).
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:20:41 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 ef045b971834a34e5181f8e2eeac34644e2ede41
Author: Ingvar Stepanyan <me at rreverser.com>
Date: Thu Jul 31 14:33:40 2014 +0300
Remove `copyToken` from acorn_loose (not needed anymore).
---
acorn_loose.js | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/acorn_loose.js b/acorn_loose.js
index b7bc56d..af0e97a 100644
--- a/acorn_loose.js
+++ b/acorn_loose.js
@@ -131,22 +131,9 @@
fetchToken.jumpTo(pos, reAllowed);
}
- function copyToken(token) {
- var copy = {start: token.start, end: token.end, type: token.type, value: token.value};
- if (options.locations) {
- copy.startLoc = token.startLoc;
- copy.endLoc = token.endLoc;
- }
- return copy;
- }
-
function lookAhead(n) {
- // Copy token objects, because fetchToken will overwrite the one
- // it returns, and in this case we still need it
- if (!ahead.length)
- token = copyToken(token);
while (n > ahead.length)
- ahead.push(copyToken(readToken()));
+ ahead.push(readToken());
return ahead[n-1];
}
--
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