import java.io.IOException;
+import net.sourceforge.phpdt.internal.corext.phpdoc.SingleCharReader;
+
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
-import net.sourceforge.phpdt.internal.corext.phpdoc.SingleCharReader;
-
/**
* Reads from a document either forwards or backwards. May be configured to
* skip comments and strings.
char current= fDocument.getChar(fOffset++);
switch (current) {
+ case '#':
+
+ if (fSkipComments && fOffset < fEnd) {
+ gotoLineEnd();
+ continue;
+ }
+
+ return current;
+
case '/':
if (fSkipComments && fOffset < fEnd) {
fOffset= offset;
return;
}
+ if (current == '#' && fCachedLineOffset <= offset) {
+ fOffset= offset;
+ return;
+ }
}
}
}