diff trunk/src/main.d @ 4:92df59b1ec4a

- Started implementation of scan().
author aziz
date Fri, 22 Jun 2007 14:12:02 +0000
parents 4bbce78bfb1e
children 79b4e8848794
line wrap: on
line diff
--- a/trunk/src/main.d	Thu Jun 21 18:36:04 2007 +0000
+++ b/trunk/src/main.d	Fri Jun 22 14:12:02 2007 +0000
@@ -6,8 +6,16 @@
 import Lexer;
 import Token;
 import std.stdio;
+import std.file;
 
 void main(char[][] args)
 {
+  auto srctext = cast(char[]) std.file.read(args[1]);
+  auto lx = new Lexer(srctext);
 
+  foreach(token; lx.getTokens())
+  {
+    if (token.type == TOK.Whitespace)
+      writefln("%s", token.start[0..token.end-token.start]);
+  }
 }
\ No newline at end of file