diff --git a/stdx/d/lexer.d b/stdx/d/lexer.d index 9eaeabd..f696714 100644 --- a/stdx/d/lexer.d +++ b/stdx/d/lexer.d @@ -581,8 +581,9 @@ public struct DLexer(R) break loop; } } while (!range.empty); - return Token(tok!"whitespace", cache.cacheGet(range.slice(mark)), line, - column, index); + string text = config.whitespaceBehavior == WhitespaceBehavior.skip + ? null : cache.cacheGet(range.slice(mark)); + return Token(tok!"whitespace", text, line, column, index); } Token lexNumber() pure nothrow diff --git a/stdx/lexer.d b/stdx/lexer.d index 0543638..9659afe 100644 --- a/stdx/lexer.d +++ b/stdx/lexer.d @@ -272,8 +272,6 @@ mixin template Lexer(R, IDType, Token, alias defaultTokenFunction, Token _front; } -debug = 1; - struct LexerRange(BufferType) if (isBuffer!BufferType) { this(BufferType r)