summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/preprocessor/Token.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/preprocessor/Token.h')
-rw-r--r--src/3rdparty/angle/src/compiler/preprocessor/Token.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/3rdparty/angle/src/compiler/preprocessor/Token.h b/src/3rdparty/angle/src/compiler/preprocessor/Token.h
index 8b553aecb6..8832e279c7 100644
--- a/src/3rdparty/angle/src/compiler/preprocessor/Token.h
+++ b/src/3rdparty/angle/src/compiler/preprocessor/Token.h
@@ -62,27 +62,40 @@ struct Token
EXPANSION_DISABLED = 1 << 2
};
- Token() : type(0), flags(0) { }
+ Token()
+ : type(0),
+ flags(0)
+ {
+ }
void reset();
- bool equals(const Token& other) const;
+ 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.
// Returns false if the parsed value cannot fit into an int or float.
- bool iValue(int* value) const;
- bool uValue(unsigned int* value) const;
- bool fValue(float* value) const;
+ bool iValue(int *value) const;
+ bool uValue(unsigned int *value) const;
+ bool fValue(float *value) const;
int type;
unsigned int flags;
@@ -90,17 +103,17 @@ struct Token
std::string text;
};
-inline bool operator==(const Token& lhs, const Token& rhs)
+inline bool operator==(const Token &lhs, const Token &rhs)
{
return lhs.equals(rhs);
}
-inline bool operator!=(const Token& lhs, const Token& rhs)
+inline bool operator!=(const Token &lhs, const Token &rhs)
{
return !lhs.equals(rhs);
}
-extern std::ostream& operator<<(std::ostream& out, const Token& token);
+extern std::ostream &operator<<(std::ostream &out, const Token &token);
} // namepsace pp
#endif // COMPILER_PREPROCESSOR_TOKEN_H_