Small cleanup of style and junk comments.

This commit is contained in:
Matthew Brennan Jones 2014-05-29 17:19:25 -07:00
parent 34b312b45e
commit ed188ee9be
22 changed files with 68 additions and 60 deletions

View File

@ -59,3 +59,4 @@ protected:
MessageSet _messages; MessageSet _messages;
} }

View File

@ -59,3 +59,4 @@ class EnumArrayLiteralCheck : BaseAnalyzer
autoDec.accept(this); autoDec.accept(this);
} }
} }

View File

@ -140,4 +140,3 @@ void assertAnalyzerWarnings(string code, analysis.run.AnalyzerCheck analyzers, s
} }
} }

View File

@ -53,23 +53,16 @@ unittest
{ {
string person = "unknown"; string person = "unknown";
if (person == "unknown") // [warn]: "Else" branch is identical to "Then" branch. if (person == "unknown") // [warn]: "Else" branch is identical to "Then" branch.
{
person = "bobrick"; // same person = "bobrick"; // same
}
else else
{
person = "bobrick"; // same person = "bobrick"; // same
}
if (person == "unknown") // ok if (person == "unknown") // ok
{
person = "ricky"; // not same person = "ricky"; // not same
}
else else
{
person = "bobby"; // not same person = "bobby"; // not same
} }
}
}c, analysis.run.AnalyzerCheck.if_else_same_check); }c, analysis.run.AnalyzerCheck.if_else_same_check);
stderr.writeln("Unittest for IfElseSameCheck passed."); stderr.writeln("Unittest for IfElseSameCheck passed.");
} }

View File

@ -58,3 +58,4 @@ unittest
stderr.writeln("Unittest for NumberStyleCheck passed."); stderr.writeln("Unittest for NumberStyleCheck passed.");
} }

View File

@ -4,3 +4,4 @@ public import analysis.style;
public import analysis.enumarrayliteral; public import analysis.enumarrayliteral;
public import analysis.pokemon; public import analysis.pokemon;
public import analysis.base; public import analysis.base;

View File

@ -97,3 +97,4 @@ unittest
stderr.writeln("Unittest for PokemonExceptionCheck passed."); stderr.writeln("Unittest for PokemonExceptionCheck passed.");
} }

View File

@ -335,3 +335,4 @@ class UnusedVariableCheck : BaseAnalyzer
bool blockStatementIntroducesScope = true; bool blockStatementIntroducesScope = true;
} }

View File

@ -1519,3 +1519,4 @@ class XMLPrinter : ASTVisitor
File output; File output;
} }

View File

@ -168,3 +168,4 @@ class CTagsPrinter : ASTVisitor
int suppressDepth; int suppressDepth;
string context; string context;
} }

View File

@ -832,3 +832,4 @@ private:
IndentStyle style; IndentStyle style;
Sink sink; Sink sink;
} }

View File

@ -75,3 +75,4 @@ void writeSpan(string cssClass, string value)
else else
stdout.write(`<span class="`, cssClass, `">`, value.replace("&", "&amp;").replace("<", "&lt;"), `</span>`); stdout.write(`<span class="`, cssClass, `">`, value.replace("&", "&amp;").replace("<", "&lt;"), `</span>`);
} }

View File

@ -52,3 +52,4 @@ ulong printLineCount(Tokens)(File output, string fileName, ref Tokens tokens)
output.writefln("%s:\t%d", fileName, count); output.writefln("%s:\t%d", fileName, count);
return count; return count;
} }

View File

@ -4614,3 +4614,4 @@ version(none) struct TemplateAllocator
} }
static shared TemplateAllocator it; static shared TemplateAllocator it;
} }

View File

@ -2147,3 +2147,4 @@ immutable HtmlEntity[] characterEntities = [
HtmlEntity("zwj", "\u200D"), HtmlEntity("zwj", "\u200D"),
HtmlEntity("zwnj", "\u200C") HtmlEntity("zwnj", "\u200C")
]; ];

View File

@ -1968,3 +1968,4 @@ unittest
assert (toks(`'\xAY'`).messages[0] == DLexer.Message(1,5,"Error: 2 hex digits expected.",true)); assert (toks(`'\xAY'`).messages[0] == DLexer.Message(1,5,"Error: 2 hex digits expected.",true));
assert (toks(`'\xXX'`).messages[0] == DLexer.Message(1,4,"Error: 2 hex digits expected.",true)); assert (toks(`'\xXX'`).messages[0] == DLexer.Message(1,4,"Error: 2 hex digits expected.",true));
} }

View File

@ -1259,7 +1259,7 @@ class ClassFive(A, B) : Super if (someTest()) {}}c;
assert (classZero.structBody is null); assert (classZero.structBody is null);
auto classOne = p.parseClassDeclaration(); auto classOne = p.parseClassDeclaration();
assert (classOne.name.text == "ClassOne"); // FIXME classOne.name.text is "ClassZero" on my machine TM assert (classOne.name.text == "ClassOne");
assert (classOne.structBody.declarations.length == 0); assert (classOne.structBody.declarations.length == 0);
assert (classOne.baseClassList is null); assert (classOne.baseClassList is null);
assert (classOne.constraint is null); assert (classOne.constraint is null);
@ -7018,3 +7018,4 @@ protected:
int _traceDepth; int _traceDepth;
string comment; string comment;
} }

View File

@ -772,3 +772,4 @@ struct LexerRange
*/ */
size_t line; size_t line;
} }