Support TS 5.3 import attributes (previously import assertions)

This commit is contained in:
Arthur Baars
2023-10-10 11:46:37 +02:00
parent 1067dd9dd3
commit bd62ec294e
3 changed files with 255 additions and 248 deletions

View File

@@ -176,7 +176,8 @@ public class TypeScriptASTConverter {
private static final Pattern EXPORT_DECL_START =
Pattern.compile("^export" + "(" + WHITESPACE_CHAR + "+default)?" + WHITESPACE_CHAR + "+");
private static final Pattern TYPEOF_START = Pattern.compile("^typeof" + WHITESPACE_CHAR + "+");
private static final Pattern ASSERT_START = Pattern.compile("^assert" + WHITESPACE_CHAR + "+");
private static final Pattern IMPORT_ATTRIBUTE_START =
Pattern.compile("^(assert|with)" + WHITESPACE_CHAR + "+");
private static final Pattern WHITESPACE_END_PAREN =
Pattern.compile("^" + WHITESPACE_CHAR + "*\\)");
@@ -342,10 +343,10 @@ public class TypeScriptASTConverter {
return convertArrowFunction(node, loc);
case "AsExpression":
return convertTypeAssertionExpression(node, loc);
case "AssertClause":
return convertAssertClause(node, loc);
case "AssertEntry":
return convertAssertEntry(node, loc);
case "ImportAttributes":
return convertImportAttributes(node, loc);
case "ImportAttribute":
return convertImportAttribute(node, loc);
case "SatisfiesExpression":
return convertSatisfiesExpression(node, loc);
case "AwaitExpression":
@@ -2297,20 +2298,20 @@ public class TypeScriptASTConverter {
return new TypeAssertion(loc, convertChild(node, "expression"), type, false);
}
private Node convertAssertClause(JsonObject node, SourceLocation loc) throws ParseError {
private Node convertImportAttributes(JsonObject node, SourceLocation loc) throws ParseError {
List<Property> properties = new ArrayList<>();
for (INode child : convertChildren(node, "elements")) {
properties.add((Property) child);
}
// Adjust location to skip over the `assert` keyword.
Matcher m = ASSERT_START.matcher(loc.getSource());
// Adjust location to skip over the `with` or `assert` keyword.
Matcher m = IMPORT_ATTRIBUTE_START.matcher(loc.getSource());
if (m.find()) {
advance(loc, m.group(0));
}
return new ObjectExpression(loc, properties);
}
private Node convertAssertEntry(JsonObject node, SourceLocation loc) throws ParseError {
private Node convertImportAttribute(JsonObject node, SourceLocation loc) throws ParseError {
return new Property(
loc, convertChild(node, "key"), convertChild(node, "value"), "init", false, false);
}

View File

@@ -1,13 +1,13 @@
import "module" assert { type: "json" };
import * as v1 from "module" assert { type: "json" };
import { v2 } from "module" assert { type: "json" };
import "module" with { type: "json" };
import * as v1 from "module" with { type: "json" };
import { v2 } from "module" with { type: "json" };
import v3 from "module" assert { type: "json" };
export { v4 } from "module" assert { type: "json" };
export * from "module" assert { type: "json" };
export * as v5 from "module" assert { type: "json" };
export { v4 } from "module" with { type: "json" };
export * from "module" with { type: "json" };
export * as v5 from "module" with { type: "json" };
const v6 = import("module", { assert: { type: "json" } });
const v6 = import("module", { "with": { type: "json" } });
import "module"; // missing semicolon
assert({ type: "json" }); // function call, not import assertion

View File

@@ -20,22 +20,22 @@ comments(#20004,0,#20001," function call, not import assertion","// func ... ser
locations_default(#20005,#10000,13,27,13,64)
hasLocation(#20004,#20005)
#20006=*
lines(#20006,#20001,"import ""module"" assert { type: ""json"" };","
lines(#20006,#20001,"import ""module"" with { type: ""json"" };","
")
#20007=@"loc,{#10000},1,1,1,40"
locations_default(#20007,#10000,1,1,1,40)
#20007=@"loc,{#10000},1,1,1,38"
locations_default(#20007,#10000,1,1,1,38)
hasLocation(#20006,#20007)
#20008=*
lines(#20008,#20001,"import * as v1 from ""module"" assert { type: ""json"" };","
lines(#20008,#20001,"import * as v1 from ""module"" with { type: ""json"" };","
")
#20009=@"loc,{#10000},2,1,2,53"
locations_default(#20009,#10000,2,1,2,53)
#20009=@"loc,{#10000},2,1,2,51"
locations_default(#20009,#10000,2,1,2,51)
hasLocation(#20008,#20009)
#20010=*
lines(#20010,#20001,"import { v2 } from ""module"" assert { type: ""json"" };","
lines(#20010,#20001,"import { v2 } from ""module"" with { type: ""json"" };","
")
#20011=@"loc,{#10000},3,1,3,52"
locations_default(#20011,#10000,3,1,3,52)
#20011=@"loc,{#10000},3,1,3,50"
locations_default(#20011,#10000,3,1,3,50)
hasLocation(#20010,#20011)
#20012=*
lines(#20012,#20001,"import v3 from ""module"" assert { type: ""json"" };","
@@ -50,22 +50,22 @@ lines(#20014,#20001,"","
locations_default(#20015,#10000,5,1,5,0)
hasLocation(#20014,#20015)
#20016=*
lines(#20016,#20001,"export { v4 } from ""module"" assert { type: ""json"" };","
lines(#20016,#20001,"export { v4 } from ""module"" with { type: ""json"" };","
")
#20017=@"loc,{#10000},6,1,6,52"
locations_default(#20017,#10000,6,1,6,52)
#20017=@"loc,{#10000},6,1,6,50"
locations_default(#20017,#10000,6,1,6,50)
hasLocation(#20016,#20017)
#20018=*
lines(#20018,#20001,"export * from ""module"" assert { type: ""json"" };","
lines(#20018,#20001,"export * from ""module"" with { type: ""json"" };","
")
#20019=@"loc,{#10000},7,1,7,47"
locations_default(#20019,#10000,7,1,7,47)
#20019=@"loc,{#10000},7,1,7,45"
locations_default(#20019,#10000,7,1,7,45)
hasLocation(#20018,#20019)
#20020=*
lines(#20020,#20001,"export * as v5 from ""module"" assert { type: ""json"" };","
lines(#20020,#20001,"export * as v5 from ""module"" with { type: ""json"" };","
")
#20021=@"loc,{#10000},8,1,8,53"
locations_default(#20021,#10000,8,1,8,53)
#20021=@"loc,{#10000},8,1,8,51"
locations_default(#20021,#10000,8,1,8,51)
hasLocation(#20020,#20021)
#20022=*
lines(#20022,#20001,"","
@@ -74,7 +74,7 @@ lines(#20022,#20001,"","
locations_default(#20023,#10000,9,1,9,0)
hasLocation(#20022,#20023)
#20024=*
lines(#20024,#20001,"const v6 = import(""module"", { assert: { type: ""json"" } });","
lines(#20024,#20001,"const v6 = import(""module"", { ""with"": { type: ""json"" } });","
")
#20025=@"loc,{#10000},10,1,10,58"
locations_default(#20025,#10000,10,1,10,58)
@@ -109,39 +109,39 @@ tokeninfo(#20034,4,#20001,1,"""module""")
locations_default(#20035,#10000,1,8,1,15)
hasLocation(#20034,#20035)
#20036=*
tokeninfo(#20036,7,#20001,2,"assert")
#20037=@"loc,{#10000},1,17,1,22"
locations_default(#20037,#10000,1,17,1,22)
tokeninfo(#20036,7,#20001,2,"with")
#20037=@"loc,{#10000},1,17,1,20"
locations_default(#20037,#10000,1,17,1,20)
hasLocation(#20036,#20037)
#20038=*
tokeninfo(#20038,8,#20001,3,"{")
#20039=@"loc,{#10000},1,24,1,24"
locations_default(#20039,#10000,1,24,1,24)
#20039=@"loc,{#10000},1,22,1,22"
locations_default(#20039,#10000,1,22,1,22)
hasLocation(#20038,#20039)
#20040=*
tokeninfo(#20040,7,#20001,4,"type")
#20041=@"loc,{#10000},1,26,1,29"
locations_default(#20041,#10000,1,26,1,29)
#20041=@"loc,{#10000},1,24,1,27"
locations_default(#20041,#10000,1,24,1,27)
hasLocation(#20040,#20041)
#20042=*
tokeninfo(#20042,8,#20001,5,":")
#20043=@"loc,{#10000},1,30,1,30"
locations_default(#20043,#10000,1,30,1,30)
#20043=@"loc,{#10000},1,28,1,28"
locations_default(#20043,#10000,1,28,1,28)
hasLocation(#20042,#20043)
#20044=*
tokeninfo(#20044,4,#20001,6,"""json""")
#20045=@"loc,{#10000},1,32,1,37"
locations_default(#20045,#10000,1,32,1,37)
#20045=@"loc,{#10000},1,30,1,35"
locations_default(#20045,#10000,1,30,1,35)
hasLocation(#20044,#20045)
#20046=*
tokeninfo(#20046,8,#20001,7,"}")
#20047=@"loc,{#10000},1,39,1,39"
locations_default(#20047,#10000,1,39,1,39)
#20047=@"loc,{#10000},1,37,1,37"
locations_default(#20047,#10000,1,37,1,37)
hasLocation(#20046,#20047)
#20048=*
tokeninfo(#20048,8,#20001,8,";")
#20049=@"loc,{#10000},1,40,1,40"
locations_default(#20049,#10000,1,40,1,40)
#20049=@"loc,{#10000},1,38,1,38"
locations_default(#20049,#10000,1,38,1,38)
hasLocation(#20048,#20049)
#20050=*
tokeninfo(#20050,7,#20001,9,"import")
@@ -174,39 +174,39 @@ tokeninfo(#20060,4,#20001,14,"""module""")
locations_default(#20061,#10000,2,21,2,28)
hasLocation(#20060,#20061)
#20062=*
tokeninfo(#20062,7,#20001,15,"assert")
#20063=@"loc,{#10000},2,30,2,35"
locations_default(#20063,#10000,2,30,2,35)
tokeninfo(#20062,7,#20001,15,"with")
#20063=@"loc,{#10000},2,30,2,33"
locations_default(#20063,#10000,2,30,2,33)
hasLocation(#20062,#20063)
#20064=*
tokeninfo(#20064,8,#20001,16,"{")
#20065=@"loc,{#10000},2,37,2,37"
locations_default(#20065,#10000,2,37,2,37)
#20065=@"loc,{#10000},2,35,2,35"
locations_default(#20065,#10000,2,35,2,35)
hasLocation(#20064,#20065)
#20066=*
tokeninfo(#20066,7,#20001,17,"type")
#20067=@"loc,{#10000},2,39,2,42"
locations_default(#20067,#10000,2,39,2,42)
#20067=@"loc,{#10000},2,37,2,40"
locations_default(#20067,#10000,2,37,2,40)
hasLocation(#20066,#20067)
#20068=*
tokeninfo(#20068,8,#20001,18,":")
#20069=@"loc,{#10000},2,43,2,43"
locations_default(#20069,#10000,2,43,2,43)
#20069=@"loc,{#10000},2,41,2,41"
locations_default(#20069,#10000,2,41,2,41)
hasLocation(#20068,#20069)
#20070=*
tokeninfo(#20070,4,#20001,19,"""json""")
#20071=@"loc,{#10000},2,45,2,50"
locations_default(#20071,#10000,2,45,2,50)
#20071=@"loc,{#10000},2,43,2,48"
locations_default(#20071,#10000,2,43,2,48)
hasLocation(#20070,#20071)
#20072=*
tokeninfo(#20072,8,#20001,20,"}")
#20073=@"loc,{#10000},2,52,2,52"
locations_default(#20073,#10000,2,52,2,52)
#20073=@"loc,{#10000},2,50,2,50"
locations_default(#20073,#10000,2,50,2,50)
hasLocation(#20072,#20073)
#20074=*
tokeninfo(#20074,8,#20001,21,";")
#20075=@"loc,{#10000},2,53,2,53"
locations_default(#20075,#10000,2,53,2,53)
#20075=@"loc,{#10000},2,51,2,51"
locations_default(#20075,#10000,2,51,2,51)
hasLocation(#20074,#20075)
#20076=*
tokeninfo(#20076,7,#20001,22,"import")
@@ -239,39 +239,39 @@ tokeninfo(#20086,4,#20001,27,"""module""")
locations_default(#20087,#10000,3,20,3,27)
hasLocation(#20086,#20087)
#20088=*
tokeninfo(#20088,7,#20001,28,"assert")
#20089=@"loc,{#10000},3,29,3,34"
locations_default(#20089,#10000,3,29,3,34)
tokeninfo(#20088,7,#20001,28,"with")
#20089=@"loc,{#10000},3,29,3,32"
locations_default(#20089,#10000,3,29,3,32)
hasLocation(#20088,#20089)
#20090=*
tokeninfo(#20090,8,#20001,29,"{")
#20091=@"loc,{#10000},3,36,3,36"
locations_default(#20091,#10000,3,36,3,36)
#20091=@"loc,{#10000},3,34,3,34"
locations_default(#20091,#10000,3,34,3,34)
hasLocation(#20090,#20091)
#20092=*
tokeninfo(#20092,7,#20001,30,"type")
#20093=@"loc,{#10000},3,38,3,41"
locations_default(#20093,#10000,3,38,3,41)
#20093=@"loc,{#10000},3,36,3,39"
locations_default(#20093,#10000,3,36,3,39)
hasLocation(#20092,#20093)
#20094=*
tokeninfo(#20094,8,#20001,31,":")
#20095=@"loc,{#10000},3,42,3,42"
locations_default(#20095,#10000,3,42,3,42)
#20095=@"loc,{#10000},3,40,3,40"
locations_default(#20095,#10000,3,40,3,40)
hasLocation(#20094,#20095)
#20096=*
tokeninfo(#20096,4,#20001,32,"""json""")
#20097=@"loc,{#10000},3,44,3,49"
locations_default(#20097,#10000,3,44,3,49)
#20097=@"loc,{#10000},3,42,3,47"
locations_default(#20097,#10000,3,42,3,47)
hasLocation(#20096,#20097)
#20098=*
tokeninfo(#20098,8,#20001,33,"}")
#20099=@"loc,{#10000},3,51,3,51"
locations_default(#20099,#10000,3,51,3,51)
#20099=@"loc,{#10000},3,49,3,49"
locations_default(#20099,#10000,3,49,3,49)
hasLocation(#20098,#20099)
#20100=*
tokeninfo(#20100,8,#20001,34,";")
#20101=@"loc,{#10000},3,52,3,52"
locations_default(#20101,#10000,3,52,3,52)
#20101=@"loc,{#10000},3,50,3,50"
locations_default(#20101,#10000,3,50,3,50)
hasLocation(#20100,#20101)
#20102=*
tokeninfo(#20102,7,#20001,35,"import")
@@ -359,39 +359,39 @@ tokeninfo(#20134,4,#20001,51,"""module""")
locations_default(#20135,#10000,6,20,6,27)
hasLocation(#20134,#20135)
#20136=*
tokeninfo(#20136,7,#20001,52,"assert")
#20137=@"loc,{#10000},6,29,6,34"
locations_default(#20137,#10000,6,29,6,34)
tokeninfo(#20136,7,#20001,52,"with")
#20137=@"loc,{#10000},6,29,6,32"
locations_default(#20137,#10000,6,29,6,32)
hasLocation(#20136,#20137)
#20138=*
tokeninfo(#20138,8,#20001,53,"{")
#20139=@"loc,{#10000},6,36,6,36"
locations_default(#20139,#10000,6,36,6,36)
#20139=@"loc,{#10000},6,34,6,34"
locations_default(#20139,#10000,6,34,6,34)
hasLocation(#20138,#20139)
#20140=*
tokeninfo(#20140,7,#20001,54,"type")
#20141=@"loc,{#10000},6,38,6,41"
locations_default(#20141,#10000,6,38,6,41)
#20141=@"loc,{#10000},6,36,6,39"
locations_default(#20141,#10000,6,36,6,39)
hasLocation(#20140,#20141)
#20142=*
tokeninfo(#20142,8,#20001,55,":")
#20143=@"loc,{#10000},6,42,6,42"
locations_default(#20143,#10000,6,42,6,42)
#20143=@"loc,{#10000},6,40,6,40"
locations_default(#20143,#10000,6,40,6,40)
hasLocation(#20142,#20143)
#20144=*
tokeninfo(#20144,4,#20001,56,"""json""")
#20145=@"loc,{#10000},6,44,6,49"
locations_default(#20145,#10000,6,44,6,49)
#20145=@"loc,{#10000},6,42,6,47"
locations_default(#20145,#10000,6,42,6,47)
hasLocation(#20144,#20145)
#20146=*
tokeninfo(#20146,8,#20001,57,"}")
#20147=@"loc,{#10000},6,51,6,51"
locations_default(#20147,#10000,6,51,6,51)
#20147=@"loc,{#10000},6,49,6,49"
locations_default(#20147,#10000,6,49,6,49)
hasLocation(#20146,#20147)
#20148=*
tokeninfo(#20148,8,#20001,58,";")
#20149=@"loc,{#10000},6,52,6,52"
locations_default(#20149,#10000,6,52,6,52)
#20149=@"loc,{#10000},6,50,6,50"
locations_default(#20149,#10000,6,50,6,50)
hasLocation(#20148,#20149)
#20150=*
tokeninfo(#20150,7,#20001,59,"export")
@@ -414,39 +414,39 @@ tokeninfo(#20156,4,#20001,62,"""module""")
locations_default(#20157,#10000,7,15,7,22)
hasLocation(#20156,#20157)
#20158=*
tokeninfo(#20158,7,#20001,63,"assert")
#20159=@"loc,{#10000},7,24,7,29"
locations_default(#20159,#10000,7,24,7,29)
tokeninfo(#20158,7,#20001,63,"with")
#20159=@"loc,{#10000},7,24,7,27"
locations_default(#20159,#10000,7,24,7,27)
hasLocation(#20158,#20159)
#20160=*
tokeninfo(#20160,8,#20001,64,"{")
#20161=@"loc,{#10000},7,31,7,31"
locations_default(#20161,#10000,7,31,7,31)
#20161=@"loc,{#10000},7,29,7,29"
locations_default(#20161,#10000,7,29,7,29)
hasLocation(#20160,#20161)
#20162=*
tokeninfo(#20162,7,#20001,65,"type")
#20163=@"loc,{#10000},7,33,7,36"
locations_default(#20163,#10000,7,33,7,36)
#20163=@"loc,{#10000},7,31,7,34"
locations_default(#20163,#10000,7,31,7,34)
hasLocation(#20162,#20163)
#20164=*
tokeninfo(#20164,8,#20001,66,":")
#20165=@"loc,{#10000},7,37,7,37"
locations_default(#20165,#10000,7,37,7,37)
#20165=@"loc,{#10000},7,35,7,35"
locations_default(#20165,#10000,7,35,7,35)
hasLocation(#20164,#20165)
#20166=*
tokeninfo(#20166,4,#20001,67,"""json""")
#20167=@"loc,{#10000},7,39,7,44"
locations_default(#20167,#10000,7,39,7,44)
#20167=@"loc,{#10000},7,37,7,42"
locations_default(#20167,#10000,7,37,7,42)
hasLocation(#20166,#20167)
#20168=*
tokeninfo(#20168,8,#20001,68,"}")
#20169=@"loc,{#10000},7,46,7,46"
locations_default(#20169,#10000,7,46,7,46)
#20169=@"loc,{#10000},7,44,7,44"
locations_default(#20169,#10000,7,44,7,44)
hasLocation(#20168,#20169)
#20170=*
tokeninfo(#20170,8,#20001,69,";")
#20171=@"loc,{#10000},7,47,7,47"
locations_default(#20171,#10000,7,47,7,47)
#20171=@"loc,{#10000},7,45,7,45"
locations_default(#20171,#10000,7,45,7,45)
hasLocation(#20170,#20171)
#20172=*
tokeninfo(#20172,7,#20001,70,"export")
@@ -479,39 +479,39 @@ tokeninfo(#20182,4,#20001,75,"""module""")
locations_default(#20183,#10000,8,21,8,28)
hasLocation(#20182,#20183)
#20184=*
tokeninfo(#20184,7,#20001,76,"assert")
#20185=@"loc,{#10000},8,30,8,35"
locations_default(#20185,#10000,8,30,8,35)
tokeninfo(#20184,7,#20001,76,"with")
#20185=@"loc,{#10000},8,30,8,33"
locations_default(#20185,#10000,8,30,8,33)
hasLocation(#20184,#20185)
#20186=*
tokeninfo(#20186,8,#20001,77,"{")
#20187=@"loc,{#10000},8,37,8,37"
locations_default(#20187,#10000,8,37,8,37)
#20187=@"loc,{#10000},8,35,8,35"
locations_default(#20187,#10000,8,35,8,35)
hasLocation(#20186,#20187)
#20188=*
tokeninfo(#20188,7,#20001,78,"type")
#20189=@"loc,{#10000},8,39,8,42"
locations_default(#20189,#10000,8,39,8,42)
#20189=@"loc,{#10000},8,37,8,40"
locations_default(#20189,#10000,8,37,8,40)
hasLocation(#20188,#20189)
#20190=*
tokeninfo(#20190,8,#20001,79,":")
#20191=@"loc,{#10000},8,43,8,43"
locations_default(#20191,#10000,8,43,8,43)
#20191=@"loc,{#10000},8,41,8,41"
locations_default(#20191,#10000,8,41,8,41)
hasLocation(#20190,#20191)
#20192=*
tokeninfo(#20192,4,#20001,80,"""json""")
#20193=@"loc,{#10000},8,45,8,50"
locations_default(#20193,#10000,8,45,8,50)
#20193=@"loc,{#10000},8,43,8,48"
locations_default(#20193,#10000,8,43,8,48)
hasLocation(#20192,#20193)
#20194=*
tokeninfo(#20194,8,#20001,81,"}")
#20195=@"loc,{#10000},8,52,8,52"
locations_default(#20195,#10000,8,52,8,52)
#20195=@"loc,{#10000},8,50,8,50"
locations_default(#20195,#10000,8,50,8,50)
hasLocation(#20194,#20195)
#20196=*
tokeninfo(#20196,8,#20001,82,";")
#20197=@"loc,{#10000},8,53,8,53"
locations_default(#20197,#10000,8,53,8,53)
#20197=@"loc,{#10000},8,51,8,51"
locations_default(#20197,#10000,8,51,8,51)
hasLocation(#20196,#20197)
#20198=*
tokeninfo(#20198,7,#20001,83,"const")
@@ -554,7 +554,7 @@ tokeninfo(#20212,8,#20001,90,"{")
locations_default(#20213,#10000,10,29,10,29)
hasLocation(#20212,#20213)
#20214=*
tokeninfo(#20214,7,#20001,91,"assert")
tokeninfo(#20214,4,#20001,91,"""with""")
#20215=@"loc,{#10000},10,31,10,36"
locations_default(#20215,#10000,10,31,10,36)
hasLocation(#20214,#20215)
@@ -727,15 +727,15 @@ hasLocation(#20274,#20275)
regexp_const_value(#20274,"module")
#20276=*
exprs(#20276,8,#20272,-10,"{ type: ""json"" }")
#20277=@"loc,{#10000},1,24,1,39"
locations_default(#20277,#10000,1,24,1,39)
#20277=@"loc,{#10000},1,22,1,37"
locations_default(#20277,#10000,1,22,1,37)
hasLocation(#20276,#20277)
enclosing_stmt(#20276,#20272)
expr_containers(#20276,#20001)
#20278=*
properties(#20278,#20276,0,0,"type: ""json""")
#20279=@"loc,{#10000},1,26,1,37"
locations_default(#20279,#10000,1,26,1,37)
#20279=@"loc,{#10000},1,24,1,35"
locations_default(#20279,#10000,1,24,1,35)
hasLocation(#20278,#20279)
#20280=*
stmts(#20280,27,#20001,1,"import ... son"" };")
@@ -755,15 +755,15 @@ hasLocation(#20282,#20283)
regexp_const_value(#20282,"module")
#20284=*
exprs(#20284,8,#20280,-10,"{ type: ""json"" }")
#20285=@"loc,{#10000},2,37,2,52"
locations_default(#20285,#10000,2,37,2,52)
#20285=@"loc,{#10000},2,35,2,50"
locations_default(#20285,#10000,2,35,2,50)
hasLocation(#20284,#20285)
enclosing_stmt(#20284,#20280)
expr_containers(#20284,#20001)
#20286=*
properties(#20286,#20284,0,0,"type: ""json""")
#20287=@"loc,{#10000},2,39,2,50"
locations_default(#20287,#10000,2,39,2,50)
#20287=@"loc,{#10000},2,37,2,48"
locations_default(#20287,#10000,2,37,2,48)
hasLocation(#20286,#20287)
#20288=*
exprs(#20288,85,#20280,0,"* as v1")
@@ -799,15 +799,15 @@ hasLocation(#20293,#20294)
regexp_const_value(#20293,"module")
#20295=*
exprs(#20295,8,#20291,-10,"{ type: ""json"" }")
#20296=@"loc,{#10000},3,36,3,51"
locations_default(#20296,#10000,3,36,3,51)
#20296=@"loc,{#10000},3,34,3,49"
locations_default(#20296,#10000,3,34,3,49)
hasLocation(#20295,#20296)
enclosing_stmt(#20295,#20291)
expr_containers(#20295,#20001)
#20297=*
properties(#20297,#20295,0,0,"type: ""json""")
#20298=@"loc,{#10000},3,38,3,49"
locations_default(#20298,#10000,3,38,3,49)
#20298=@"loc,{#10000},3,36,3,47"
locations_default(#20298,#10000,3,36,3,47)
hasLocation(#20297,#20298)
#20299=*
exprs(#20299,83,#20291,0,"v2")
@@ -889,15 +889,15 @@ hasLocation(#20314,#20315)
regexp_const_value(#20314,"module")
#20316=*
exprs(#20316,8,#20312,-10,"{ type: ""json"" }")
#20317=@"loc,{#10000},6,36,6,51"
locations_default(#20317,#10000,6,36,6,51)
#20317=@"loc,{#10000},6,34,6,49"
locations_default(#20317,#10000,6,34,6,49)
hasLocation(#20316,#20317)
enclosing_stmt(#20316,#20312)
expr_containers(#20316,#20001)
#20318=*
properties(#20318,#20316,0,0,"type: ""json""")
#20319=@"loc,{#10000},6,38,6,49"
locations_default(#20319,#10000,6,38,6,49)
#20319=@"loc,{#10000},6,36,6,47"
locations_default(#20319,#10000,6,36,6,47)
hasLocation(#20318,#20319)
#20320=*
exprs(#20320,86,#20312,0,"v4")
@@ -934,15 +934,15 @@ hasLocation(#20325,#20326)
regexp_const_value(#20325,"module")
#20327=*
exprs(#20327,8,#20323,-10,"{ type: ""json"" }")
#20328=@"loc,{#10000},7,31,7,46"
locations_default(#20328,#10000,7,31,7,46)
#20328=@"loc,{#10000},7,29,7,44"
locations_default(#20328,#10000,7,29,7,44)
hasLocation(#20327,#20328)
enclosing_stmt(#20327,#20323)
expr_containers(#20327,#20001)
#20329=*
properties(#20329,#20327,0,0,"type: ""json""")
#20330=@"loc,{#10000},7,33,7,44"
locations_default(#20330,#10000,7,33,7,44)
#20330=@"loc,{#10000},7,31,7,42"
locations_default(#20330,#10000,7,31,7,42)
hasLocation(#20329,#20330)
#20331=*
stmts(#20331,30,#20001,6,"export ... son"" };")
@@ -962,15 +962,15 @@ hasLocation(#20333,#20334)
regexp_const_value(#20333,"module")
#20335=*
exprs(#20335,8,#20331,-10,"{ type: ""json"" }")
#20336=@"loc,{#10000},8,37,8,52"
locations_default(#20336,#10000,8,37,8,52)
#20336=@"loc,{#10000},8,35,8,50"
locations_default(#20336,#10000,8,35,8,50)
hasLocation(#20335,#20336)
enclosing_stmt(#20335,#20331)
expr_containers(#20335,#20001)
#20337=*
properties(#20337,#20335,0,0,"type: ""json""")
#20338=@"loc,{#10000},8,39,8,50"
locations_default(#20338,#10000,8,39,8,50)
#20338=@"loc,{#10000},8,37,8,48"
locations_default(#20338,#10000,8,37,8,48)
hasLocation(#20337,#20338)
#20339=*
exprs(#20339,96,#20331,0,"* as v5")
@@ -1023,144 +1023,150 @@ locations_default(#20350,#10000,10,20,10,25)
hasLocation(#20349,#20350)
regexp_const_value(#20349,"module")
#20351=*
exprs(#20351,8,#20346,1,"{ asser ... on"" } }")
exprs(#20351,8,#20346,1,"{ ""with ... on"" } }")
#20352=@"loc,{#10000},10,29,10,56"
locations_default(#20352,#10000,10,29,10,56)
hasLocation(#20351,#20352)
enclosing_stmt(#20351,#20342)
expr_containers(#20351,#20001)
#20353=*
properties(#20353,#20351,0,0,"assert: ... json"" }")
properties(#20353,#20351,0,0,"""with"": ... json"" }")
#20354=@"loc,{#10000},10,31,10,54"
locations_default(#20354,#10000,10,31,10,54)
hasLocation(#20353,#20354)
#20355=*
exprs(#20355,0,#20353,0,"assert")
exprs(#20355,4,#20353,0,"""with""")
hasLocation(#20355,#20215)
enclosing_stmt(#20355,#20342)
expr_containers(#20355,#20001)
literals("assert","assert",#20355)
literals("with","""with""",#20355)
#20356=*
exprs(#20356,8,#20353,1,"{ type: ""json"" }")
#20357=@"loc,{#10000},10,39,10,54"
locations_default(#20357,#10000,10,39,10,54)
regexpterm(#20356,14,#20355,0,"with")
#20357=@"loc,{#10000},10,32,10,35"
locations_default(#20357,#10000,10,32,10,35)
hasLocation(#20356,#20357)
enclosing_stmt(#20356,#20342)
expr_containers(#20356,#20001)
regexp_const_value(#20356,"with")
#20358=*
properties(#20358,#20356,0,0,"type: ""json""")
#20359=@"loc,{#10000},10,41,10,52"
locations_default(#20359,#10000,10,41,10,52)
exprs(#20358,8,#20353,1,"{ type: ""json"" }")
#20359=@"loc,{#10000},10,39,10,54"
locations_default(#20359,#10000,10,39,10,54)
hasLocation(#20358,#20359)
enclosing_stmt(#20358,#20342)
expr_containers(#20358,#20001)
#20360=*
exprs(#20360,0,#20358,0,"type")
hasLocation(#20360,#20221)
enclosing_stmt(#20360,#20342)
expr_containers(#20360,#20001)
literals("type","type",#20360)
#20361=*
exprs(#20361,4,#20358,1,"""json""")
hasLocation(#20361,#20225)
enclosing_stmt(#20361,#20342)
expr_containers(#20361,#20001)
literals("json","""json""",#20361)
properties(#20360,#20358,0,0,"type: ""json""")
#20361=@"loc,{#10000},10,41,10,52"
locations_default(#20361,#10000,10,41,10,52)
hasLocation(#20360,#20361)
#20362=*
regexpterm(#20362,14,#20361,0,"json")
#20363=@"loc,{#10000},10,48,10,51"
locations_default(#20363,#10000,10,48,10,51)
hasLocation(#20362,#20363)
regexp_const_value(#20362,"json")
exprs(#20362,0,#20360,0,"type")
hasLocation(#20362,#20221)
enclosing_stmt(#20362,#20342)
expr_containers(#20362,#20001)
literals("type","type",#20362)
#20363=*
exprs(#20363,4,#20360,1,"""json""")
hasLocation(#20363,#20225)
enclosing_stmt(#20363,#20342)
expr_containers(#20363,#20001)
literals("json","""json""",#20363)
#20364=*
stmts(#20364,27,#20001,8,"import ""module"";")
#20365=@"loc,{#10000},12,1,12,16"
locations_default(#20365,#10000,12,1,12,16)
regexpterm(#20364,14,#20363,0,"json")
#20365=@"loc,{#10000},10,48,10,51"
locations_default(#20365,#10000,10,48,10,51)
hasLocation(#20364,#20365)
stmt_containers(#20364,#20001)
regexp_const_value(#20364,"json")
#20366=*
exprs(#20366,4,#20364,-1,"""module""")
hasLocation(#20366,#20237)
enclosing_stmt(#20366,#20364)
expr_containers(#20366,#20001)
literals("module","""module""",#20366)
#20367=*
regexpterm(#20367,14,#20366,0,"module")
#20368=@"loc,{#10000},12,9,12,14"
locations_default(#20368,#10000,12,9,12,14)
hasLocation(#20367,#20368)
regexp_const_value(#20367,"module")
stmts(#20366,27,#20001,8,"import ""module"";")
#20367=@"loc,{#10000},12,1,12,16"
locations_default(#20367,#10000,12,1,12,16)
hasLocation(#20366,#20367)
stmt_containers(#20366,#20001)
#20368=*
exprs(#20368,4,#20366,-1,"""module""")
hasLocation(#20368,#20237)
enclosing_stmt(#20368,#20366)
expr_containers(#20368,#20001)
literals("module","""module""",#20368)
#20369=*
stmts(#20369,2,#20001,9,"assert( ... on"" });")
#20370=@"loc,{#10000},13,1,13,25"
locations_default(#20370,#10000,13,1,13,25)
regexpterm(#20369,14,#20368,0,"module")
#20370=@"loc,{#10000},12,9,12,14"
locations_default(#20370,#10000,12,9,12,14)
hasLocation(#20369,#20370)
stmt_containers(#20369,#20001)
regexp_const_value(#20369,"module")
#20371=*
exprs(#20371,13,#20369,0,"assert( ... son"" })")
#20372=@"loc,{#10000},13,1,13,24"
locations_default(#20372,#10000,13,1,13,24)
stmts(#20371,2,#20001,9,"assert( ... on"" });")
#20372=@"loc,{#10000},13,1,13,25"
locations_default(#20372,#10000,13,1,13,25)
hasLocation(#20371,#20372)
enclosing_stmt(#20371,#20369)
expr_containers(#20371,#20001)
stmt_containers(#20371,#20001)
#20373=*
exprs(#20373,79,#20371,-1,"assert")
hasLocation(#20373,#20241)
enclosing_stmt(#20373,#20369)
exprs(#20373,13,#20371,0,"assert( ... son"" })")
#20374=@"loc,{#10000},13,1,13,24"
locations_default(#20374,#10000,13,1,13,24)
hasLocation(#20373,#20374)
enclosing_stmt(#20373,#20371)
expr_containers(#20373,#20001)
literals("assert","assert",#20373)
#20374=@"var;{assert};{#20000}"
variables(#20374,"assert",#20000)
bind(#20373,#20374)
#20375=*
exprs(#20375,8,#20371,0,"{ type: ""json"" }")
#20376=@"loc,{#10000},13,8,13,23"
locations_default(#20376,#10000,13,8,13,23)
hasLocation(#20375,#20376)
enclosing_stmt(#20375,#20369)
exprs(#20375,79,#20373,-1,"assert")
hasLocation(#20375,#20241)
enclosing_stmt(#20375,#20371)
expr_containers(#20375,#20001)
literals("assert","assert",#20375)
#20376=@"var;{assert};{#20000}"
variables(#20376,"assert",#20000)
bind(#20375,#20376)
#20377=*
properties(#20377,#20375,0,0,"type: ""json""")
#20378=@"loc,{#10000},13,10,13,21"
locations_default(#20378,#10000,13,10,13,21)
exprs(#20377,8,#20373,0,"{ type: ""json"" }")
#20378=@"loc,{#10000},13,8,13,23"
locations_default(#20378,#10000,13,8,13,23)
hasLocation(#20377,#20378)
enclosing_stmt(#20377,#20371)
expr_containers(#20377,#20001)
#20379=*
exprs(#20379,0,#20377,0,"type")
hasLocation(#20379,#20247)
enclosing_stmt(#20379,#20369)
expr_containers(#20379,#20001)
literals("type","type",#20379)
#20380=*
exprs(#20380,4,#20377,1,"""json""")
hasLocation(#20380,#20251)
enclosing_stmt(#20380,#20369)
expr_containers(#20380,#20001)
literals("json","""json""",#20380)
properties(#20379,#20377,0,0,"type: ""json""")
#20380=@"loc,{#10000},13,10,13,21"
locations_default(#20380,#10000,13,10,13,21)
hasLocation(#20379,#20380)
#20381=*
regexpterm(#20381,14,#20380,0,"json")
#20382=@"loc,{#10000},13,17,13,20"
locations_default(#20382,#10000,13,17,13,20)
hasLocation(#20381,#20382)
regexp_const_value(#20381,"json")
exprs(#20381,0,#20379,0,"type")
hasLocation(#20381,#20247)
enclosing_stmt(#20381,#20371)
expr_containers(#20381,#20001)
literals("type","type",#20381)
#20382=*
exprs(#20382,4,#20379,1,"""json""")
hasLocation(#20382,#20251)
enclosing_stmt(#20382,#20371)
expr_containers(#20382,#20001)
literals("json","""json""",#20382)
#20383=*
entry_cfg_node(#20383,#20001)
#20384=@"loc,{#10000},1,1,1,0"
locations_default(#20384,#10000,1,1,1,0)
regexpterm(#20383,14,#20382,0,"json")
#20384=@"loc,{#10000},13,17,13,20"
locations_default(#20384,#10000,13,17,13,20)
hasLocation(#20383,#20384)
regexp_const_value(#20383,"json")
#20385=*
exit_cfg_node(#20385,#20001)
hasLocation(#20385,#20259)
successor(#20369,#20373)
successor(#20375,#20379)
successor(#20380,#20377)
successor(#20379,#20380)
successor(#20377,#20371)
successor(#20373,#20375)
successor(#20371,#20385)
successor(#20364,#20369)
entry_cfg_node(#20385,#20001)
#20386=@"loc,{#10000},1,1,1,0"
locations_default(#20386,#10000,1,1,1,0)
hasLocation(#20385,#20386)
#20387=*
exit_cfg_node(#20387,#20001)
hasLocation(#20387,#20259)
successor(#20371,#20375)
successor(#20377,#20381)
successor(#20382,#20379)
successor(#20381,#20382)
successor(#20379,#20373)
successor(#20375,#20377)
successor(#20373,#20387)
successor(#20366,#20371)
successor(#20342,#20345)
successor(#20348,#20346)
successor(#20346,#20343)
successor(#20345,#20348)
successor(#20343,#20364)
successor(#20343,#20366)
successor(#20331,#20332)
successor(#20339,#20341)
successor(#20341,#20342)
@@ -1179,6 +1185,6 @@ successor(#20272,#20280)
successor(#20310,#20272)
successor(#20299,#20310)
successor(#20288,#20299)
successor(#20383,#20288)
successor(#20385,#20288)
numlines(#10000,13,10,2)
filetype(#10000,"typescript")