All files / src/abap/types method_implementation.ts

40% Statements 4/10
0% Branches 0/4
0% Functions 0/1
40% Lines 4/10

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  1x 1x 1x   1x                          
import {StructureNode} from "../nodes";
import {Identifier} from "../4_file_information/_identifier";
import * as Structures from "../3_structures/structures";
import * as Expressions from "../2_statements/expressions";
 
export class MethodImplementation extends Identifier {
 
  public constructor(node: StructureNode, filename: string) {
    if (!(node.get() instanceof Structures.Method)) {
      throw new Error("MethodImplementation, expected Method as part of input node");
    }
    const found = node.findFirstExpression(Expressions.MethodName);
    if (found === undefined) {
      throw new Error("MethodImplementation, expected MethodName as part of input node");
    }
    super(found.getFirstToken(), filename);
  }
 
}