AST : cleanup unused functions

This commit is contained in:
Daniel Marjamäki 2013-11-06 12:38:58 +01:00
parent 4eba02d901
commit a572c0b728
2 changed files with 0 additions and 40 deletions

View File

@ -1143,44 +1143,6 @@ void Token::astOperand2(Token *tok)
_astOperand2 = tok;
}
void Token::astFunctionCall()
{
_astOperand1 = _next;
_next->_astParent = this;
}
void Token::astHandleParentheses()
{
// Assumptions:
// * code is valid
// * _str is one of: ( ) ]
Token *innerTop;
if (Token::Match(this, ")|]"))
innerTop = _previous;
else if (_next && _next->_str == ")")
return;
else { // _str = "("
innerTop = _next;
while (Token::simpleMatch(innerTop->link(),") )"))
innerTop = innerTop->_next;
if (innerTop && innerTop->_str == "(")
innerTop = innerTop->_link->_next;
}
while (innerTop && innerTop->_astParent)
innerTop = innerTop->_astParent;
if (_astParent) {
if (_astParent->_astOperand2 == this)
_astParent->_astOperand2 = innerTop;
else if (_astParent->_astOperand1 == this)
_astParent->_astOperand1 = innerTop;
innerTop->_astParent = _astParent;
_astParent = NULL;
}
}
void Token::printAst() const
{
bool title = false;

View File

@ -655,8 +655,6 @@ private:
public:
void astOperand1(Token *tok);
void astOperand2(Token *tok);
void astFunctionCall();
void astHandleParentheses();
const Token * astOperand1() const {
return _astOperand1;