]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_codesigning/antlr2/src/TokenRefCount.cpp
1 /* ANTLR Translator Generator
2 * Project led by Terence Parr at http://www.jGuru.com
3 * Software rights: http://www.antlr.org/license.html
7 #include "antlr/TokenRefCount.hpp"
8 #include "antlr/Token.hpp"
10 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
14 TokenRef::TokenRef(Token
* p
)
26 TokenRef
* TokenRef::getRef(const Token
* p
)
29 Token
* pp
= const_cast<Token
*>(p
);
31 return pp
->ref
->increment();
33 return new TokenRef(pp
);
38 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE