diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/preprocessor/Token.h')
-rw-r--r-- | src/3rdparty/angle/src/compiler/preprocessor/Token.h | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/3rdparty/angle/src/compiler/preprocessor/Token.h b/src/3rdparty/angle/src/compiler/preprocessor/Token.h index 347c47e307..26732ab64d 100644 --- a/src/3rdparty/angle/src/compiler/preprocessor/Token.h +++ b/src/3rdparty/angle/src/compiler/preprocessor/Token.h @@ -10,7 +10,7 @@ #include <ostream> #include <string> -#include "SourceLocation.h" +#include "compiler/preprocessor/SourceLocation.h" namespace pp { @@ -19,7 +19,9 @@ struct Token { enum Type { - LAST = 0, // EOF. + // Calling this ERROR causes a conflict with wingdi.h + GOT_ERROR = -1, + LAST = 0, // EOF. IDENTIFIER = 258, @@ -62,33 +64,20 @@ struct Token EXPANSION_DISABLED = 1 << 2 }; - Token() - : type(0), - flags(0) - { - } + Token() : type(0), flags(0) {} void reset(); bool equals(const Token &other) const; // Returns true if this is the first token on line. // It disregards any leading whitespace. - bool atStartOfLine() const - { - return (flags & AT_START_OF_LINE) != 0; - } + bool atStartOfLine() const { return (flags & AT_START_OF_LINE) != 0; } void setAtStartOfLine(bool start); - bool hasLeadingSpace() const - { - return (flags & HAS_LEADING_SPACE) != 0; - } + bool hasLeadingSpace() const { return (flags & HAS_LEADING_SPACE) != 0; } void setHasLeadingSpace(bool space); - bool expansionDisabled() const - { - return (flags & EXPANSION_DISABLED) != 0; - } + bool expansionDisabled() const { return (flags & EXPANSION_DISABLED) != 0; } void setExpansionDisabled(bool disable); // Converts text into numeric value for CONST_INT and CONST_FLOAT token. @@ -113,7 +102,7 @@ inline bool operator!=(const Token &lhs, const Token &rhs) return !lhs.equals(rhs); } -extern std::ostream &operator<<(std::ostream &out, const Token &token); +std::ostream &operator<<(std::ostream &out, const Token &token); } // namepsace pp |