File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
lkql_jit/language/src/main/java/com/adacore/lkql_jit/langkit_translator/passes Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -325,24 +325,14 @@ public Void visit(Liblkqllang.NamedFunction namedFunction) {
325325 */
326326 @ Override
327327 public Void visit (Liblkqllang .ListComprehension listComprehension ) {
328- // Get the list comprehension generator list
329- final Liblkqllang .ListCompAssocList generators = listComprehension .fGenerators ();
330- final int generatorsCount = generators .getChildrenCount ();
331-
332328 // Visit all generator expressions
333- for (int i = 0 ; i < generatorsCount ; i ++) {
334- final Liblkqllang .ListCompAssoc assoc = (Liblkqllang .ListCompAssoc ) generators .getChild (
335- i
336- );
329+ for (var assoc : listComprehension .fGenerators ()) {
337330 assoc .fCollExpr ().accept (this );
338331 }
339332
340333 // Open the frame and visit the list comprehension expressions
341334 this .scriptFramesBuilder .openFrame (listComprehension );
342- for (int i = 0 ; i < generatorsCount ; i ++) {
343- final Liblkqllang .ListCompAssoc assoc = (Liblkqllang .ListCompAssoc ) generators .getChild (
344- i
345- );
335+ for (var assoc : listComprehension .fGenerators ()) {
346336 final String symbol = assoc .fBindingName ().getText ();
347337 checkDuplicateParameters (symbol , assoc .fBindingName ());
348338 this .scriptFramesBuilder .addParameter (symbol );
You can’t perform that action at this time.
0 commit comments