All files / src/abap/5_syntax/expressions loop_group_by.ts

95.34% Statements 41/43
83.33% Branches 5/6
100% Functions 1/1
95.34% Lines 41/43

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 431x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 19x 19x 11x 11x 11x 11x     11x 19x 7x 7x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 19x 16x 14x 14x 16x 19x 19x 1x
import * as Expressions from "../../2_statements/expressions";
import {ExpressionNode} from "../../nodes";
import {VoidType} from "../../types/basic";
import {CurrentScope} from "../_current_scope";
import {ComponentCompare} from "./component_compare";
import {InlineData} from "./inline_data";
import {FSTarget} from "./fstarget";
import {Target} from "./target";
 
export class LoopGroupBy {
  public runSyntax(node: ExpressionNode, scope: CurrentScope, filename: string): void {
 
    for (const t of node.findAllExpressions(Expressions.Target)) {
      const inline = t.findDirectExpression(Expressions.InlineData);
      if (inline) {
        new InlineData().runSyntax(inline, scope, filename, new VoidType("todoGroupBy"));
      } else {
        new Target().runSyntax(t, scope, filename);
      }
    }
    for (const t of node.findAllExpressions(Expressions.FSTarget)) {
      new FSTarget().runSyntax(t, scope, filename, new VoidType("todoGroupBy"));
    }
 
    /*
    const components: IStructureComponent[] = [];
    for (const c of node.findDirectExpressions(Expressions.LoopGroupByComponent)) {
      components.push({name: c.getFirstToken().getStr(), type: new VoidType("todoGroupBy")});
    }
    if (components.length === 0) {
      return;
    }
    */
//    const sourceType = new StructureType(components);
 
    for (const c of node.findDirectExpressions(Expressions.LoopGroupByComponent)) {
      for (const t of c.findDirectExpressions(Expressions.ComponentCompareSingle)) {
        new ComponentCompare().runSyntax(t, scope, filename);
      }
    }
 
  }
}