DScanner update

This commit is contained in:
Hackerpilot 2013-10-29 20:55:50 -07:00
parent 6b8d7ed48e
commit 80a99561d0
2 changed files with 8 additions and 5 deletions

View File

@ -128,7 +128,7 @@ class AutocompleteVisitor : ASTVisitor
if (statement.foreachTypeList is null)
{
statement.statementNoCaseNoDefault.accept(this);
statement.declarationOrStatement.accept(this);
}
else if (statement.foreachType !is null)
{
@ -145,10 +145,13 @@ class AutocompleteVisitor : ASTVisitor
symbols ~= loopVariable;
}
if (statement.statementNoCaseNoDefault !is null
&& statement.statementNoCaseNoDefault.blockStatement !is null)
// This is much prettier on the 0.2.0-dev branch
if (statement.declarationOrStatement !is null
&& statement.declarationOrStatement.statement !is null
&& statement.declarationOrStatement.statement.statementNoCaseNoDefault !is null
&& statement.declarationOrStatement.statement.statementNoCaseNoDefault.blockStatement !is null)
{
BlockStatement block = statement.statementNoCaseNoDefault.blockStatement;
BlockStatement block = statement.declarationOrStatement.statement.statementNoCaseNoDefault.blockStatement;
auto s = scope_;
scope_ = new Scope(statement.startIndex,
block.endLocation);

@ -1 +1 @@
Subproject commit 0c843275bab1eefc6cdcc65cfa7442e55b5a4532
Subproject commit 1c057260d5541f2ebd4d5b1780bacf45e482df39