Skip to content

Commit 3dcbe43

Browse files
committed
last improvement on reportLevel.
1 parent a304ea2 commit 3dcbe43

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rpngenerator.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ void expr6_less(Token &tk, TkList &tkList, vector<RPNToken> &tokensout);
1717
void expr7_eq(Token &tk, TkList &tkList, vector<RPNToken> &tokensout);
1818
void expr13_tst(Token &tk, TkList &tkList, vector<RPNToken> &tokensout);
1919

20-
void printRPN(const vector<RPNToken> &RPNTokens, int tab)
20+
void printRPN(const vector<RPNToken> &RPNTokens, int tab, int report)
2121
{
22+
if (!report)
23+
return;
2224
cout << "******************** RPN sequence ********************\n";
2325
// if (vartab->errorlevel==0) return;
2426
cout << "opcode : ";
@@ -88,8 +90,7 @@ vector<RPNToken> makeRPN(vector<Token> tkListIn, int report)
8890
<< endl;
8991
;
9092
};
91-
if (report)
92-
printRPN(tokensout, 5);
93+
printRPN(tokensout, 5, report);
9394
return tokensout;
9495
}
9596

0 commit comments

Comments
 (0)