summaryrefslogtreecommitdiff
path: root/libjsonpp/jsonFlexLexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libjsonpp/jsonFlexLexer.h')
-rw-r--r--libjsonpp/jsonFlexLexer.h45
1 files changed, 22 insertions, 23 deletions
diff --git a/libjsonpp/jsonFlexLexer.h b/libjsonpp/jsonFlexLexer.h
index bbd6b95..eab59a6 100644
--- a/libjsonpp/jsonFlexLexer.h
+++ b/libjsonpp/jsonFlexLexer.h
@@ -1,47 +1,46 @@
#ifndef JSONFLEXLEXER_H
#define JSONFLEXLEXER_H
-#include <string>
#include <stdexcept>
+#include <string>
#ifndef FLEX_SCANNER
-#define yyFlexLexer jsonBaseFlexLexer
-#include <FlexLexer.h>
+# define yyFlexLexer jsonBaseFlexLexer
+# include <FlexLexer.h>
#endif
namespace json {
#pragma GCC visibility push(default)
class ParseError : public std::invalid_argument {
- public:
- ParseError(const char *, int, int);
+ public:
+ ParseError(const char *, int, int);
};
class jsonFlexLexer : public yyFlexLexer {
- public:
- jsonFlexLexer(std::istream &, std::string enc);
+ public:
+ jsonFlexLexer(std::istream &, std::string enc);
- int yylex() override;
+ int yylex() override;
- private:
- virtual void BeginObject() = 0;
- virtual void BeginArray() = 0;
+ private:
+ virtual void BeginObject() = 0;
+ virtual void BeginArray() = 0;
- virtual void PushBoolean(bool) = 0;
- virtual void PushNumber(double) = 0;
- virtual void PushNull() = 0;
- virtual void PushText(std::string &&) = 0;
- virtual void PushKey(std::string &&) = 0;
+ virtual void PushBoolean(bool) = 0;
+ virtual void PushNumber(double) = 0;
+ virtual void PushNull() = 0;
+ virtual void PushText(std::string &&) = 0;
+ virtual void PushKey(std::string &&) = 0;
- virtual void EndArray() = 0;
- virtual void EndObject() = 0;
+ virtual void EndArray() = 0;
+ virtual void EndObject() = 0;
- void LexerError(const char * msg) override;
- std::string encodeBuf() const;
+ void LexerError(const char * msg) override;
+ std::string encodeBuf() const;
- std::string buf;
- const std::string encoding;
+ std::string buf;
+ const std::string encoding;
};
#pragma GCC visibility pop
}
#endif
-