MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / NoOpParser

Class NoOpParser

lib/compilers/c2rust.ts:40–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38// comments `#[]` etc are important, and as this isn't even slightly "assembly" we don't
39// try and do anything like "dead code removal".
40class NoOpParser implements IAsmParser {
41 process(asmResult: string, filters: ParseFiltersAndOutputOptions): ParsedAsmResult {
42 let asmLines = utils.splitLines(asmResult);
43 if (filters.preProcessLines !== undefined) {
44 asmLines = filters.preProcessLines(asmLines);
45 }
46 const asm = asmLines.map(line => {
47 line = utils.expandTabs(line);
48
49 const text = AsmRegex.filterAsmLine(line, filters);
50
51 return {text, source: null, labels: []};
52 });
53
54 return {asm};
55 }
56}
57
58export class C2RustCompiler extends BaseCompiler {
59 static get key() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected