MCPcopy Create free account
hub / github.com/csyonghe/Spire / FindDirective

Function FindDirective

Source/SpireCore/Preprocessor.cpp:1622–1634  ·  view source on GitHub ↗

Look up the directive with the given name.

Source from the content-addressed store, hash-verified

1620
1621// Look up the directive with the given name.
1622static PreprocessorDirective const* FindDirective(String const& name)
1623{
1624 char const* nameStr = name.Buffer();
1625 for (int ii = 0; kDirectives[ii].name; ++ii)
1626 {
1627 if (strcmp(kDirectives[ii].name, nameStr) != 0)
1628 continue;
1629
1630 return &kDirectives[ii];
1631 }
1632
1633 return NULL;
1634}
1635
1636// Process a directive, where the preprocessor has already consumed the
1637// `#` token that started the directive line.

Callers 1

HandleDirectiveFunction · 0.85

Calls 1

BufferMethod · 0.45

Tested by

no test coverage detected