diff --git a/dsymbol b/dsymbol index aa4db35b..2d599905 160000 --- a/dsymbol +++ b/dsymbol @@ -1 +1 @@ -Subproject commit aa4db35bee875a3c937cdd78b7f2e8c3a475fe79 +Subproject commit 2d599905eced19329e5147ffaaec532d28410cd5 diff --git a/src/dscanner/analysis/base.d b/src/dscanner/analysis/base.d index 0b92a5c2..d6e8b144 100644 --- a/src/dscanner/analysis/base.d +++ b/src/dscanner/analysis/base.d @@ -81,7 +81,7 @@ protected: override void visit(const T structDec) { inAggregate = true; - structDec.accept(this); + () @trusted { structDec.accept(this); } (); inAggregate = false; } } diff --git a/src/dscanner/analysis/enumarrayliteral.d b/src/dscanner/analysis/enumarrayliteral.d index c52c7261..1335a964 100644 --- a/src/dscanner/analysis/enumarrayliteral.d +++ b/src/dscanner/analysis/enumarrayliteral.d @@ -52,6 +52,6 @@ final class EnumArrayLiteralCheck : BaseAnalyzer ~ part.identifier.text ~ " = [ ...' instead."); } } - autoDec.accept(this); + () @trusted { autoDec.accept(this); } (); } } diff --git a/src/dscanner/analysis/redundant_attributes.d b/src/dscanner/analysis/redundant_attributes.d index 0b3a467f..caf04c08 100644 --- a/src/dscanner/analysis/redundant_attributes.d +++ b/src/dscanner/analysis/redundant_attributes.d @@ -277,7 +277,7 @@ unittest assertAnalyzerWarnings(q{ unittest { -@safe: + @safe void foo(); @system { diff --git a/src/dscanner/analysis/undocumented.d b/src/dscanner/analysis/undocumented.d index 46e3f76b..36551d16 100644 --- a/src/dscanner/analysis/undocumented.d +++ b/src/dscanner/analysis/undocumented.d @@ -265,7 +265,7 @@ private: { assert(isProtection(p)); } - body + do { stack[$ - 1].protection = p; } @@ -275,7 +275,7 @@ private: { assert(isProtection(p)); } - body + do { stack ~= ProtectionInfo(p, false); } @@ -349,4 +349,3 @@ unittest stderr.writeln("Unittest for UndocumentedDeclarationCheck passed."); } - diff --git a/src/dscanner/etags.d b/src/dscanner/etags.d index 0d8b2ffc..c62d3a2a 100644 --- a/src/dscanner/etags.d +++ b/src/dscanner/etags.d @@ -36,7 +36,7 @@ version = UseModuleContext; * tagAll = if set, tag private/package declaration too * fileNames = tags will be generated from these files */ -void printEtags(File output, bool tagAll, string[] fileNames) +void printEtags(File output, bool tagAll, string[] fileNames) @trusted { LexerConfig config; StringCache cache = StringCache(StringCache.defaultBucketCount); diff --git a/src/dscanner/highlighter.d b/src/dscanner/highlighter.d index 86860cd7..c64f6905 100644 --- a/src/dscanner/highlighter.d +++ b/src/dscanner/highlighter.d @@ -9,9 +9,12 @@ import std.stdio; import std.array; import dparse.lexer; +@safe: + // http://ethanschoonover.com/solarized void highlight(R)(ref R tokens, string fileName) { + () @trusted { stdout.writeln(q"[ @@ -31,6 +34,7 @@ html { background-color: #fdf6e3; color: #002b36; } .cons { color: #859900; font-weight: bold; }
]");
+ } ();
while (!tokens.empty)
{
@@ -57,17 +61,23 @@ html { background-color: #fdf6e3; color: #002b36; }
// Stupid Windows automatically does a LF → CRLF, so
// CRLF → CRCRLF, which is obviously wrong.
// Strip out the CR characters here to avoid this.
+ () @trusted {
stdout.write(t.text.replace("<", "<").replace("\r", ""));
+ } ();
}
else
+ () @trusted {
stdout.write(t.text.replace("<", "<"));
+ } ();
}
}
- stdout.writeln("\n