mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
JavaScript: Fix bug in extraction of next_token.
This commit is contained in:
@@ -133,7 +133,7 @@ public class LexicalExtractor {
|
||||
locationManager.emitNodeLocation(token, key);
|
||||
|
||||
// fill in next_token relation
|
||||
while (j < comments.size() && comments.get(j).getLoc().getEnd().compareTo(token.getLoc().getStart()) < 0)
|
||||
while (j < comments.size() && comments.get(j).getLoc().getEnd().compareTo(token.getLoc().getStart()) <= 0)
|
||||
trapwriter.addTuple("next_token", this.trapwriter.localID(comments.get(j++)), key);
|
||||
|
||||
// the parser sometimes duplicates tokens; skip the second one by nulling it out
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Main {
|
||||
* such a way that it may produce different tuples for the same file under the same
|
||||
* {@link ExtractorConfig}.
|
||||
*/
|
||||
public static final String EXTRACTOR_VERSION = "2019-01-17";
|
||||
public static final String EXTRACTOR_VERSION = "2019-01-29";
|
||||
|
||||
public static final Pattern NEWLINE = Pattern.compile("\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user