Commit ef1eaa04 by alokp@chromium.org

Changed Token::Location::string to Token::Location::file to keep it consistent…

Changed Token::Location::string to Token::Location::file to keep it consistent with __FILE__ inbult macro. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1055 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent aaf75696
...@@ -128,7 +128,7 @@ static int lex(InputSrc* in, yystypepp* yylvalpp) ...@@ -128,7 +128,7 @@ static int lex(InputSrc* in, yystypepp* yylvalpp)
break; break;
} }
SetLineNumber(token.location.line); SetLineNumber(token.location.line);
SetStringNumber(token.location.string); SetStringNumber(token.location.file);
return ret; return ret;
} }
......
...@@ -57,14 +57,14 @@ struct Token ...@@ -57,14 +57,14 @@ struct Token
}; };
struct Location struct Location
{ {
Location() : line(0), string(0) { } Location() : file(0), line(0) { }
bool equals(const Location& other) const bool equals(const Location& other) const
{ {
return (line == other.line) && (string == other.string); return (file == other.file) && (line == other.line);
} }
int file;
int line; int line;
int string;
}; };
Token() : type(0), flags(0) { } Token() : type(0), flags(0) { }
......
...@@ -32,8 +32,8 @@ typedef pp::Token::Location YYLTYPE; ...@@ -32,8 +32,8 @@ typedef pp::Token::Location YYLTYPE;
#define YY_USER_ACTION \ #define YY_USER_ACTION \
do { \ do { \
yylloc->file = 0; \
yylloc->line = yylineno; \ yylloc->line = yylineno; \
yylloc->string = 0; \
} while(0); } while(0);
// Suppress the default implementation of YY_INPUT which generated // Suppress the default implementation of YY_INPUT which generated
......
...@@ -532,8 +532,8 @@ typedef pp::Token::Location YYLTYPE; ...@@ -532,8 +532,8 @@ typedef pp::Token::Location YYLTYPE;
#define YY_USER_ACTION \ #define YY_USER_ACTION \
do { \ do { \
yylloc->file = 0; \
yylloc->line = yylineno; \ yylloc->line = yylineno; \
yylloc->string = 0; \
} while(0); } while(0);
// Suppress the default implementation of YY_INPUT which generated // Suppress the default implementation of YY_INPUT which generated
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment