示例#1
0
 public static WPos getErrorPos(FuncDef e) {
   WPos pos = e.getSource();
   return pos.withRightPos(pos.getLeftPos() + ("function " + e.getName()).length());
 }
示例#2
0
 public static WPos getErrorPos(StructureDef e) {
   WPos pos = e.getSource();
   return pos.withRightPos(pos.getLeftPos() + 5 + e.getName().length());
 }
示例#3
0
 public static WPos getErrorPos(WPackage e) {
   WPos pos = e.getSource();
   return pos.withRightPos(pos.getLeftPos() + ("package " + e.getName()).length());
 }
示例#4
0
 public static WPos getErrorPos(OnDestroyDef e) {
   WPos pos = e.getSource();
   return pos.withRightPos(pos.getLeftPos() + ("ondestroy").length());
 }
示例#5
0
 public static WPos getErrorPos(InitBlock e) {
   WPos pos = e.getSource();
   return pos.withRightPos(pos.getLeftPos() + ("init").length());
 }
示例#6
0
 public static WPos getErrorPos(ConstructorDef e) {
   WPos pos = e.getSource();
   return pos.withRightPos(pos.getLeftPos() + ("construct").length());
 }
示例#7
0
 public static WPos getErrorPos(ClassDef e) {
   WPos pos = e.getSource();
   return pos.withRightPos(pos.getLeftPos() + ("class " + e.getName()).length());
 }
示例#8
0
 public static WPos getErrorPos(ExtensionFuncDef e) {
   WPos pos = e.getSource();
   return pos.withRightPos(
       e.getExtendedType().getSource().getRightPos() + (".function " + e.getName()).length());
 }