MCPcopy Index your code
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

lib/properties.ts:199–207  ·  view source on GitHub ↗

* Creates a CompilerProps lookup function

(languages: Record<string, LanguageDef>, ceProps: PropertyGetter)

Source from the content-addressed store, hash-verified

197 * Creates a CompilerProps lookup function
198 */
199 constructor(languages: Record<string, LanguageDef>, ceProps: PropertyGetter) {
200 this.languages = languages;
201 this.propsByLangId = {};
202
203 this.ceProps = ceProps;
204
205 // Instantiate a function to access records concerning the chosen language in hidden object props.properties
206 _.each(this.languages, lang => (this.propsByLangId[lang.id] = propsFor(lang.id)));
207 }
208
209 getKeysStartingWith(langId: string, prefix: string): string[] {
210 const keys = new Set<string>(getKeysStartingWith(langId, prefix));

Callers

nothing calls this directly

Calls 1

propsForFunction · 0.85

Tested by

no test coverage detected