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

Function TestPreProcessor

ppcc/src/parser.cc:521–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521Str *TestPreProcessor(Str *filename) {
522 SourceFile *source = ReadSource(filename);
523 if (!source) {
524 return S("ERROR: File not found: ")->add(filename)->add("\n");
525 }
526 TokenList *tokens = Transform(source);
527 Str *result = new Str();
528 for (Int i = 0; i < tokens->len(); i++) {
529 result->add(tokens->at(i).str);
530 }
531 return result;
532}
533
534Str *RunPreProcessor(Str *filename, Str *filedata) {
535 SourceFile *source = ReadSource(filename, filedata);

Callers 1

MainFunction · 0.85

Calls 6

ReadSourceFunction · 0.85
TransformFunction · 0.85
SFunction · 0.50
addMethod · 0.45
lenMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected