Search in sources :

Example 56 with Path

use of ast.Ast.Path in project L42 by ElvisResearchGroup.

the class IsValidCompleteCode method isComplete.

boolean isComplete(ClassB cb) {
    boolean[] found = { false };
    cb.accept(new CloneWithPath() {

        @Override
        protected Path liftP(Path p) {
            Locator l = this.getLocator().copy();
            if (p.outerNumber() > l.size()) {
                found[0] = true;
            }
            return super.liftP(p);
        }
    });
    return found[0];
}
Also used : CloneWithPath(coreVisitors.CloneWithPath) Path(ast.Ast.Path) CloneWithPath(coreVisitors.CloneWithPath) Locator(auxiliaryGrammar.Locator)

Aggregations

Path (ast.Ast.Path)56 ClassB (ast.ExpCore.ClassB)28 ArrayList (java.util.ArrayList)23 Ast (ast.Ast)14 PathPath (ast.Util.PathPath)13 Type (ast.Ast.Type)12 MethodWithType (ast.ExpCore.ClassB.MethodWithType)12 Doc (ast.Ast.Doc)11 Member (ast.ExpCore.ClassB.Member)11 List (java.util.List)11 ExpCore (ast.ExpCore)10 NestedClass (ast.ExpCore.ClassB.NestedClass)8 PathSPath (ast.Util.PathSPath)8 CloneWithPath (coreVisitors.CloneWithPath)8 Collections (java.util.Collections)8 HashSet (java.util.HashSet)8 Program (programReduction.Program)8 Map (tools.Map)8 MethodSelector (ast.Ast.MethodSelector)7 SPathSPath (ast.Util.SPathSPath)7