This commit is contained in:
Hackerpilot 2013-11-04 12:25:02 -08:00
commit 2cf73576f4
1 changed files with 4 additions and 0 deletions

View File

@ -6077,6 +6077,7 @@ protected:
bool isDeclaration() bool isDeclaration()
{ {
mixin(traceEnterAndExit!(__FUNCTION__)); mixin(traceEnterAndExit!(__FUNCTION__));
if (!moreTokens()) return false;
with (TokenType) switch (current.type) with (TokenType) switch (current.type)
{ {
case final_: case final_:
@ -6161,6 +6162,7 @@ protected:
bool isStatement() bool isStatement()
{ {
if (!moreTokens()) return false;
auto b = setBookmark(); auto b = setBookmark();
scope (exit) goToBookmark(b); scope (exit) goToBookmark(b);
return parseStatement() !is null; return parseStatement() !is null;
@ -6168,6 +6170,7 @@ protected:
bool isExpression() bool isExpression()
{ {
if (!moreTokens()) return false;
auto b = setBookmark(); auto b = setBookmark();
scope (exit) goToBookmark(b); scope (exit) goToBookmark(b);
return parseExpression() !is null; return parseExpression() !is null;
@ -6175,6 +6178,7 @@ protected:
bool isType() bool isType()
{ {
if (!moreTokens()) return false;
auto b = setBookmark(); auto b = setBookmark();
scope (exit) goToBookmark(b); scope (exit) goToBookmark(b);
if (parseType() is null) return false; if (parseType() is null) return false;