|
1 | 1 | package com.semmle.js.parser;
|
2 | 2 |
|
3 |
| -import java.util.ArrayList; |
4 |
| -import java.util.Collections; |
5 |
| -import java.util.LinkedHashMap; |
6 |
| -import java.util.List; |
7 |
| -import java.util.Map; |
8 |
| -import java.util.regex.Matcher; |
9 |
| -import java.util.regex.Pattern; |
10 |
| - |
11 | 3 | import com.google.gson.JsonArray;
|
12 | 4 | import com.google.gson.JsonElement;
|
13 | 5 | import com.google.gson.JsonNull;
|
|
150 | 142 | import com.semmle.ts.ast.UnaryTypeExpr;
|
151 | 143 | import com.semmle.ts.ast.UnionTypeExpr;
|
152 | 144 | import com.semmle.util.collections.CollectionUtil;
|
| 145 | +import java.util.ArrayList; |
| 146 | +import java.util.Collections; |
| 147 | +import java.util.LinkedHashMap; |
| 148 | +import java.util.List; |
| 149 | +import java.util.Map; |
| 150 | +import java.util.regex.Matcher; |
| 151 | +import java.util.regex.Pattern; |
153 | 152 |
|
154 | 153 | /**
|
155 | 154 | * Utility class for converting a <a
|
@@ -1229,9 +1228,9 @@ private Node convertFunctionDeclaration(JsonObject node, SourceLocation loc) thr
|
1229 | 1228 | List<Expression> params = convertParameters(node);
|
1230 | 1229 | Identifier fnId = convertChild(node, "name", "Identifier");
|
1231 | 1230 | if (fnId == null) {
|
1232 |
| - // Anonymous function declarations may occur as part of default exported functions. |
1233 |
| - // We represent these as function expressions. |
1234 |
| - return fixExports(loc, convertFunctionExpression(node, loc)); |
| 1231 | + // Anonymous function declarations may occur as part of default exported functions. |
| 1232 | + // We represent these as function expressions. |
| 1233 | + return fixExports(loc, convertFunctionExpression(node, loc)); |
1235 | 1234 | }
|
1236 | 1235 | BlockStatement fnbody = convertChild(node, "body");
|
1237 | 1236 | boolean generator = hasChild(node, "asteriskToken");
|
|
0 commit comments