MCPcopy Create free account
hub / github.com/compilets/compilets / addParsedFile

Method addParsedFile

src/cpp-project.ts:71–75  ·  view source on GitHub ↗

* Add the result of a parsed TypeScript file. * * The `name` has not .cpp/.h extension, as both header and impl files are * printed using the same CppFile instance.

(name: string, file: CppFile)

Source from the content-addressed store, hash-verified

69 * printed using the same CppFile instance.
70 */
71 addParsedFile(name: string, file: CppFile) {
72 if (this.cppFiles.has(name))
73 throw new Error(`The file "${name}" already exists in project`);
74 this.cppFiles.set(name, file);
75 }
76
77 /**
78 * Get the type of file according to 'mainFileName' and 'executables'.

Callers 1

parseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected