MCPcopy Create free account
hub / github.com/Singular/Singular / Main

Function Main

ppcc/src/ppcc.cc:309–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307});
308
309void Main() {
310 char *envDebug = getenv("DEBUG_PPCC");
311 if (envDebug) {
312 switch (envDebug[0]) {
313 case '0': debug = 0; break;
314 case '1': debug = 1; break;
315 case '2': debug = 2; break;
316 default:
317 Error("invalid DEBUG_PPCC value, must be 0, 1, or 2");
318 break;
319 }
320 }
321 if (Args->len() >= 1 && Args->at(0)->eq(S("--test"))) {
322 for (Int i = 1; i < Args->len(); i++) {
323 Str *filename = Args->at(i);
324 PrintLn(S("=== ")->add(filename));
325 Print(TestPreProcessor(filename));
326 }
327 return;
328 }
329 if (getenv("RUN_PPCC")) {
330 if (debug) {
331 PrintLn(S("Args: ")->add(StrJoin(Args, " ")));
332 }
333 ParseArgs();
334 ExecCompiler();
335 } else {
336 PassThroughCompiler();
337 }
338}

Callers

nothing calls this directly

Calls 13

ErrorFunction · 0.85
TestPreProcessorFunction · 0.85
StrJoinFunction · 0.85
ParseArgsFunction · 0.85
ExecCompilerFunction · 0.85
PassThroughCompilerFunction · 0.85
SFunction · 0.50
PrintLnFunction · 0.50
PrintFunction · 0.50
lenMethod · 0.45
eqMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected