mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #14552 from github/criemen/bazel-js
Javascript extractor: Bazel-based build
This commit is contained in:
18
javascript/extractor/BUILD.bazel
Normal file
18
javascript/extractor/BUILD.bazel
Normal file
@@ -0,0 +1,18 @@
|
||||
load("@//:common.bzl", "codeql_java_project")
|
||||
|
||||
codeql_java_project(
|
||||
name = "extractor",
|
||||
deps = [
|
||||
"@//extractor",
|
||||
"@//resources/lib/java:commons-compress",
|
||||
"@//resources/lib/java:gson",
|
||||
"@//resources/lib/java:jericho-html",
|
||||
"@//resources/lib/java:slf4j-api",
|
||||
"@//resources/lib/java:snakeyaml",
|
||||
"@//resources/lib/java/DO_NOT_DISTRIBUTE:junit",
|
||||
"@//third_party:jackson",
|
||||
"@//third_party:logback",
|
||||
"@//util-java7",
|
||||
"@//util-java8",
|
||||
],
|
||||
)
|
||||
@@ -79,7 +79,7 @@ public class JSONParser {
|
||||
}
|
||||
|
||||
private char peek() {
|
||||
return offset < length ? src.charAt(offset) : (char) -1;
|
||||
return offset < length ? src.charAt(offset) : Character.MAX_VALUE;
|
||||
}
|
||||
|
||||
private JSONValue readValue() throws ParseError {
|
||||
@@ -356,7 +356,7 @@ public class JSONParser {
|
||||
char c;
|
||||
next();
|
||||
next();
|
||||
while ((c = peek()) != '\r' && c != '\n' && c != -1) next();
|
||||
while ((c = peek()) != '\r' && c != '\n' && c != Character.MAX_VALUE) next();
|
||||
}
|
||||
|
||||
/** Skips the block comment starting at the current position. */
|
||||
@@ -367,7 +367,7 @@ public class JSONParser {
|
||||
next();
|
||||
do {
|
||||
c = peek();
|
||||
if (c < 0) raise("Unterminated comment.");
|
||||
if (c == Character.MAX_VALUE) raise("Unterminated comment");
|
||||
next();
|
||||
if (c == '*' && peek() == '/') {
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user