Libksieve
15 #include <ksieve/error.h> 16 #include <ksieve/lexer.h> 25 Impl(
const char *scursor,
const char *send,
int options);
27 bool ignoreComments()
const 29 return mIgnoreComments;
32 bool ignoreLineFeeds()
const 44 return mState.cursor >= mEnd;
49 return mState.cursor - mState.beginOfLine;
59 mStateStack.push(mState);
64 mState = mStateStack.pop();
67 Lexer::Token nextToken(
QString &tokenValue);
76 bool parseHashComment(
QString &result,
bool reallySave =
false);
79 bool parseBracketComment(
QString &result,
bool reallySave =
false);
82 bool parseComment(
QString &result,
bool reallySave =
false);
91 bool parseIdentifier(
QString &result);
97 bool parseNumber(
QString &result);
100 bool parseMultiLine(
QString &result);
103 bool parseQuotedString(
QString &result);
106 State(
const char *s =
nullptr)
115 const char *beginOfLine;
119 const char *
const mEnd;
120 const bool mIgnoreComments : 1;
121 const bool mIgnoreLF : 1;
124 const char *beginOfLine()
const 126 return mState.beginOfLine;
129 int _strnicmp(
const char *left,
const char *right,
size_t len)
const 131 return charsLeft() >= len ? qstrnicmp(left, right, len) : 1;
136 mState.error =
Error();
139 unsigned int charsLeft()
const 141 return mEnd - mState.cursor < 0 ? 0 : mEnd - mState.cursor;
144 void makeError(Error::Type e)
146 makeError(e, line(), column());
149 void makeError(Error::Type e,
int errorLine,
int errorCol)
151 mState.error =
Error(e, errorLine, errorCol);
154 void makeIllegalCharError(
char ch);
155 void makeIllegalCharError()
157 makeIllegalCharError(*mState.cursor);
166 mState.beginOfLine = ++mState.cursor;
169 bool skipTo(
char c,
bool acceptEnd =
false)
172 if (*mState.cursor ==
'\n' || *mState.cursor ==
'\r') {
176 }
else if (*mState.cursor == c) {
185 bool skipToCRLF(
bool acceptEnd =
true)
187 for (; !atEnd(); ++mState.cursor) {
188 if (*mState.cursor ==
'\n' || *mState.cursor ==
'\r') {
197 while (!atEnd() && (
signed char)*mState.cursor < 0) {
void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
const QList< QKeySequence > & save()
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:33 by
doxygen 1.8.11 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.