@@ -14,24 +14,19 @@ void ASTNodeList::removeFirst()
1414 m_nodes.erase (m_nodes.begin ());
1515}
1616
17-
1817/* ASTUnary */
1918const char * ASTUnary::op_str () const
2019{
21- static const char * s_op_strings[] = {
22- " +" , " -" , " ~" , " not "
23- };
20+ static const char * s_op_strings[] = { " +" , " -" , " ~" , " not " };
2421 return s_op_strings[op ()];
2522}
2623
27-
2824/* ASTBinary */
2925const char * ASTBinary::op_str () const
3026{
31- static const char * s_op_strings[] = {
32- " ." , " ** " , " * " , " / " , " // " , " % " , " + " , " - " ,
33- " << " , " >> " , " & " , " ^ " , " | " , " and " , " or " , " @ " ,
34- " += " , " -= " , " *= " , " /= " , " %= " , " **= " , " <<= " ,
27+ static const char * s_op_strings[] = { " ." , " ** " , " * " , " / " , " // " ,
28+ " % " , " + " , " - " , " << " , " >> " , " & " , " ^ " , " | " , " and " ,
29+ " or " , " @ " , " += " , " -= " , " *= " , " /= " , " %= " , " **= " , " <<= " ,
3530 " >>= " , " &= " , " ^= " , " |= " , " //= " , " @= " , " <INVALID> "
3631
3732 };
@@ -162,28 +157,22 @@ ASTBinary::BinOp ASTBinary::from_binary_op(int operand)
162157 }
163158}
164159
165-
166160/* ASTCompare */
167161const char * ASTCompare::op_str () const
168162{
169- static const char * s_cmp_strings[] = {
170- " < " , " <= " , " == " , " != " , " > " , " >= " , " in " , " not in " , " is " , " is not " ,
171- " <EXCEPTION MATCH>" , " <BAD>"
172- };
163+ static const char * s_cmp_strings[] = { " < " , " <= " , " == " , " != " , " > " ,
164+ " >= " , " in " , " not in " , " is " , " is not " , " <EXCEPTION MATCH>" ,
165+ " <BAD>" };
173166 return s_cmp_strings[op ()];
174167}
175168
176-
177169/* ASTKeyword */
178170const char * ASTKeyword::word_str () const
179171{
180- static const char * s_word_strings[] = {
181- " pass" , " break" , " continue"
182- };
172+ static const char * s_word_strings[] = { " pass" , " break" , " continue" };
183173 return s_word_strings[key ()];
184174}
185175
186-
187176/* ASTBlock */
188177void ASTBlock::removeLast ()
189178{
@@ -199,9 +188,7 @@ void ASTBlock::removeFirst()
199188
200189const char * ASTBlock::type_str () const
201190{
202- static const char * s_type_strings[] = {
203- " " , " if" , " else" , " elif" , " try" , " CONTAINER" , " except" ,
204- " finally" , " while" , " for" , " with" , " async for"
205- };
191+ static const char * s_type_strings[] = { " " , " if" , " else" , " elif" , " try" ,
192+ " CONTAINER" , " except" , " finally" , " while" , " for" , " with" , " async for" };
206193 return s_type_strings[blktype ()];
207194}
0 commit comments