Search in sources :

Example 6 with Locator

use of auxiliaryGrammar.Locator in project L42 by ElvisResearchGroup.

the class CollectedLocatorsMap method from.

public static CollectedLocatorsMap from(Path src, Member m, MethodSelector ms2) {
    Locator result = new Locator();
    result.addCsAndMember(src.getCBar(), m);
    result.setAnnotation(ms2);
    CollectedLocatorsMap maps = new CollectedLocatorsMap();
    maps.selectors.add(result);
    return maps;
}
Also used : Locator(auxiliaryGrammar.Locator)

Example 7 with Locator

use of auxiliaryGrammar.Locator in project L42 by ElvisResearchGroup.

the class CollectedLocatorsMap method pathPathToLocator.

private static Locator pathPathToLocator(Path src, Path dest) {
    Locator result = new Locator();
    result.addCs(src.getCBar());
    assert src.outerNumber() == 0;
    result.setAnnotation(dest);
    return result;
}
Also used : Locator(auxiliaryGrammar.Locator)

Example 8 with Locator

use of auxiliaryGrammar.Locator in project L42 by ElvisResearchGroup.

the class CollectedLocatorsMap method from.

public static CollectedLocatorsMap from(List<PathPath> pp) {
    CollectedLocatorsMap maps = new CollectedLocatorsMap();
    for (PathPath ppi : pp) {
        Locator nl = pathPathToLocator(ppi.getPath1(), ppi.getPath2());
        maps.nesteds.add(nl);
    }
    return maps;
}
Also used : Locator(auxiliaryGrammar.Locator)

Example 9 with Locator

use of auxiliaryGrammar.Locator 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

Locator (auxiliaryGrammar.Locator)9 Path (ast.Ast.Path)3 MethodSelector (ast.Ast.MethodSelector)2 ClassB (ast.ExpCore.ClassB)1 PathPath (ast.Util.PathPath)1 CloneWithPath (coreVisitors.CloneWithPath)1 ArrayList (java.util.ArrayList)1 Program (programReduction.Program)1