Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8201e7e

Browse files
committed
TS: update trap test output
1 parent aaa8bfb commit 8201e7e

3 files changed

Lines changed: 150 additions & 276 deletions

File tree

javascript/extractor/tests/es2015/output/trap/import5.js.trap

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -65,45 +65,49 @@ isModule(#20001)
6565
isES2015Module(#20001)
6666
#20021=@"var;{foo};{#20020}"
6767
variables(#20021,"foo",#20020)
68-
#20022=@"local_namespace_name;{foo};{#20020}"
69-
local_namespace_names(#20022,"foo",#20020)
68+
#20022=@"local_type_name;{foo};{#20020}"
69+
local_type_names(#20022,"foo",#20020)
70+
#20023=@"local_namespace_name;{foo};{#20020}"
71+
local_namespace_names(#20023,"foo",#20020)
7072
variables(#20021,"foo",#20020)
71-
local_namespace_names(#20022,"foo",#20020)
72-
#20023=*
73-
stmts(#20023,27,#20001,0,"import ... 'foo';")
74-
hasLocation(#20023,#20003)
75-
stmtContainers(#20023,#20001)
73+
local_type_names(#20022,"foo",#20020)
74+
local_namespace_names(#20023,"foo",#20020)
7675
#20024=*
77-
exprs(#20024,4,#20023,-1,"'foo'")
78-
hasLocation(#20024,#20015)
79-
enclosingStmt(#20024,#20023)
80-
exprContainers(#20024,#20001)
81-
literals("foo","'foo'",#20024)
76+
stmts(#20024,27,#20001,0,"import ... 'foo';")
77+
hasLocation(#20024,#20003)
78+
stmtContainers(#20024,#20001)
8279
#20025=*
83-
exprs(#20025,85,#20023,0,"* as foo")
84-
#20026=@"loc,{#10000},1,8,1,15"
85-
locations_default(#20026,#10000,1,8,1,15)
86-
hasLocation(#20025,#20026)
87-
enclosingStmt(#20025,#20023)
80+
exprs(#20025,4,#20024,-1,"'foo'")
81+
hasLocation(#20025,#20015)
82+
enclosingStmt(#20025,#20024)
8883
exprContainers(#20025,#20001)
89-
#20027=*
90-
exprs(#20027,78,#20025,1,"foo")
91-
hasLocation(#20027,#20011)
92-
enclosingStmt(#20027,#20023)
93-
exprContainers(#20027,#20001)
94-
literals("foo","foo",#20027)
95-
decl(#20027,#20021)
96-
namespacedecl(#20027,#20022)
84+
literals("foo","'foo'",#20025)
85+
#20026=*
86+
exprs(#20026,85,#20024,0,"* as foo")
87+
#20027=@"loc,{#10000},1,8,1,15"
88+
locations_default(#20027,#10000,1,8,1,15)
89+
hasLocation(#20026,#20027)
90+
enclosingStmt(#20026,#20024)
91+
exprContainers(#20026,#20001)
9792
#20028=*
98-
entry_cfg_node(#20028,#20001)
99-
#20029=@"loc,{#10000},1,1,1,0"
100-
locations_default(#20029,#10000,1,1,1,0)
101-
hasLocation(#20028,#20029)
102-
#20030=*
103-
exit_cfg_node(#20030,#20001)
104-
hasLocation(#20030,#20019)
105-
successor(#20023,#20030)
106-
successor(#20025,#20023)
107-
successor(#20028,#20025)
93+
exprs(#20028,78,#20026,1,"foo")
94+
hasLocation(#20028,#20011)
95+
enclosingStmt(#20028,#20024)
96+
exprContainers(#20028,#20001)
97+
literals("foo","foo",#20028)
98+
decl(#20028,#20021)
99+
typedecl(#20028,#20022)
100+
namespacedecl(#20028,#20023)
101+
#20029=*
102+
entry_cfg_node(#20029,#20001)
103+
#20030=@"loc,{#10000},1,1,1,0"
104+
locations_default(#20030,#10000,1,1,1,0)
105+
hasLocation(#20029,#20030)
106+
#20031=*
107+
exit_cfg_node(#20031,#20001)
108+
hasLocation(#20031,#20019)
109+
successor(#20024,#20031)
110+
successor(#20026,#20024)
111+
successor(#20029,#20026)
108112
numlines(#10000,1,1,0)
109113
filetype(#10000,"javascript")

javascript/extractor/tests/esnext/output/trap/yield-import.js.trap

Lines changed: 27 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -9,169 +9,35 @@ hasLocation(#10000,#10002)
99
#20000=@"global_scope"
1010
scopes(#20000,0)
1111
#20001=@"script;{#10000},1,1"
12-
#20002=*
13-
lines(#20002,#20001,"function* f() {","
12+
toplevels(#20001,0)
13+
#20002=@"loc,{#10000},1,1,1,1"
14+
locations_default(#20002,#10000,1,1,1,1)
15+
hasLocation(#20001,#20002)
16+
#20003=*
17+
jsParseErrors(#20003,#20001,"Error: Unexpected token"," yield import(""foo"")
18+
")
19+
#20004=@"loc,{#10000},2,9,2,9"
20+
locations_default(#20004,#10000,2,9,2,9)
21+
hasLocation(#20003,#20004)
22+
#20005=*
23+
lines(#20005,#20001,"function* f() {","
1424
")
15-
#20003=@"loc,{#10000},1,1,1,15"
16-
locations_default(#20003,#10000,1,1,1,15)
17-
hasLocation(#20002,#20003)
18-
#20004=*
19-
lines(#20004,#20001," yield import(""foo"")","
25+
#20006=@"loc,{#10000},1,1,1,15"
26+
locations_default(#20006,#10000,1,1,1,15)
27+
hasLocation(#20005,#20006)
28+
#20007=*
29+
lines(#20007,#20001," yield import(""foo"")","
2030
")
21-
#20005=@"loc,{#10000},2,1,2,21"
22-
locations_default(#20005,#10000,2,1,2,21)
23-
hasLocation(#20004,#20005)
31+
#20008=@"loc,{#10000},2,1,2,21"
32+
locations_default(#20008,#10000,2,1,2,21)
33+
hasLocation(#20007,#20008)
2434
indentation(#10000,2," ",2)
25-
#20006=*
26-
lines(#20006,#20001,"}","
35+
#20009=*
36+
lines(#20009,#20001,"}","
2737
")
28-
#20007=@"loc,{#10000},3,1,3,1"
29-
locations_default(#20007,#10000,3,1,3,1)
30-
hasLocation(#20006,#20007)
31-
numlines(#20001,3,3,0)
32-
#20008=*
33-
tokeninfo(#20008,7,#20001,0,"function")
34-
#20009=@"loc,{#10000},1,1,1,8"
35-
locations_default(#20009,#10000,1,1,1,8)
36-
hasLocation(#20008,#20009)
37-
#20010=*
38-
tokeninfo(#20010,8,#20001,1,"*")
39-
#20011=@"loc,{#10000},1,9,1,9"
40-
locations_default(#20011,#10000,1,9,1,9)
41-
hasLocation(#20010,#20011)
42-
#20012=*
43-
tokeninfo(#20012,6,#20001,2,"f")
44-
#20013=@"loc,{#10000},1,11,1,11"
45-
locations_default(#20013,#10000,1,11,1,11)
46-
hasLocation(#20012,#20013)
47-
#20014=*
48-
tokeninfo(#20014,8,#20001,3,"(")
49-
#20015=@"loc,{#10000},1,12,1,12"
50-
locations_default(#20015,#10000,1,12,1,12)
51-
hasLocation(#20014,#20015)
52-
#20016=*
53-
tokeninfo(#20016,8,#20001,4,")")
54-
#20017=@"loc,{#10000},1,13,1,13"
55-
locations_default(#20017,#10000,1,13,1,13)
56-
hasLocation(#20016,#20017)
57-
#20018=*
58-
tokeninfo(#20018,8,#20001,5,"{")
59-
#20019=@"loc,{#10000},1,15,1,15"
60-
locations_default(#20019,#10000,1,15,1,15)
61-
hasLocation(#20018,#20019)
62-
#20020=*
63-
tokeninfo(#20020,7,#20001,6,"yield")
64-
#20021=@"loc,{#10000},2,3,2,7"
65-
locations_default(#20021,#10000,2,3,2,7)
66-
hasLocation(#20020,#20021)
67-
#20022=*
68-
tokeninfo(#20022,7,#20001,7,"import")
69-
#20023=@"loc,{#10000},2,9,2,14"
70-
locations_default(#20023,#10000,2,9,2,14)
71-
hasLocation(#20022,#20023)
72-
#20024=*
73-
tokeninfo(#20024,8,#20001,8,"(")
74-
#20025=@"loc,{#10000},2,15,2,15"
75-
locations_default(#20025,#10000,2,15,2,15)
76-
hasLocation(#20024,#20025)
77-
#20026=*
78-
tokeninfo(#20026,4,#20001,9,"""foo""")
79-
#20027=@"loc,{#10000},2,16,2,20"
80-
locations_default(#20027,#10000,2,16,2,20)
81-
hasLocation(#20026,#20027)
82-
#20028=*
83-
tokeninfo(#20028,8,#20001,10,")")
84-
#20029=@"loc,{#10000},2,21,2,21"
85-
locations_default(#20029,#10000,2,21,2,21)
86-
hasLocation(#20028,#20029)
87-
#20030=*
88-
tokeninfo(#20030,8,#20001,11,"}")
89-
hasLocation(#20030,#20007)
90-
#20031=*
91-
tokeninfo(#20031,0,#20001,12,"")
92-
#20032=@"loc,{#10000},4,1,4,0"
93-
locations_default(#20032,#10000,4,1,4,0)
94-
hasLocation(#20031,#20032)
95-
toplevels(#20001,0)
96-
#20033=@"loc,{#10000},1,1,4,0"
97-
locations_default(#20033,#10000,1,1,4,0)
98-
hasLocation(#20001,#20033)
99-
#20034=@"var;{f};{#20000}"
100-
variables(#20034,"f",#20000)
101-
#20035=*
102-
stmts(#20035,17,#20001,0,"functio ... foo"")\n}")
103-
#20036=@"loc,{#10000},1,1,3,1"
104-
locations_default(#20036,#10000,1,1,3,1)
105-
hasLocation(#20035,#20036)
106-
stmtContainers(#20035,#20001)
107-
#20037=*
108-
exprs(#20037,78,#20035,-1,"f")
109-
hasLocation(#20037,#20013)
110-
exprContainers(#20037,#20035)
111-
literals("f","f",#20037)
112-
decl(#20037,#20034)
113-
#20038=*
114-
scopes(#20038,1)
115-
scopenodes(#20035,#20038)
116-
scopenesting(#20038,#20000)
117-
#20039=@"var;{arguments};{#20038}"
118-
variables(#20039,"arguments",#20038)
119-
isArgumentsObject(#20039)
120-
isGenerator(#20035)
121-
#20040=*
122-
stmts(#20040,1,#20035,-2,"{\n yie ... foo"")\n}")
123-
#20041=@"loc,{#10000},1,15,3,1"
124-
locations_default(#20041,#10000,1,15,3,1)
125-
hasLocation(#20040,#20041)
126-
stmtContainers(#20040,#20035)
127-
#20042=*
128-
stmts(#20042,2,#20040,0,"yield import(""foo"")")
129-
#20043=@"loc,{#10000},2,3,2,21"
130-
locations_default(#20043,#10000,2,3,2,21)
131-
hasLocation(#20042,#20043)
132-
stmtContainers(#20042,#20035)
133-
#20044=*
134-
exprs(#20044,69,#20042,0,"yield import(""foo"")")
135-
hasLocation(#20044,#20043)
136-
enclosingStmt(#20044,#20042)
137-
exprContainers(#20044,#20035)
138-
#20045=*
139-
exprs(#20045,99,#20044,0,"import(""foo"")")
140-
#20046=@"loc,{#10000},2,9,2,21"
141-
locations_default(#20046,#10000,2,9,2,21)
142-
hasLocation(#20045,#20046)
143-
enclosingStmt(#20045,#20042)
144-
exprContainers(#20045,#20035)
145-
#20047=*
146-
exprs(#20047,4,#20045,0,"""foo""")
147-
hasLocation(#20047,#20027)
148-
enclosingStmt(#20047,#20042)
149-
exprContainers(#20047,#20035)
150-
literals("foo","""foo""",#20047)
151-
#20048=*
152-
entry_cfg_node(#20048,#20001)
153-
#20049=@"loc,{#10000},1,1,1,0"
154-
locations_default(#20049,#10000,1,1,1,0)
155-
hasLocation(#20048,#20049)
156-
#20050=*
157-
exit_cfg_node(#20050,#20001)
158-
hasLocation(#20050,#20032)
159-
successor(#20035,#20050)
160-
#20051=*
161-
entry_cfg_node(#20051,#20035)
162-
hasLocation(#20051,#20049)
163-
#20052=*
164-
exit_cfg_node(#20052,#20035)
165-
#20053=@"loc,{#10000},3,2,3,1"
166-
locations_default(#20053,#10000,3,2,3,1)
167-
hasLocation(#20052,#20053)
168-
successor(#20040,#20042)
169-
successor(#20042,#20047)
170-
successor(#20047,#20045)
171-
successor(#20045,#20044)
172-
successor(#20044,#20052)
173-
successor(#20051,#20040)
174-
successor(#20037,#20035)
175-
successor(#20048,#20037)
176-
numlines(#10000,3,3,0)
38+
#20010=@"loc,{#10000},3,1,3,1"
39+
locations_default(#20010,#10000,3,1,3,1)
40+
hasLocation(#20009,#20010)
41+
numlines(#20001,3,0,0)
42+
numlines(#10000,3,0,0)
17743
filetype(#10000,"javascript")

0 commit comments

Comments
 (0)