| 519 | } |
| 520 | |
| 521 | Str *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 | |
| 534 | Str *RunPreProcessor(Str *filename, Str *filedata) { |
| 535 | SourceFile *source = ReadSource(filename, filedata); |