mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
added support for C++14/17 number literals
This commit is contained in:
@@ -33,7 +33,7 @@ class CppParser_API CppToken: public Poco::Token
|
||||
public:
|
||||
CppToken();
|
||||
~CppToken();
|
||||
|
||||
|
||||
protected:
|
||||
void syntaxError(const std::string& expected, const std::string& actual);
|
||||
};
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
OP_BITAND_ASSIGN, // &=
|
||||
OP_AND, // &&
|
||||
OP_BITOR, // |
|
||||
OP_BITOR_ASSIGN, // |=
|
||||
OP_BITOR_ASSIGN, // |=
|
||||
OP_OR, // ||
|
||||
OP_XOR, // ^
|
||||
OP_XOR_ASSIGN, // ^=
|
||||
@@ -92,17 +92,17 @@ public:
|
||||
OP_SEMICOLON, // ;
|
||||
OP_QUESTION // ?
|
||||
};
|
||||
|
||||
|
||||
OperatorToken();
|
||||
~OperatorToken();
|
||||
Poco::Token::Class tokenClass() const;
|
||||
bool start(char c, std::istream& istr);
|
||||
void finish(std::istream& istr);
|
||||
int asInteger() const;
|
||||
|
||||
|
||||
private:
|
||||
typedef std::map<std::string, int> OpMap;
|
||||
|
||||
|
||||
OpMap _opMap;
|
||||
};
|
||||
|
||||
@@ -197,17 +197,17 @@ public:
|
||||
KW_XOR,
|
||||
KW_XOR_EQ
|
||||
};
|
||||
|
||||
|
||||
IdentifierToken();
|
||||
~IdentifierToken();
|
||||
Poco::Token::Class tokenClass() const;
|
||||
bool start(char c, std::istream& istr);
|
||||
void finish(std::istream& istr);
|
||||
int asInteger() const;
|
||||
|
||||
|
||||
private:
|
||||
typedef std::map<std::string, int> KWMap;
|
||||
|
||||
|
||||
KWMap _kwMap;
|
||||
};
|
||||
|
||||
@@ -244,9 +244,16 @@ public:
|
||||
Poco::Token::Class tokenClass() const;
|
||||
bool start(char c, std::istream& istr);
|
||||
void finish(std::istream& istr);
|
||||
|
||||
int asInteger() const;
|
||||
double asFloat() const;
|
||||
|
||||
|
||||
protected:
|
||||
void finishHex(std::istream& istr, int next);
|
||||
void finishBin(std::istream& istr, int next);
|
||||
void finishExp(std::istream& istr, int next);
|
||||
void finishSuffix(std::istream& istr, int next);
|
||||
|
||||
private:
|
||||
bool _isFloat;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user