| 4980 | |
| 4981 | #ifndef WITH_NO_CODEGEN |
| 4982 | void Pattern::write_namespace_close(FILE *file) const |
| 4983 | { |
| 4984 | if (opt_.z.empty()) |
| 4985 | return; |
| 4986 | |
| 4987 | const std::string& s = opt_.z; |
| 4988 | size_t i = 0, j; |
| 4989 | while ((j = s.find("::", i)) != std::string::npos) |
| 4990 | { |
| 4991 | ::fprintf(file, "} // namespace %s\n\n", s.substr(i, j - i).c_str()); |
| 4992 | i = j + 2; |
| 4993 | } |
| 4994 | ::fprintf(file, "} // namespace %s\n\n", s.substr(i).c_str()); |
| 4995 | } |
| 4996 | #endif |
| 4997 | |
| 4998 | } // namespace reflex |