mirror of
https://github.com/github/codeql.git
synced 2025-12-30 23:58:15 +01:00
JS: Run Java formatter
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
package com.semmle.js.extractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.semmle.js.extractor.ExtractorConfig.HTMLHandling;
|
||||
import com.semmle.js.extractor.ExtractorConfig.Platform;
|
||||
import com.semmle.js.extractor.ExtractorConfig.SourceType;
|
||||
@@ -31,6 +23,13 @@ import com.semmle.util.language.LegacyLanguage;
|
||||
import com.semmle.util.process.ArgsParser;
|
||||
import com.semmle.util.process.ArgsParser.FileMode;
|
||||
import com.semmle.util.trap.TrapWriter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** The main entry point of the JavaScript extractor. */
|
||||
public class Main {
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
package com.semmle.js.parser;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonNull;
|
||||
@@ -150,6 +142,13 @@ import com.semmle.ts.ast.TypeofTypeExpr;
|
||||
import com.semmle.ts.ast.UnaryTypeExpr;
|
||||
import com.semmle.ts.ast.UnionTypeExpr;
|
||||
import com.semmle.util.collections.CollectionUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Utility class for converting a <a
|
||||
@@ -1229,9 +1228,9 @@ public class TypeScriptASTConverter {
|
||||
List<Expression> params = convertParameters(node);
|
||||
Identifier fnId = convertChild(node, "name", "Identifier");
|
||||
if (fnId == null) {
|
||||
// Anonymous function declarations may occur as part of default exported functions.
|
||||
// We represent these as function expressions.
|
||||
return fixExports(loc, convertFunctionExpression(node, loc));
|
||||
// Anonymous function declarations may occur as part of default exported functions.
|
||||
// We represent these as function expressions.
|
||||
return fixExports(loc, convertFunctionExpression(node, loc));
|
||||
}
|
||||
BlockStatement fnbody = convertChild(node, "body");
|
||||
boolean generator = hasChild(node, "asteriskToken");
|
||||
|
||||
Reference in New Issue
Block a user