Update libdparse

This commit is contained in:
Hackerpilot 2015-05-04 14:55:36 -07:00
parent b03e9de8fa
commit b73e8c4fca
4 changed files with 8 additions and 7 deletions

View File

@ -8,7 +8,7 @@
"preBuildCommands": ["git log -1 --format='%H' > githash.txt"],
"stringImportPaths": ["."],
"dependencies": {
"libdparse": "~>0.2.0",
"libdparse": "0.2.1",
"inifiled": ">=0.0.3",
},
}

@ -1 +1 @@
Subproject commit 4c46428bf48abffbd647cd1e16f96ba1805187e2
Subproject commit 32f6d638e38888e1bb11cf43e93fe2d11132a98f

View File

@ -8,6 +8,7 @@ module analysis.enumarrayliteral;
import std.d.ast;
import std.d.lexer;
import analysis.base;
import std.algorithm : canFind;
void doNothing(string, size_t, size_t, string, bool) {}
@ -29,7 +30,7 @@ class EnumArrayLiteralCheck : BaseAnalyzer
override void visit(const AutoDeclaration autoDec)
{
if (autoDec.storageClass && autoDec.storageClass.token == tok!"enum")
if (autoDec.storageClasses.canFind!(a => a.token == tok!"enum"))
{
foreach (i, initializer; autoDec.initializers)
{

View File

@ -66,11 +66,11 @@ class UnmodifiedFinder:BaseAnalyzer
override void visit(const AutoDeclaration autoDeclaration)
{
import std.algorithm : canFind;
if (blockStatementDepth > 0 && isImmutable <= 0
&& (autoDeclaration.storageClass !is null
&& autoDeclaration.storageClass.token != tok!"const"
&& autoDeclaration.storageClass.token != tok!"enum"
&& autoDeclaration.storageClass.token != tok!"immutable"))
&& (!autoDeclaration.storageClasses.canFind!(a => a.token == tok!"const"
|| a.token == tok!"enum" || a.token == tok!"immutable")))
{
foreach (size_t i, id; autoDeclaration.identifiers)
{