diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-03-31 23:36:17 +0200 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:19:27 +0200 |
commit | d383fef02412829c2d2212a9b486f20bae89eacb (patch) | |
tree | f3d39e938a15d7ca43e67924bf3e096f09b042e2 | |
parent | c9ce2e30daed89d4fe1591cb52021fe7a84ef90f (diff) |
Add static version of Token::isSpecial
-rw-r--r-- | src/core/common/Token.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/common/Token.hpp b/src/core/common/Token.hpp index 4b56f1a..ad36e14 100644 --- a/src/core/common/Token.hpp +++ b/src/core/common/Token.hpp @@ -178,7 +178,16 @@ struct Token { * @return true if the TokenId indicates that this token is a "special" * token. */ - bool isSpecial() const { return id > Tokens::MaxTokenId; } + bool isSpecial() const { return isSpecial(id); } + + /** + * Returns true if the given token id is special. + * + * @param id is the token id that should be checked for being special. + * @return true if the TokenId indicates that this token is a "special" + * token. + */ + static bool isSpecial(TokenId id) {return id > Tokens::MaxTokenId; } /** * The getLocation function allows the tokens to be directly passed as |