예제 #1
0
 public static boolean isDifferentStartEndPos(Stmt s) {
   List<Tag> tags = s.getTags();
   for (Tag tag : tags) {
     if (tag instanceof SourceLnNamePosTag) {
       SourceLnNamePosTag lineTag = (SourceLnNamePosTag) tag;
       if (lineTag.startLn() != lineTag.endLn()) return true;
       else return false;
     }
   }
   return false;
 }
예제 #2
0
 public static int getStatementLineNumber(Stmt s) {
   List<Tag> tags = s.getTags();
   int line = -1;
   for (Tag tag : tags) {
     if (tag instanceof SourceLnNamePosTag) {
       SourceLnNamePosTag lineTag = (SourceLnNamePosTag) tag;
       line = lineTag.startLn();
     } else if (tag instanceof LineNumberTag) {
       LineNumberTag lineTag = (LineNumberTag) tag;
       line = lineTag.getLineNumber();
     }
   }
   return line;
 }