mirror of
https://github.com/github/codeql.git
synced 2026-01-07 03:30:24 +01:00
JavaScript: Show character code when reporting unexpected character.
This commit is contained in:
@@ -721,7 +721,8 @@ public class Parser {
|
||||
return this.finishOp(TokenType.prefix, 1);
|
||||
}
|
||||
|
||||
this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
|
||||
String msg = String.format("Unexpected character '%s' (U+%04X)", codePointToString(code), code);
|
||||
this.raise(this.pos, msg);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,9 +163,9 @@ import java.util.stream.Stream;
|
||||
* following environment variables are available:
|
||||
*
|
||||
* <ul>
|
||||
* <li><code>LGTM_THREADS</code> determines how many threads are used for parallel
|
||||
* extraction of JavaScript files (TypeScript files cannot currently be extracted in
|
||||
* parallel). If left unspecified, the extractor uses a single thread.
|
||||
* <li><code>LGTM_THREADS</code> determines how many threads are used for parallel extraction of
|
||||
* JavaScript files (TypeScript files cannot currently be extracted in parallel). If left
|
||||
* unspecified, the extractor uses a single thread.
|
||||
* <li><code>LGTM_TRAP_CACHE</code> and <code>LGTM_TRAP_CACHE_BOUND</code> can be used to specify
|
||||
* the location and size of a trap cache to be used during extraction.
|
||||
* </ul>
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Main {
|
||||
* A version identifier that should be updated every time the extractor changes in 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-03-13";
|
||||
public static final String EXTRACTOR_VERSION = "2019-03-21";
|
||||
|
||||
public static final Pattern NEWLINE = Pattern.compile("\n");
|
||||
|
||||
|
||||
@@ -84,9 +84,7 @@ public class AutoBuildTests {
|
||||
return f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a file with default file type.
|
||||
*/
|
||||
/** Add a file with default file type. */
|
||||
private Path addFile(boolean extracted, Path root, String... components) throws IOException {
|
||||
return addFile(extracted, null, root, components);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user