Merge branch 'main' into erb

This commit is contained in:
erik-krogh
2022-11-15 17:16:05 +01:00
402 changed files with 25375 additions and 12826 deletions

View File

@@ -41,7 +41,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 = "2022-11-10";
public static final String EXTRACTOR_VERSION = "2022-11-15";
public static final Pattern NEWLINE = Pattern.compile("\n");

View File

@@ -10,6 +10,7 @@ import com.semmle.js.ast.TemplateElement;
import com.semmle.js.extractor.ASTExtractor.IdContext;
import com.semmle.ts.ast.ArrayTypeExpr;
import com.semmle.ts.ast.ConditionalTypeExpr;
import com.semmle.js.ast.DynamicImport;
import com.semmle.ts.ast.FunctionTypeExpr;
import com.semmle.ts.ast.GenericTypeExpr;
import com.semmle.ts.ast.ImportTypeExpr;
@@ -221,8 +222,7 @@ public class TypeExprKinds {
return inferTypeExpr;
}
@Override
public Integer visit(ImportTypeExpr nd, Void c) {
private Integer handleInlineImport() {
switch (idcontext) {
case NAMESPACE_BIND:
return importNamespaceAccess;
@@ -235,6 +235,17 @@ public class TypeExprKinds {
}
}
@Override
public Integer visit(ImportTypeExpr nd, Void c) {
return handleInlineImport();
}
@Override
public Integer visit(DynamicImport nd, Void c) {
// These may appear in interface 'extend' clauses
return handleInlineImport();
}
@Override
public Integer visit(OptionalTypeExpr nd, Void c) {
return optionalTypeExpr;