Revert r1306321 - committed wrong file

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306324 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-03-28 13:44:38 +00:00
parent 0fee01aa2d
commit 05b5c8ef48
1 changed files with 6 additions and 9 deletions

View File

@ -49,13 +49,6 @@ class CSVLexer extends Lexer {
* is to call 'readAgain' on the stream...
*/
int c = in.read();
if ((lastChar == '\n' || lastChar == '\r' || lastChar == ExtendedBufferedReader.UNDEFINED) && isCommentStart(c)) {
in.readLine();
tkn.type = COMMENT;
return tkn;
}
boolean eol = isEndOfLine(c);
c = in.readAgain();
@ -93,8 +86,12 @@ class CSVLexer extends Lexer {
}
}
// ok, start of token reached: encapsulated, or token
if (isDelimiter(c)) {
// ok, start of token reached: comment, encapsulated, or token
if (isCommentStart(c)) { // TODO should only match at start of line
// ignore everything till end of line and continue (incr linecount)
in.readLine();
tkn.type = COMMENT;
} else if (isDelimiter(c)) {
// empty token return TOKEN("")
tkn.type = TOKEN;
} else if (eol) {