diff --git a/stdx/d/parser.d b/stdx/d/parser.d index 160ba61..c1dc7bd 100644 --- a/stdx/d/parser.d +++ b/stdx/d/parser.d @@ -6047,6 +6047,7 @@ protected: bool isDeclaration() { mixin(traceEnterAndExit!(__FUNCTION__)); + if (!moreTokens()) return false; with (TokenType) switch (current.type) { case final_: @@ -6131,6 +6132,7 @@ protected: bool isStatement() { + if (!moreTokens()) return false; auto b = setBookmark(); scope (exit) goToBookmark(b); return parseStatement() !is null; @@ -6138,6 +6140,7 @@ protected: bool isExpression() { + if (!moreTokens()) return false; auto b = setBookmark(); scope (exit) goToBookmark(b); return parseExpression() !is null; @@ -6145,6 +6148,7 @@ protected: bool isType() { + if (!moreTokens()) return false; auto b = setBookmark(); scope (exit) goToBookmark(b); if (parseType() is null) return false;