@@ -37,6 +37,157 @@ Program {
3737}
3838` ;
3939
40+ exports [` new #1177 - explicit parens equivalent 1` ] = `
41+ Program {
42+ " children" : [
43+ ExpressionStatement {
44+ " expression" : New {
45+ " arguments" : [],
46+ " kind" : " new" ,
47+ " what" : PropertyLookup {
48+ " kind" : " propertylookup" ,
49+ " offset" : Identifier {
50+ " kind" : " identifier" ,
51+ " name" : " baz" ,
52+ },
53+ " what" : StaticLookup {
54+ " kind" : " staticlookup" ,
55+ " offset" : Variable {
56+ " curly" : false ,
57+ " kind" : " variable" ,
58+ " name" : " bar" ,
59+ },
60+ " what" : Name {
61+ " kind" : " name" ,
62+ " name" : " Foo" ,
63+ " resolution" : " uqn" ,
64+ },
65+ },
66+ },
67+ },
68+ " kind" : " expressionstatement" ,
69+ },
70+ ],
71+ " errors" : [],
72+ " kind" : " program" ,
73+ }
74+ ` ;
75+
76+ exports [` new #1177 - longer chain 1` ] = `
77+ Program {
78+ " children" : [
79+ ExpressionStatement {
80+ " expression" : New {
81+ " arguments" : [],
82+ " kind" : " new" ,
83+ " what" : PropertyLookup {
84+ " kind" : " propertylookup" ,
85+ " offset" : Identifier {
86+ " kind" : " identifier" ,
87+ " name" : " qux" ,
88+ },
89+ " what" : PropertyLookup {
90+ " kind" : " propertylookup" ,
91+ " offset" : Identifier {
92+ " kind" : " identifier" ,
93+ " name" : " baz" ,
94+ },
95+ " what" : StaticLookup {
96+ " kind" : " staticlookup" ,
97+ " offset" : Variable {
98+ " curly" : false ,
99+ " kind" : " variable" ,
100+ " name" : " bar" ,
101+ },
102+ " what" : Name {
103+ " kind" : " name" ,
104+ " name" : " Foo" ,
105+ " resolution" : " uqn" ,
106+ },
107+ },
108+ },
109+ },
110+ },
111+ " kind" : " expressionstatement" ,
112+ },
113+ ],
114+ " errors" : [],
115+ " kind" : " program" ,
116+ }
117+ ` ;
118+
119+ exports [` new #1177 - nullsafe operator in chain 1` ] = `
120+ Program {
121+ " children" : [
122+ ExpressionStatement {
123+ " expression" : New {
124+ " arguments" : [],
125+ " kind" : " new" ,
126+ " what" : NullSafePropertyLookup {
127+ " kind" : " nullsafepropertylookup" ,
128+ " offset" : Identifier {
129+ " kind" : " identifier" ,
130+ " name" : " baz" ,
131+ },
132+ " what" : StaticLookup {
133+ " kind" : " staticlookup" ,
134+ " offset" : Variable {
135+ " curly" : false ,
136+ " kind" : " variable" ,
137+ " name" : " bar" ,
138+ },
139+ " what" : Name {
140+ " kind" : " name" ,
141+ " name" : " Foo" ,
142+ " resolution" : " uqn" ,
143+ },
144+ },
145+ },
146+ },
147+ " kind" : " expressionstatement" ,
148+ },
149+ ],
150+ " errors" : [],
151+ " kind" : " program" ,
152+ }
153+ ` ;
154+
155+ exports [` new #1177 - static property chain as class name 1` ] = `
156+ Program {
157+ " children" : [
158+ ExpressionStatement {
159+ " expression" : New {
160+ " arguments" : [],
161+ " kind" : " new" ,
162+ " what" : PropertyLookup {
163+ " kind" : " propertylookup" ,
164+ " offset" : Identifier {
165+ " kind" : " identifier" ,
166+ " name" : " baz" ,
167+ },
168+ " what" : StaticLookup {
169+ " kind" : " staticlookup" ,
170+ " offset" : Variable {
171+ " curly" : false ,
172+ " kind" : " variable" ,
173+ " name" : " bar" ,
174+ },
175+ " what" : Name {
176+ " kind" : " name" ,
177+ " name" : " Foo" ,
178+ " resolution" : " uqn" ,
179+ },
180+ },
181+ },
182+ },
183+ " kind" : " expressionstatement" ,
184+ },
185+ ],
186+ " errors" : [],
187+ " kind" : " program" ,
188+ }
189+ ` ;
190+
40191exports [` new anonymous 1` ] = `
41192Program {
42193 " children" : [
0 commit comments