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

Function getAstViewWith

static/components.ts:461–481  ·  view source on GitHub ↗
(
    id: number,
    source: string,
    astOutput: unknown,
    compilerName: string,
    editorid: number,
    treeid: number,
)

Source from the content-addressed store, hash-verified

459
460/** Get an ast view with the given configuration. */
461export function getAstViewWith(
462 id: number,
463 source: string,
464 astOutput: unknown,
465 compilerName: string,
466 editorid: number,
467 treeid: number,
468): ComponentConfig<typeof AST_VIEW_COMPONENT_NAME> {
469 return {
470 type: 'component',
471 componentName: AST_VIEW_COMPONENT_NAME,
472 componentState: {
473 id,
474 source,
475 astOutput,
476 compilerName,
477 editorid,
478 treeid,
479 },
480 };
481}
482
483/** Get an empty gcc dump view component. */
484export function getGccDumpView(): ComponentConfig<typeof GCC_DUMP_VIEW_COMPONENT_NAME> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected