| 63 | } |
| 64 | |
| 65 | uint32_t Parser::uintValue() const { |
| 66 | auto token = string_util::trim(_token._value); |
| 67 | uint32_t uint_value; |
| 68 | if (string_util::from_decimal(token, uint_value)) { |
| 69 | return uint_value; |
| 70 | } |
| 71 | |
| 72 | float float_value; |
| 73 | if (string_util::from_float(token, float_value)) { |
| 74 | return lroundf(float_value); |
| 75 | } |
| 76 | |
| 77 | parseError("Expected an integer value"); |
| 78 | return 0; |
| 79 | } |
| 80 | |
| 81 | // cppcheck-suppress unusedFunction |
| 82 | float Parser::floatValue() const { |
no test coverage detected