MCPcopy Create free account
hub / github.com/Genivia/RE-flex / write_namespace_open

Method write_namespace_open

lib/pattern.cpp:4965–4978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4963
4964#ifndef WITH_NO_CODEGEN
4965void Pattern::write_namespace_open(FILE *file) const
4966{
4967 if (opt_.z.empty())
4968 return;
4969
4970 const std::string& s = opt_.z;
4971 size_t i = 0, j;
4972 while ((j = s.find("::", i)) != std::string::npos)
4973 {
4974 ::fprintf(file, "namespace %s {\n", s.substr(i, j - i).c_str());
4975 i = j + 2;
4976 }
4977 ::fprintf(file, "namespace %s {\n\n", s.substr(i).c_str());
4978}
4979#endif
4980
4981#ifndef WITH_NO_CODEGEN

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected