use of ast.Ast.MethodSelector in project L42 by ElvisResearchGroup.
the class Plugin method MsumMethods£xthat£xpath£xsrc1£xsrc2£xdest£xname.
@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MsumMethods£xthat£xpath£xsrc1£xsrc2£xdest£xname(Object _that, Object _path, Object _src1, Object _src2, Object _dest, Object _name) {
ClassB that = ensureExtractClassB(_that);
String name = ensureExtractStringU(_name);
List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
MethodSelector src1 = MethodSelector.parse(ensureExtractStringU(_src1));
MethodSelector src2 = MethodSelector.parse(ensureExtractStringU(_src2));
MethodSelector dest = MethodSelector.parse(ensureExtractStringU(_dest));
return SumMethods.sumMethods(that, path, src1, src2, dest, name);
}
use of ast.Ast.MethodSelector in project L42 by ElvisResearchGroup.
the class Plugin method MaddDocumentation£xthat£xpath£xselector£xdoc.
@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MaddDocumentation£xthat£xpath£xselector£xdoc(Object _that, Object _path, Object _sel, Object _doc) {
ClassB that = ensureExtractClassB(_that);
List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
MethodSelector sel = MethodSelector.parse(ensureExtractStringU(_sel));
Doc doc = ensureExtractDoc(_doc);
return AddDocumentation.addDocumentationOnMethod(Resources.getP(), that, path, sel, doc);
}
use of ast.Ast.MethodSelector in project L42 by ElvisResearchGroup.
the class MakeKs method prototypeK.
//can not reuse the desugar one, here we create ExpCore stuff, also , the sugar one may disappear
private static MethodWithType prototypeK(Doc doc, List<String> fieldNames, List<Type> fieldTypes, Position pos) {
MethodSelector ms = MethodSelector.of("", fieldNames);
Type resT = Type.mutThis0;
MethodType mt = new MethodType(false, ast.Ast.Mdf.Class, fieldTypes, resT, Collections.emptyList());
return new MethodWithType(doc, ms, mt, Optional.empty(), pos);
}
use of ast.Ast.MethodSelector in project L42 by ElvisResearchGroup.
the class Plugin method MliftValue£xthat£xselector£xlib.
@ActionType({ ActionType.NormType.Library, ActionType.NormType.ImmAny, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MliftValue£xthat£xselector£xlib(Object _that, Object _selector, Object _lib) {
ClassB lib = ensureExtractClassB(_lib);
MethodSelector selector = MethodSelector.parse(ensureExtractStringU(_selector));
//TODO: would go in loop for circular graphs?
ExpCore val = Revertable.doRevert(_that);
val = From.from(val, Path.outer(1));
return LiftValue.liftValue(val, selector, lib);
}
use of ast.Ast.MethodSelector in project L42 by ElvisResearchGroup.
the class Plugin method MhideMethod£xthat£xpath£xsrc.
//--------------------------
@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MhideMethod£xthat£xpath£xsrc(Object _that, Object _path, Object _src) {
ClassB that = ensureExtractClassB(_that);
List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
MethodSelector src = MethodSelector.parse(ensureExtractStringU(_src));
MethodSelector dest = src.withUniqueNum(L42.freshPrivate());
return Rename.renameMethod(Resources.getP(), that, path, src, dest);
}
Aggregations