aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Lexer.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/Lexer.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libs/3rdparty/cplusplus/Lexer.cpp b/src/libs/3rdparty/cplusplus/Lexer.cpp
index 18f68047b8..1c56558773 100644
--- a/src/libs/3rdparty/cplusplus/Lexer.cpp
+++ b/src/libs/3rdparty/cplusplus/Lexer.cpp
@@ -22,8 +22,10 @@
#include "Control.h"
#include "TranslationUnit.h"
#include "Literals.h"
+
+#include "cppassert.h"
+
#include <cctype>
-#include <cassert>
using namespace CPlusPlus;
@@ -210,7 +212,7 @@ void Lexer::scan_helper(Token *tok)
case '\\':
while (_yychar != '\n' && std::isspace(_yychar))
yyinp();
- // ### assert(! _yychar || _yychar == '\n');
+ // ### CPP_CHECK(! _yychar || _yychar == '\n');
if (_yychar == '\n') {
tok->f.joined = true;
tok->f.newline = false;
@@ -278,7 +280,7 @@ void Lexer::scan_helper(Token *tok)
tok->f.kind = T_DOT_STAR;
} else if (_yychar == '.') {
yyinp();
- // ### assert(_yychar);
+ // ### CPP_CHECK(_yychar);
if (_yychar == '.') {
yyinp();
tok->f.kind = T_DOT_DOT_DOT;
@@ -292,7 +294,7 @@ void Lexer::scan_helper(Token *tok)
yyinp();
if (_yychar == '-' || _yychar == '+') {
yyinp();
- // ### assert(std::isdigit(_yychar));
+ // ### CPP_CHECK(std::isdigit(_yychar));
}
} else if (std::isalnum(_yychar) || _yychar == '.') {
yyinp();
@@ -497,7 +499,7 @@ void Lexer::scan_helper(Token *tok)
while (_yychar && _yychar != '>')
yyinp();
int yylen = _currentChar - yytext;
- // ### assert(_yychar == '>');
+ // ### CPP_CHECK(_yychar == '>');
if (_yychar == '>')
yyinp();
if (control())
@@ -709,7 +711,7 @@ void Lexer::scanCharLiteral(Token *tok, unsigned char hint)
void Lexer::scanUntilQuote(Token *tok, unsigned char quote)
{
- assert(quote == '"' || quote == '\'');
+ CPP_CHECK(quote == '"' || quote == '\'');
const char *yytext = _currentChar;
while (_yychar
@@ -740,7 +742,7 @@ void Lexer::scanNumericLiteral(Token *tok)
yyinp();
if (_yychar == '-' || _yychar == '+') {
yyinp();
- // ### assert(std::isdigit(_yychar));
+ // ### CPP_CHECK(std::isdigit(_yychar));
}
} else if (std::isalnum(_yychar) || _yychar == '.') {
yyinp();