* Gets the parsed JSON abstract syntax tree. * The AST is lazily parsed and cached.
()
| 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. |
nothing calls this directly
no test coverage detected