fix #677 - Add support for expression-based contracts

This commit is contained in:
Basile Burg 2018-07-28 21:30:03 +02:00
parent aa2a76f66b
commit 99390ef872
5 changed files with 9 additions and 18 deletions

@ -1 +1 @@
Subproject commit 3f7eaa1b1e6dd0c5e14d500d0b3d4ba1e1e41138 Subproject commit 8eb3cacdb31512934e9a538af8963b4347ab90f3

View File

@ -12,11 +12,11 @@
"StdLoggerDisableWarning" "StdLoggerDisableWarning"
], ],
"dependencies" : { "dependencies" : {
"libdparse" : "~>0.8.7", "libdparse" : "~>0.9.0",
"dsymbol" : "~>0.3.10", "dsymbol" : "~>0.4.0",
"inifiled" : "~>1.3.1", "inifiled" : "~>1.3.1",
"emsi_containers" : "~>0.8.0-alpha.7", "emsi_containers" : "~>0.8.0-alpha.7",
"libddoc" : "~>0.3.0-beta.1", "libddoc" : "~>0.4.0",
"stdx-allocator" : "~>2.77.2" "stdx-allocator" : "~>2.77.2"
}, },
"targetPath" : "bin", "targetPath" : "bin",

@ -1 +1 @@
Subproject commit 476c0964ee173d7574155aa2a9caa2bc019a3754 Subproject commit e1dae8ec11e03904ece4c36ae4fd497ebbbeb820

@ -1 +1 @@
Subproject commit 086cf06051bb1f33c94891ba6c39a57f164ee296 Subproject commit 11c0eae616ff36414a05334e4841a27caf0bc91c

View File

@ -9,6 +9,7 @@ import dscanner.analysis.helpers;
import dparse.ast; import dparse.ast;
import dparse.lexer; import dparse.lexer;
import dsymbol.scope_ : Scope; import dsymbol.scope_ : Scope;
import std.algorithm.iteration : each;
/** /**
* Checks for labels that are never used. * Checks for labels that are never used.
@ -44,18 +45,8 @@ final class UnusedLabelCheck : BaseAnalyzer
functionBody.bodyStatement.accept(this); functionBody.bodyStatement.accept(this);
popScope(); popScope();
} }
if (functionBody.outStatement !is null) functionBody.outStatements.each!((a){pushScope(); a.accept(this); popScope();});
{ functionBody.inStatements.each!((a){pushScope(); a.accept(this); popScope();});
pushScope();
functionBody.outStatement.accept(this);
popScope();
}
if (functionBody.inStatement !is null)
{
pushScope();
functionBody.inStatement.accept(this);
popScope();
}
} }
override void visit(const LabeledStatement labeledStatement) override void visit(const LabeledStatement labeledStatement)