Move Tokenizer/Token into ExpressionParser's namespace.

This commit is contained in:
Rene Gollent 2012-12-18 21:31:43 -05:00
parent 03289a339c
commit 55751d083a
2 changed files with 8 additions and 6 deletions

View File

@ -14,8 +14,6 @@
#include <String.h> #include <String.h>
class Tokenizer;
class ParseException { class ParseException {
public: public:
ParseException(const char* message, int32 position) ParseException(const char* message, int32 position)
@ -35,10 +33,10 @@ class ParseException {
}; };
struct Function; struct Function;
struct Token;
class MAPM; class MAPM;
class ExpressionParser { class ExpressionParser {
public: public:
ExpressionParser(); ExpressionParser();
~ExpressionParser(); ~ExpressionParser();
@ -52,6 +50,10 @@ class ExpressionParser {
int64 EvaluateToInt64(const char* expressionString); int64 EvaluateToInt64(const char* expressionString);
double EvaluateToDouble(const char* expressionString); double EvaluateToDouble(const char* expressionString);
private:
struct Token;
class Tokenizer;
private: private:
MAPM _ParseBinary(); MAPM _ParseBinary();
MAPM _ParseSum(); MAPM _ParseSum();

View File

@ -47,7 +47,7 @@ enum {
TOKEN_END_OF_LINE TOKEN_END_OF_LINE
}; };
struct Token { struct ExpressionParser::Token {
Token() Token()
: string(""), : string(""),
type(TOKEN_NONE), type(TOKEN_NONE),
@ -89,7 +89,7 @@ struct Token {
}; };
class Tokenizer { class ExpressionParser::Tokenizer {
public: public:
Tokenizer() Tokenizer()
: fString(""), : fString(""),