Fixed range error
This commit is contained in:
parent
1c057260d5
commit
e3819643bb
|
@ -6047,6 +6047,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_:
|
||||||
|
@ -6131,6 +6132,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;
|
||||||
|
@ -6138,6 +6140,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;
|
||||||
|
@ -6145,6 +6148,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;
|
||||||
|
|
Loading…
Reference in New Issue