Extract check for metaChar
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479706 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
883511fa42
commit
4f61bd1aee
|
@ -108,7 +108,7 @@ abstract class Lexer {
|
|||
throw new IOException("EOF whilst processing escape sequence");
|
||||
default:
|
||||
// Now check for meta-characters
|
||||
if (isDelimiter(c) || isEscape(c) || isQuoteChar(c) || isCommentStart(c)) {
|
||||
if (isMetaChar(c)) {
|
||||
return c;
|
||||
}
|
||||
// indicate unexpected char - available from in.getLastChar()
|
||||
|
@ -181,4 +181,12 @@ abstract class Lexer {
|
|||
boolean isCommentStart(final int c) {
|
||||
return c == commmentStart;
|
||||
}
|
||||
|
||||
private boolean isMetaChar(final int c) {
|
||||
return c == delimiter
|
||||
|| c == escape
|
||||
|| c == quoteChar
|
||||
|| c == commmentStart
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue