File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
server/src/languages/func/psi Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,20 @@ export class Reference {
329329 }
330330 }
331331 }
332+ if ( firstChild ?. type === "tensor_expression" ) {
333+ // (int foo, cell bar) = (42, someCall())
334+ for ( let childDeclaration of firstChild . descendantsOfType ( "local_vars_declaration" ) ) {
335+ if ( ! childDeclaration ) {
336+ continue ;
337+ }
338+ const lhs = childDeclaration . childForFieldName ( "lhs" )
339+ if ( lhs ) {
340+ if ( ! this . processVariableDeclaration ( lhs , proc , file , state ) ) {
341+ return false
342+ }
343+ }
344+ }
345+ }
332346
333347 if ( firstChild ?. type === "typed_tuple" ) {
334348 // [_, int a, int b] = [1, 2];
@@ -355,7 +369,7 @@ export class Reference {
355369 if ( ! proc . execute ( new VarDeclaration ( lhs , file ) , state ) ) return false
356370 }
357371
358- if ( lhs . type === "tuple_vars_declaration" || lhs . type === "tensor_vars_declaration" ) {
372+ if ( lhs . type === "tuple_vars_declaration" || lhs . type === "tensor_vars_declaration" || lhs . type === "nested_tensor_declaration" ) {
359373 const vars = lhs . childrenForFieldName ( "vars" )
360374 for ( const variable of vars ) {
361375 if ( ! variable ) continue
You can’t perform that action at this time.
0 commit comments