MCPcopy Index your code
hub / github.com/nodejs/node / FormatCMake

Function FormatCMake

deps/v8/tools/cppgc/gen_cmake.py:467–473  ·  view source on GitHub ↗
(contents)

Source from the content-addressed store, hash-verified

465
466
467def FormatCMake(contents):
468 from cmake_format import configuration, lexer, parse, formatter
469 cfg = configuration.Configuration()
470 tokens = lexer.tokenize(contents)
471 parse_tree = parse.parse(tokens)
472 box_tree = formatter.layout_tree(parse_tree, cfg)
473 return formatter.write_tree(box_tree, cfg, contents)
474
475
476def SaveContents(contents, outfile):

Callers 1

GenCMakeFunction · 0.85

Calls 2

parseMethod · 0.65
tokenizeMethod · 0.45

Tested by

no test coverage detected