diff options
Diffstat (limited to 'src/core/common/Token.hpp')
-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 |