MCPcopy Index your code
hub / github.com/angular/angular-cli / JsonAst

Method JsonAst

packages/angular/cli/src/utilities/json-file.ts:87–99  ·  view source on GitHub ↗

* Gets the parsed JSON abstract syntax tree. * The AST is lazily parsed and cached.

()

Source from the content-addressed store, hash-verified

85 * The AST is lazily parsed and cached.
86 */
87 private get JsonAst(): Node | undefined {
88 if (this.#jsonAst) {
89 return this.#jsonAst;
90 }
91
92 const errors: ParseError[] = [];
93 this.#jsonAst = parseTree(this.#content, errors, { allowTrailingComma: true });
94 if (errors.length) {
95 formatError(this.#path, errors);
96 }
97
98 return this.#jsonAst;
99 }
100
101 /**
102 * Gets a value from the JSON file at a specific path.

Callers

nothing calls this directly

Calls 1

formatErrorFunction · 0.85

Tested by

no test coverage detected