| 429 | } |
| 430 | |
| 431 | double TokenFunc::asFloat(const Token& token) { |
| 432 | #ifdef PERMISSIVE_FLOAT |
| 433 | if (token.type == Token_INT) { |
| 434 | /// NB: We are being more permissive here then allowed by the standard |
| 435 | return token.value_int; |
| 436 | } // ----> continues beyond preprocessor directive |
| 437 | #endif |
| 438 | if (token.type == Token_FLOAT) { |
| 439 | return token.value_double; |
| 440 | } |
| 441 | throw IfcInvalidTokenException(token.startPos, toString(token), "real"); |
| 442 | } |
| 443 | |
| 444 | const std::string& TokenFunc::asStringRef(const Token& token) { |
| 445 | if (token.type == Token_NONE) { |
nothing calls this directly
no test coverage detected