public static WPos getErrorPos(FuncDef e) { WPos pos = e.getSource(); return pos.withRightPos(pos.getLeftPos() + ("function " + e.getName()).length()); }
public static WPos getErrorPos(StructureDef e) { WPos pos = e.getSource(); return pos.withRightPos(pos.getLeftPos() + 5 + e.getName().length()); }
public static WPos getErrorPos(WPackage e) { WPos pos = e.getSource(); return pos.withRightPos(pos.getLeftPos() + ("package " + e.getName()).length()); }
public static WPos getErrorPos(OnDestroyDef e) { WPos pos = e.getSource(); return pos.withRightPos(pos.getLeftPos() + ("ondestroy").length()); }
public static WPos getErrorPos(InitBlock e) { WPos pos = e.getSource(); return pos.withRightPos(pos.getLeftPos() + ("init").length()); }
public static WPos getErrorPos(ConstructorDef e) { WPos pos = e.getSource(); return pos.withRightPos(pos.getLeftPos() + ("construct").length()); }
public static WPos getErrorPos(ClassDef e) { WPos pos = e.getSource(); return pos.withRightPos(pos.getLeftPos() + ("class " + e.getName()).length()); }
public static WPos getErrorPos(ExtensionFuncDef e) { WPos pos = e.getSource(); return pos.withRightPos( e.getExtendedType().getSource().getRightPos() + (".function " + e.getName()).length()); }