From e3819643bbec121e16abda6f980cc096d2e7f4f1 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Tue, 29 Oct 2013 22:39:53 -0700 Subject: [PATCH] Fixed range error --- stdx/d/parser.d | 4 ++++ 1 file changed, 4 insertions(+) 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;