MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / getExecutorWith

Function getExecutorWith

static/components.ts:146–172  ·  view source on GitHub ↗
(
    editorId: number,
    lang: string,
    compilerId: string,
    libraries: {name: string; ver: string}[],
    compilerArgs: string | undefined,
    treeId: number,
    overrides?: ConfiguredOverrides,
    runtimeTools?: ConfiguredRuntimeTools,
)

Source from the content-addressed store, hash-verified

144
145/** Get a compiler component with the given configuration. */
146export function getExecutorWith(
147 editorId: number,
148 lang: string,
149 compilerId: string,
150 libraries: {name: string; ver: string}[],
151 compilerArgs: string | undefined,
152 treeId: number,
153 overrides?: ConfiguredOverrides,
154 runtimeTools?: ConfiguredRuntimeTools,
155): ComponentConfig<typeof EXECUTOR_COMPONENT_NAME> {
156 return {
157 type: 'component',
158 componentName: EXECUTOR_COMPONENT_NAME,
159 componentState: {
160 source: editorId,
161 tree: treeId,
162 compiler: compilerId,
163 libs: libraries,
164 options: compilerArgs,
165 lang,
166 compilationPanelShown: true,
167 compilerOutShown: true,
168 overrides: overrides,
169 runtimeTools: runtimeTools,
170 },
171 };
172}
173
174/** Get an executor for a tree mode component. */
175export function getExecutorForTree(treeId: number, lang: string): ComponentConfig<typeof EXECUTOR_COMPONENT_NAME> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected