fileToDTokens

Converts a file to D tokens provided by libDParse. All the whitespaces are ignored

@safe nothrow @trusted
const(Token)[]
fileToDTokens
(
string fileName
)

Examples

Source reporter should print the source code

auto result = new SourceResult("test/values.d", 36);
auto printer = new MockPrinter();

result.print(printer);


auto lines = printer.buffer.split("[primary:\n]");

lines[1].should.equal(`[info:test/values.d:36]`);
lines[2].should.equal(`[primary:    31:][info:unittest][primary: ][info:{]`);
lines[7].should.equal(`[dangerReverse:>   36:][primary:    ][info:.][primary:contain][info:(][success:4][info:)][info:;]`);

Meta