We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 528617f commit 43285d1Copy full SHA for 43285d1
1 file changed
src/lexer.h
@@ -73,6 +73,7 @@ namespace JsonParser {
73
}
74
str = str.substr(0, str.find_last_not_of(" \f\t\v\r\n") + 1);
75
if (!std::regex_match(str, std::regex("-?(0|[1-9]\\d*)(\\.\\d+)?(e[-+](0|[1-9]\\d*)(\\.\\d+)?)?"))) {
76
+ std::cout << str << std::endl;
77
throw std::runtime_error("At LexicalAnalyzer(): \"str\" is not a number.");
78
79
chs.push_back(str);
@@ -90,6 +91,7 @@ namespace JsonParser {
90
91
92
93
if (str != "true" && str != "false" && str != "null") {
94
95
throw std::runtime_error("At LexicalAnalyzer(): \"str\" is neither true, false nor null.");
96
97
0 commit comments