Lines Matching refs:opts
236 static int parseCommandLine(int argc, const char* argv[], Options* opts) { in parseCommandLine() argument
237 opts->parseOnly = false; in parseCommandLine()
238 opts->write = &useStyledWriter; in parseCommandLine()
244 opts->features = Json::Features::strictMode(); in parseCommandLine()
245 opts->parseOnly = true; in parseCommandLine()
256 opts->write = &useStyledWriter; in parseCommandLine()
258 opts->write = &useStyledStreamWriter; in parseCommandLine()
260 opts->write = &useBuiltStyledStreamWriter; in parseCommandLine()
269 opts->path = argv[index]; in parseCommandLine()
273 static int runTest(Options const& opts, bool use_legacy) { in runTest() argument
276 Json::String input = readInputTestFile(opts.path.c_str()); in runTest()
278 std::cerr << "Invalid input file: " << opts.path << std::endl; in runTest()
282 Json::String basePath = removeSuffix(opts.path, ".json"); in runTest()
283 if (!opts.parseOnly && basePath.empty()) { in runTest()
284 std::cerr << "Bad input path '" << opts.path in runTest()
294 exitCode = parseAndSaveValueTree(input, actualPath, "input", opts.features, in runTest()
295 opts.parseOnly, &root, use_legacy); in runTest()
296 if (exitCode || opts.parseOnly) { in runTest()
301 exitCode = rewriteValueTree(rewritePath, root, opts.write, &rewrite); in runTest()
308 opts.features, opts.parseOnly, &rewriteRoot, in runTest()
315 Options opts; in main() local
317 int exitCode = parseCommandLine(argc, argv, &opts); in main()
323 const int modern_return_code = runTest(opts, false); in main()
329 opts.path.substr(opts.path.find_last_of("\\/") + 1); in main()
332 return runTest(opts, true); in main()