nimp/compiler/source/app.d

21 lines
467 B
D

import std.stdio;
import std.string;
import nimpc;
import streams;
import streams.types.mapping;
int main(string[] args) {
if (args.length < 2) {
writeln("Missing required file args.");
return 1;
}
string[] files = args[1 .. $];
writefln!"Compiling %s"(files);
foreach (filename; files) {
auto sIn = FileInputStream(toStringz(filename));
auto tokens = tokenize(mappingInputStreamFor!((ubyte b) => cast(char) b)(sIn));
writeln(tokens);
}
return 0;
}