| 1241 | } |
| 1242 | |
| 1243 | static String DbgNodeToString(BfAstNode* astNode) |
| 1244 | { |
| 1245 | if (auto binOpExpr = BfNodeDynCast<BfBinaryOperatorExpression>(astNode)) |
| 1246 | { |
| 1247 | String str; |
| 1248 | str += "("; |
| 1249 | str += DbgNodeToString(binOpExpr->mLeft); |
| 1250 | str += " "; |
| 1251 | str += DbgNodeToString(binOpExpr->mOpToken); |
| 1252 | str += " "; |
| 1253 | str += DbgNodeToString(binOpExpr->mRight); |
| 1254 | str += ")"; |
| 1255 | return str; |
| 1256 | } |
| 1257 | else if (auto condExpr = BfNodeDynCast<BfConditionalExpression>(astNode)) |
| 1258 | { |
| 1259 | String str; |
| 1260 | str += "( "; |
| 1261 | str += "("; |
| 1262 | str += DbgNodeToString(condExpr->mConditionExpression); |
| 1263 | str += ") ? ("; |
| 1264 | str += DbgNodeToString(condExpr->mTrueExpression); |
| 1265 | str += ") : ("; |
| 1266 | str += DbgNodeToString(condExpr->mFalseExpression); |
| 1267 | str += ")"; |
| 1268 | str += " )"; |
| 1269 | return str; |
| 1270 | } |
| 1271 | |
| 1272 | return astNode->ToString(); |
| 1273 | } |
| 1274 | |
| 1275 | BfExpression* BfReducer::CheckBinaryOperatorPrecedence(BfBinaryOperatorExpression* binOpExpression) |
| 1276 | { |
no test coverage detected