original.sol 984 B

123456789101112131415161718192021222324252627282930313233
  1. contract TernaryExpression {
  2. function test() external {
  3. bool condition;
  4. bool someVeryVeryLongConditionUsedInTheTernaryExpression;
  5. condition ? 0 : 1;
  6. someVeryVeryLongConditionUsedInTheTernaryExpression ? 1234567890 : 987654321;
  7. condition /* comment1 */ ? /* comment2 */ 1001 /* comment3 */ : /* comment4 */ 2002;
  8. // comment5
  9. someVeryVeryLongConditionUsedInTheTernaryExpression ? 1
  10. // comment6
  11. :
  12. // comment7
  13. 0; // comment8
  14. uint256 amount = msg.value > 0
  15. ? msg.value
  16. : parseAmount(IERC20(asset).balanceOf(msg.sender), msg.data);
  17. uint256 amount = msg.value > 0
  18. ? msg.value
  19. // comment9
  20. : parseAmount(IERC20(asset).balanceOf(msg.sender), msg.data);
  21. uint amount = msg.value > 0
  22. // comment10
  23. ? msg.value
  24. : parseAmount(IERC20(asset).balanceOf(msg.sender), msg.data);
  25. }
  26. }