From b29a7d8994a018b4b634f578d346be7daaefe034 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Mon, 9 Jun 2014 16:21:02 -0700 Subject: [PATCH] Use better lexing behavior for sloc and tokenCount options --- main.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.d b/main.d index 50c1304..e6c852d 100644 --- a/main.d +++ b/main.d @@ -150,9 +150,9 @@ int run(string[] args) if (usingStdin) { LexerConfig config; - config.whitespaceBehavior = WhitespaceBehavior.include; + config.whitespaceBehavior = WhitespaceBehavior.skip; config.stringBehavior = StringBehavior.source; - config.commentBehavior = CommentBehavior.include; + config.commentBehavior = CommentBehavior.attach; auto tokens = byToken(readStdin(), config, cache); if (tokenCount) printTokenCount(stdout, "stdin", tokens); @@ -168,7 +168,7 @@ int run(string[] args) LexerConfig config; config.whitespaceBehavior = WhitespaceBehavior.skip; config.stringBehavior = StringBehavior.source; - config.commentBehavior = CommentBehavior.include; + config.commentBehavior = CommentBehavior.attach; auto tokens = byToken(readFile(f), config, cache); if (tokenCount) count += printTokenCount(stdout, f, tokens);