From 258e10aef6872f2ca3d723d72dbf1fb179036307 Mon Sep 17 00:00:00 2001 From: John Maschmeyer Date: Tue, 16 Oct 2012 19:35:40 -0500 Subject: [PATCH] Cleaned up a few things --- main.d | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/main.d b/main.d index 5ea47fc..d1d3502 100644 --- a/main.d +++ b/main.d @@ -172,23 +172,17 @@ void main(string[] args) importDirs ~= dirName(args[1]); else importDirs ~= getcwd(); - bool useStdin = false; + Token[] tokens; try { - to!size_t(args[1]); - useStdin = true; - } - catch(ConvException e) {} - Token[] tokens; - if (useStdin) - { + to!size_t(args[1]); string f; char[] buf; while (stdin.readln(buf)) - f ~= buf; + f ~= buf; tokens = f.tokenize(); } - else + catch(ConvException e) { tokens = args[1].readText().tokenize(); args.popFront();