# HG changeset patch # User aziz # Date 1182587580 0 # Node ID 3ee65d6e39c9e9dc0a2e8f6c6d5a48678abddcee # Parent 5d6968cc751e5199c48b77f07b27b64b3dc7e01c - Parsing // comments now. diff -r 5d6968cc751e -r 3ee65d6e39c9 trunk/src/Lexer.d --- a/trunk/src/Lexer.d Sat Jun 23 07:46:00 2007 +0000 +++ b/trunk/src/Lexer.d Sat Jun 23 08:33:00 2007 +0000 @@ -86,7 +86,7 @@ { assert(p < end); - char c = *p; + uint c = *p; while(1) { @@ -149,6 +149,16 @@ t.end = p; return; } + else if (c == '/') + { + do + { + c = *++p; + } while (c != '\n' && c != 0) + t.type = TOK.Comment; + t.end = p; + return; + } } if (c == '"') diff -r 5d6968cc751e -r 3ee65d6e39c9 trunk/src/main.d --- a/trunk/src/main.d Sat Jun 23 07:46:00 2007 +0000 +++ b/trunk/src/main.d Sat Jun 23 08:33:00 2007 +0000 @@ -59,5 +59,5 @@ } end = token.end; } - writef(""); + writef("\n"); } \ No newline at end of file