[Pkg-javascript-commits] [node-acorn-jsx] 170/484: Update lastEnd in tokenizer interface
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:20:21 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 d55b6dee4ae8b74986b36e02196d68560e191cf1
Author: Marijn Haverbeke <marijnh at gmail.com>
Date: Fri Jan 17 10:09:15 2014 +0100
Update lastEnd in tokenizer interface
The hack for parsing --> depends on it.
Closes #84
---
acorn.js | 1 +
index.html | 1 +
2 files changed, 2 insertions(+)
diff --git a/acorn.js b/acorn.js
index bbd32cf..c335f65 100644
--- a/acorn.js
+++ b/acorn.js
@@ -142,6 +142,7 @@
var t = {};
function getToken(forceRegexp) {
+ lastEnd = tokEnd;
readToken(forceRegexp);
t.start = tokStart; t.end = tokEnd;
t.startLoc = tokStartLoc; t.endLoc = tokEndLoc;
diff --git a/index.html b/index.html
index c1df00b..7d7e579 100644
--- a/index.html
+++ b/index.html
@@ -96,6 +96,7 @@ reset the internal state, and invalidate existing tokenizers.</p> </
<span class="kd">var</span> <span class="nx">t</span> <span class="o">=</span> <span class="p">{};</span>
<span class="kd">function</span> <span class="nx">getToken</span><span class="p">(</span><span class="nx">forceRegexp</span><span class="p">)</span> <span class="p">{</span>
+ <span class="nx">lastEnd</span> <span class="o">=</span> <span class="nx">tokEnd</span><span class="p">;</span>
<span class="nx">readToken</span><span class="p">(</span><span class="nx">forceRegexp</span><span class="p">);</span>
<span class="nx">t</span><span class="p">.</span><span class="nx">start</span> <span class="o">=</span> <span class="nx">tokStart</span><span class="p">;</span> <span class="nx">t</span><span class="p">.</span><span class="nx">end</span> <span class="o">=</span> <span class="nx">tokEnd</span><span class="p">;</span>
<span class="nx">t</span><span class="p">.</span><span class="nx">startLoc</span> <span class="o">=</span> <span class="nx">tokStartLoc</span><span class="p">;</span> <span class="nx">t</span><span class="p">.</span><span class="nx">endLoc</span> <span class="o">=</span> <span class="nx">tokEndLoc</span><span class="p">;</span>
--
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