示例#1
0
 /**
  * Returns the File currently being lexed.
  *
  * <p>If this Source is not a {@link FileLexerSource}, then it will ask the parent Source, and so
  * forth recursively. If no Source on the stack is a FileLexerSource, returns null.
  */
 protected String getPath() {
   Source parent = getParent();
   while (parent != null) {
     String path = parent.getPath();
     if (path != null) return path;
     parent = parent.getParent();
   }
   return null;
 }