public static int complexityWithoutNestedFunctions(Tree tree) { ComplexityVisitor visitor = new ShallowComplexityVisitor(tree); tree.accept(visitor); return visitor.complexity; }
public static int complexity(Tree tree) { ComplexityVisitor visitor = new ComplexityVisitor(); tree.accept(visitor); return visitor.complexity; }