1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.corext.phpdoc;
13 import net.sourceforge.phpdt.core.IBuffer;
14 import net.sourceforge.phpdt.internal.corext.util.Strings;
18 * Reads a java doc comment from a java doc comment. Skips star-character
21 public class PHPDocCommentReader extends SingleCharReader {
23 private IBuffer fBuffer;
26 private int fStartPos;
29 private boolean fWasNewLine;
31 public PHPDocCommentReader(IBuffer buf, int start, int end) {
40 * @see java.io.Reader#read()
43 if (fCurrPos < fEndPos) {
47 ch= fBuffer.getChar(fCurrPos++);
48 } while (fCurrPos < fEndPos && Character.isWhitespace(ch));
50 if (fCurrPos < fEndPos) {
52 ch= fBuffer.getChar(fCurrPos++);
59 ch= fBuffer.getChar(fCurrPos++);
61 fWasNewLine= Strings.isLineDelimiterChar(ch);
69 * @see java.io.Reader#close()
76 * @see java.io.Reader#reset()