@@ -65,6 +65,75 @@ Program {
6565}
6666` ;
6767
68+ exports [` Test variables Check errors chained static lookup foo::bar::baz 1` ] = `
69+ Program {
70+ " children" : [
71+ ExpressionStatement {
72+ " expression" : StaticLookup {
73+ " kind" : " staticlookup" ,
74+ " offset" : Identifier {
75+ " kind" : " identifier" ,
76+ " name" : " baz" ,
77+ },
78+ " what" : StaticLookup {
79+ " kind" : " staticlookup" ,
80+ " offset" : Identifier {
81+ " kind" : " identifier" ,
82+ " name" : " bar" ,
83+ },
84+ " what" : Name {
85+ " kind" : " name" ,
86+ " name" : " foo" ,
87+ " resolution" : " uqn" ,
88+ },
89+ },
90+ },
91+ " kind" : " expressionstatement" ,
92+ },
93+ ],
94+ " errors" : [],
95+ " kind" : " program" ,
96+ }
97+ ` ;
98+
99+ exports [` Test variables Check errors chained static lookup on property lookup 1` ] = `
100+ Program {
101+ " children" : [
102+ ExpressionStatement {
103+ " expression" : StaticLookup {
104+ " kind" : " staticlookup" ,
105+ " offset" : Identifier {
106+ " kind" : " identifier" ,
107+ " name" : " baz" ,
108+ },
109+ " what" : StaticLookup {
110+ " kind" : " staticlookup" ,
111+ " offset" : Identifier {
112+ " kind" : " identifier" ,
113+ " name" : " bar" ,
114+ },
115+ " what" : PropertyLookup {
116+ " kind" : " propertylookup" ,
117+ " offset" : Identifier {
118+ " kind" : " identifier" ,
119+ " name" : " foo" ,
120+ },
121+ " what" : Name {
122+ " kind" : " name" ,
123+ " name" : " this" ,
124+ " resolution" : " uqn" ,
125+ },
126+ },
127+ },
128+ },
129+ " kind" : " expressionstatement" ,
130+ },
131+ ],
132+ " errors" : [],
133+ " kind" : " program" ,
134+ }
135+ ` ;
136+
68137exports [` Test variables Check errors should be ? 1` ] = `
69138Program {
70139 " children" : [
@@ -147,90 +216,6 @@ Program {
147216}
148217` ;
149218
150- exports [` Test variables Check errors should fail foo::bar::baz 1` ] = `
151- Program {
152- " children" : [
153- ExpressionStatement {
154- " expression" : StaticLookup {
155- " kind" : " staticlookup" ,
156- " offset" : Identifier {
157- " kind" : " identifier" ,
158- " name" : " baz" ,
159- },
160- " what" : StaticLookup {
161- " kind" : " staticlookup" ,
162- " offset" : Identifier {
163- " kind" : " identifier" ,
164- " name" : " bar" ,
165- },
166- " what" : Name {
167- " kind" : " name" ,
168- " name" : " foo" ,
169- " resolution" : " uqn" ,
170- },
171- },
172- },
173- " kind" : " expressionstatement" ,
174- },
175- ],
176- " errors" : [
177- Error {
178- " expected" : undefined ,
179- " kind" : " error" ,
180- " line" : 1 ,
181- " message" : " Parse Error : syntax error, unexpected '::' (T_DOUBLE_COLON) on line 1" ,
182- " token" : " '::' (T_DOUBLE_COLON)" ,
183- },
184- ],
185- " kind" : " program" ,
186- }
187- ` ;
188-
189- exports [` Test variables Check errors should fail on double static lookup 1` ] = `
190- Program {
191- " children" : [
192- ExpressionStatement {
193- " expression" : StaticLookup {
194- " kind" : " staticlookup" ,
195- " offset" : Identifier {
196- " kind" : " identifier" ,
197- " name" : " baz" ,
198- },
199- " what" : StaticLookup {
200- " kind" : " staticlookup" ,
201- " offset" : Identifier {
202- " kind" : " identifier" ,
203- " name" : " bar" ,
204- },
205- " what" : PropertyLookup {
206- " kind" : " propertylookup" ,
207- " offset" : Identifier {
208- " kind" : " identifier" ,
209- " name" : " foo" ,
210- },
211- " what" : Name {
212- " kind" : " name" ,
213- " name" : " this" ,
214- " resolution" : " uqn" ,
215- },
216- },
217- },
218- },
219- " kind" : " expressionstatement" ,
220- },
221- ],
222- " errors" : [
223- Error {
224- " expected" : undefined ,
225- " kind" : " error" ,
226- " line" : 1 ,
227- " message" : " Parse Error : syntax error, unexpected '::' (T_DOUBLE_COLON) on line 1" ,
228- " token" : " '::' (T_DOUBLE_COLON)" ,
229- },
230- ],
231- " kind" : " program" ,
232- }
233- ` ;
234219
235220exports [` Test variables Check errors should fail on property lookup on static lookup 1` ] = `
236221Program {
0 commit comments