| 1375 | } |
| 1376 | |
| 1377 | size_t IfcParse::InstanceStreamer::semicolonCount() const { |
| 1378 | auto local_stream = stream_->clone(); |
| 1379 | auto local_lexer = IfcSpfLexer(&local_stream); |
| 1380 | Token t; |
| 1381 | size_t count = 0; |
| 1382 | try { |
| 1383 | t = local_lexer.Next(); |
| 1384 | } catch (const std::out_of_range&) { |
| 1385 | return false; |
| 1386 | } |
| 1387 | while (t.type != Token_NONE) { |
| 1388 | if (TokenFunc::isOperator(t, ';')) { |
| 1389 | count++; |
| 1390 | } |
| 1391 | try { |
| 1392 | t = local_lexer.Next(); |
| 1393 | } catch (const std::out_of_range&) { |
| 1394 | // This most likely happens when a page boundary is contained within a string |
| 1395 | break; |
| 1396 | } |
| 1397 | } |
| 1398 | return count; |
| 1399 | } |
| 1400 | |
| 1401 | void IfcParse::InstanceStreamer::pushPage(const std::string& page) |
| 1402 | { |
no test coverage detected