src
indent.h
Go to the documentation of this file.
1 #ifndef _RE2C_CODEGEN_INDENT_
2 #define _RE2C_CODEGEN_INDENT_
3 
4 #include <string>
5 
6 #include "src/globals.h"
7 
8 namespace re2c
9 {
10 
11 inline std::string indent (uint32_t ind)
12 {
13  std::string str;
14 
15  while (opts->target != opt_t::DOT && ind-- > 0)
16  {
17  str += opts->indString;
18  }
19  return str;
20 }
21 
22 } // end namespace re2c
23 
24 #endif // _RE2C_CODEGEN_INDENT_
std::string indString
Definition: opt.h:118
std::string indent(uint32_t ind)
Definition: indent.h:11
opt_t::target_t target
Definition: opt.h:118
Opt opts
Definition: opt.cc:7
Definition: bitmap.cc:10