use of ast.Ast.MethodSelectorX in project L42 by ElvisResearchGroup.
the class GuessTypeCore method visit.
@Override
public Type visit(MCall s) {
Type former = s.getInner().accept(this);
if (former == null) {
return null;
}
Path path = former.getPath();
assert path != null;
List<MethodSelectorX> msl = new ArrayList<>();
MethodSelectorX msx = new MethodSelectorX(s.getS(), "");
msl.add(msx);
MethodWithType meth = (MethodWithType) p.extractClassB(path)._getMember(s.getS());
if (meth == null) {
return null;
}
return (Type) From.fromT(meth.getMt().getReturnType(), path);
}
use of ast.Ast.MethodSelectorX in project L42 by ElvisResearchGroup.
the class ToAst method parseType.
private Type parseType(TContext t) {
if (t.concreteT() != null) {
ConcreteTContext tt = t.concreteT();
Doc d = parseDoc(tt.docsOpt());
Ast.Type nt = new Ast.Type(Mdf.fromString((tt.Mdf() == null) ? "" : nameK(tt.Mdf())), Ast.Path.sugarParse(nameU(tt.Path())), d);
if (tt.Ph() == null) {
return nt;
}
return Functions.toPh(nt);
}
if (t.historicalT() != null) {
HistoricalTContext tt = t.historicalT();
Doc d = parseDoc(tt.docsOpt());
Path p = ast.Ast.Path.sugarParse(nameU(tt.Path()));
List<MethodSelectorX> mss = new ArrayList<MethodSelectorX>();
for (HistoricalSeqContext ms : tt.historicalSeq()) {
mss.add(parseMethSelectorX(ms));
}
//return new ast.Ast.HistoricType(p,mss,d);
throw Assertions.codeNotReachable();
}
throw Assertions.codeNotReachable();
}
Aggregations