• Home
  • Raw
  • Download

Lines Matching refs:opts

26                       int indent, const IDLOptions &opts,
31 const char *NewLine(const IDLOptions &opts) { in NewLine() argument
32 return opts.indent_step >= 0 ? "\n" : ""; in NewLine()
35 int Indent(const IDLOptions &opts) { in Indent() argument
36 return std::max(opts.indent_step, 0); in Indent()
40 void OutputIdentifier(const std::string &name, const IDLOptions &opts, in OutputIdentifier() argument
43 if (opts.strict_json) text += "\""; in OutputIdentifier()
45 if (opts.strict_json) text += "\""; in OutputIdentifier()
53 const IDLOptions &opts, in Print() argument
56 if (type.enum_def && opts.output_enum_identifiers) { in Print()
59 OutputIdentifier(enum_val->name, opts, _text); in Print()
75 int indent, const IDLOptions &opts, in PrintVector() argument
79 text += NewLine(opts); in PrintVector()
83 text += NewLine(opts); in PrintVector()
85 text.append(indent + Indent(opts), ' '); in PrintVector()
88 indent + Indent(opts), nullptr, opts, _text)) { in PrintVector()
92 if (!Print(v[i], type, indent + Indent(opts), nullptr, in PrintVector()
93 opts, _text)) { in PrintVector()
98 text += NewLine(opts); in PrintVector()
104 static bool EscapeString(const String &s, std::string *_text, const IDLOptions& opts) { in EscapeString() argument
125 if (opts.allow_non_utf8) { in EscapeString()
173 const IDLOptions &opts, in Print() argument
183 opts, in Print()
192 opts, in Print()
198 if (!EscapeString(*reinterpret_cast<const String *>(val), _text, opts)) { in Print()
212 type, indent, opts, _text)) { \ in Print()
228 const IDLOptions &opts, in GenField() argument
234 opts, _text); in GenField()
240 const IDLOptions &opts, std::string *_text) { in GenFieldOffset() argument
252 return Print(val, fd.value.type, indent, union_sd, opts, _text); in GenFieldOffset()
258 int indent, const IDLOptions &opts, in GenStruct() argument
269 auto output_anyway = opts.output_default_scalars_in_json && in GenStruct()
276 text += NewLine(opts); in GenStruct()
277 text.append(indent + Indent(opts), ' '); in GenStruct()
278 OutputIdentifier(fd.name, opts, _text); in GenStruct()
286 opts, indent + Indent(opts), _text)) { \ in GenStruct()
298 if (!GenFieldOffset(fd, table, struct_def.fixed, indent + Indent(opts), in GenStruct()
299 union_sd, opts, _text)) { in GenStruct()
317 text += NewLine(opts); in GenStruct()
332 parser.opts, in GenerateText()
336 text += NewLine(parser.opts); in GenerateText()