AST: Handle ({..})
This commit is contained in:
parent
43f00942dd
commit
94e2bf7a11
|
@ -478,6 +478,9 @@ static void compileTerm(Token *& tok, std::stack<Token*> &op)
|
|||
op.pop();
|
||||
}
|
||||
op.push(unaryop);
|
||||
} else if (Token::Match(tok,"( {")) {
|
||||
op.push(tok->next());
|
||||
tok = tok->link()->next();
|
||||
} else {
|
||||
// Parenthesized sub-expression
|
||||
tok = tok->next();
|
||||
|
|
|
@ -10008,6 +10008,10 @@ private:
|
|||
|
||||
ASSERT_EQUALS("'X''a'>", testAst("('X' > 'a')"));
|
||||
ASSERT_EQUALS("'X''a'>", testAst("(L'X' > L'a')"));
|
||||
|
||||
// ({..})
|
||||
ASSERT_EQUALS("a{+d+", testAst("a+({b+c;})+d"));
|
||||
ASSERT_EQUALS("a{d*+", testAst("a+({b+c;})*d"));
|
||||
}
|
||||
|
||||
void astpar() const { // parentheses
|
||||
|
|
Loading…
Reference in New Issue