MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / hasSemicolon

Method hasSemicolon

src/ifcparse/IfcParse.cpp:1354–1375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352}
1353
1354bool IfcParse::InstanceStreamer::hasSemicolon() const {
1355 auto local_stream = stream_->clone();
1356 auto local_lexer = IfcSpfLexer(&local_stream);
1357 Token t;
1358 try {
1359 t = local_lexer.Next();
1360 } catch (const std::out_of_range&) {
1361 return false;
1362 }
1363 while (t.type != Token_NONE) {
1364 if (TokenFunc::isOperator(t, ';')) {
1365 return true;
1366 }
1367 try {
1368 t = local_lexer.Next();
1369 } catch (const std::out_of_range&) {
1370 // This most likely happens when a page boundary is contained within a string
1371 break;
1372 }
1373 }
1374 return false;
1375}
1376
1377size_t IfcParse::InstanceStreamer::semicolonCount() const {
1378 auto local_stream = stream_->clone();

Callers 1

stream2Function · 0.95

Calls 3

IfcSpfLexerClass · 0.85
cloneMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected