コード例 #1
0
 public static int complexityWithoutNestedFunctions(Tree tree) {
   ComplexityVisitor visitor = new ShallowComplexityVisitor(tree);
   tree.accept(visitor);
   return visitor.complexity;
 }
コード例 #2
0
 public static int complexity(Tree tree) {
   ComplexityVisitor visitor = new ComplexityVisitor();
   tree.accept(visitor);
   return visitor.complexity;
 }