summaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-04-04 14:41:04 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-04-04 14:41:04 -0400
commita5b034d4a9c44f9bc1e83b01de82530f8fc63013 (patch)
tree7a358206c4aff9c33df1752c92eafec97cee2244 /SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.h
parent306d6d3ca9c9ad774d19135681a7f9805f77035f (diff)
Imported Upstream version 3.0.4upstream/3.0.4
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.h')
-rw-r--r--SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.h b/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.h
index d52c021..64ce3a3 100644
--- a/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.h
+++ b/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.h
@@ -187,6 +187,9 @@ class ParserContext
*/
const QList<ParserError*>& getErrors();
+ QVariant* handleNumberToken(const QString& tokenValue);
+ bool isCandidateForMaxNegativeNumber() const;
+
/**
* @brief Flag indicating if the Lemon parser should setup token collections.
*
@@ -284,6 +287,18 @@ class ParserContext
* Defined by errorBeforeNextToken() and minorErrorBeforeNextToken().
*/
QString nextTokenError;
+
+ /**
+ * @brief Indicates that the number value is 1 over the max longlong value.
+ *
+ * Then the positive number is over max longlong by 1, then this is a candidate
+ * for max negative longlong value, but this is to be identified in the next parser reduce level.
+ *
+ * Because of that this flag is set to false by default each time the number is parsed and is set afterwards
+ * to true each timethe value is 1 over max longlong. This way if the 'term' rule includes 'minus' token,
+ * then it will be properly converted to max negative longlong.
+ */
+ bool recentNumberIsCandidateForMaxNegative = false;
};
#endif // PARSERCONTEXT_H