use of ast.Ast.Doc in project L42 by ElvisResearchGroup.
the class PathAnnotateClass method visit.
public ExpCore visit(ClassB cb) {
//computeComment(this.getAstNodesPath(),this.getAstIndexesPath());
String comment = this.getLocator().toStringNoAnnotation();
Doc doc = Doc.factory(true, comment).sum(cb.getDoc1());
return super.visit(cb.withDoc1(doc));
}
use of ast.Ast.Doc in project L42 by ElvisResearchGroup.
the class PathAnnotateClass method visit.
public ClassB.MethodImplemented visit(ClassB.MethodImplemented mi) {
//computeComment(this.getAstNodesPath(),this.getAstIndexesPath());
String comment = this.getLocator().toStringNoAnnotation();
//comment+=mi.getS();
Doc doc = Doc.factory(true, comment).sum(mi.getDoc());
return super.visit(mi.withDoc(doc));
}
use of ast.Ast.Doc in project L42 by ElvisResearchGroup.
the class PathAnnotateClass method visit.
public ClassB.MethodWithType visit(ClassB.MethodWithType mt) {
//computeComment(this.getAstNodesPath(),this.getAstIndexesPath());
String comment = this.getLocator().toStringNoAnnotation();
//comment+=mt.getMs();
Doc doc = Doc.factory(true, comment).sum(mt.getDoc());
return super.visit(mt.withDoc(doc));
}
use of ast.Ast.Doc in project L42 by ElvisResearchGroup.
the class PathAnnotateClass method visit.
public ClassB.NestedClass visit(ClassB.NestedClass nc) {
//computeComment(this.getAstNodesPath(),this.getAstIndexesPath());
String comment = this.getLocator().toStringNoAnnotation();
//comment+=nc.getName();
Doc doc = Doc.factory(true, comment).sum(nc.getDoc());
return super.visit(nc.withDoc(doc));
}
use of ast.Ast.Doc in project L42 by ElvisResearchGroup.
the class InjectionOnSugar method visit.
@Override
public Expression visit(MCall s) {
ast.Expression receiver = lift(s.getInner());
String name = s.getS().nameToS();
Doc docs = s.getDoc();
List<String> xs = s.getS().getNames();
List<ast.ExpCore> es1 = s.getEs();
List<ast.Expression> es = new ArrayList<ast.Expression>();
for (ast.ExpCore e : es1) {
es.add(lift(e));
}
ast.Ast.Parameters ps = new ast.Ast.Parameters(Optional.<ast.Expression>empty(), xs, es);
Position pos = s.getP();
return new Expression.MCall(receiver, name, docs, ps, pos);
}
Aggregations