mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-05-02 00:00:20 +03:00
Reduced number of TODO comments
This commit is contained in:
parent
635ddf79a0
commit
084bc6fd86
2 changed files with 1826 additions and 1538 deletions
54
std/d/ast.d
54
std/d/ast.d
|
@ -18,10 +18,11 @@ module std.d.ast;
|
||||||
|
|
||||||
import std.d.lexer;
|
import std.d.lexer;
|
||||||
|
|
||||||
|
// TODO: Many of these classes can be simplified by using std.variant.Algebraic
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the $(LINK2 http://en.wikipedia.org/wiki/Visitor_pattern, Visitor Pattern)
|
* Implements the $(LINK2 http://en.wikipedia.org/wiki/Visitor_pattern, Visitor Pattern)
|
||||||
* for the various AST ///
|
* for the various AST classes
|
||||||
classes
|
|
||||||
*/
|
*/
|
||||||
abstract class ASTVisitor
|
abstract class ASTVisitor
|
||||||
{
|
{
|
||||||
|
@ -104,7 +105,6 @@ abstract class ASTVisitor
|
||||||
/** */ void visit(FinalSwitchStatement finalSwitchStatement) { finalSwitchStatement.accept(this); }
|
/** */ void visit(FinalSwitchStatement finalSwitchStatement) { finalSwitchStatement.accept(this); }
|
||||||
/** */ void visit(Finally finally_) { finally_.accept(this); }
|
/** */ void visit(Finally finally_) { finally_.accept(this); }
|
||||||
/** */ void visit(ForStatement forStatement) { forStatement.accept(this); }
|
/** */ void visit(ForStatement forStatement) { forStatement.accept(this); }
|
||||||
/** */ void visit(ForeachRangeStatement foreachRangeStatement) { foreachRangeStatement.accept(this); }
|
|
||||||
/** */ void visit(ForeachStatement foreachStatement) { foreachStatement.accept(this); }
|
/** */ void visit(ForeachStatement foreachStatement) { foreachStatement.accept(this); }
|
||||||
/** */ void visit(ForeachType foreachType) { foreachType.accept(this); }
|
/** */ void visit(ForeachType foreachType) { foreachType.accept(this); }
|
||||||
/** */ void visit(ForeachTypeList foreachTypeList) { foreachTypeList.accept(this); }
|
/** */ void visit(ForeachTypeList foreachTypeList) { foreachTypeList.accept(this); }
|
||||||
|
@ -262,7 +262,7 @@ public:
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
/** */ Type type;
|
/** */ Type type;
|
||||||
/** */ Declarator declarator;
|
/** */ Declarator declarator;
|
||||||
/** */ AliasInitializer[] initializations;
|
/** */ AliasInitializer[] initializers;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -313,7 +313,7 @@ class ArgumentList : ASTNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
/** */ AssignExpression[] arguments;
|
/** */ AssignExpression[] items;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -881,15 +881,24 @@ public:
|
||||||
class DeclarationsAndStatements : ASTNode
|
class DeclarationsAndStatements : ASTNode
|
||||||
{
|
{
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
/** */ ASTNode[] declarationsAndStatements;
|
/** */ DeclarationOrStatement[] declarationsAndStatements;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
class DeclarationOrInvariant : ASTNode
|
class DeclarationOrInvariant : ASTNode
|
||||||
{
|
{
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
Declaration declaration;
|
/** */ Declaration declaration;
|
||||||
Invariant invariant_;
|
/** */ Invariant invariant_;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
class DeclarationOrStatement : ASTNode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
mixin(DEFAULT_ACCEPT);
|
||||||
|
/** */ Declaration declaration;
|
||||||
|
/** */ StatementNoCaseNoDefault statement;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -1032,25 +1041,15 @@ public:
|
||||||
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
|
||||||
class ForeachRangeStatement : ASTNode
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
mixin(DEFAULT_ACCEPT);
|
|
||||||
/** */ ForeachType foreachType;
|
|
||||||
/** */ Expression lower;
|
|
||||||
/** */ Expression higher;
|
|
||||||
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
|
||||||
}
|
|
||||||
|
|
||||||
///
|
///
|
||||||
class ForeachStatement : ASTNode
|
class ForeachStatement : ASTNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
/** */ Token foreachType;
|
/** */ TokenType foreachType;
|
||||||
/** */ ForeachTypeList foreachTypeList;
|
/** */ ForeachTypeList foreachTypeList;
|
||||||
/** */ Expression expression;
|
/** */ Expression low;
|
||||||
|
/** */ Expression high;
|
||||||
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1115,6 +1114,8 @@ class FunctionDeclaration : ASTNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
|
/** */ bool hasAuto;
|
||||||
|
/** */ bool hasRef;
|
||||||
/** */ Type returnType;
|
/** */ Type returnType;
|
||||||
/** */ Token name;
|
/** */ Token name;
|
||||||
/** */ TemplateParameters templateParameters;
|
/** */ TemplateParameters templateParameters;
|
||||||
|
@ -1350,7 +1351,7 @@ class LambdaExpression : ASTNode
|
||||||
public:
|
public:
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
/** */ Token identifier;
|
/** */ Token identifier;
|
||||||
/** */ Parameters paramaters;
|
/** */ Parameters parameters;
|
||||||
/** */ FunctionAttribute[] functionAttributes;
|
/** */ FunctionAttribute[] functionAttributes;
|
||||||
/** */ AssignExpression assignExpression;
|
/** */ AssignExpression assignExpression;
|
||||||
}
|
}
|
||||||
|
@ -1499,7 +1500,6 @@ public:
|
||||||
/** */ ThrowStatement throwStatement;
|
/** */ ThrowStatement throwStatement;
|
||||||
/** */ ScopeGuardStatement scopeGuardStatement;
|
/** */ ScopeGuardStatement scopeGuardStatement;
|
||||||
/** */ AsmStatement asmStatement;
|
/** */ AsmStatement asmStatement;
|
||||||
/** */ ForeachRangeStatement foreachRangeStatement;
|
|
||||||
/** */ ConditionalStatement conditionalStatement;
|
/** */ ConditionalStatement conditionalStatement;
|
||||||
/** */ StaticAssertStatement staticAssertStatement;
|
/** */ StaticAssertStatement staticAssertStatement;
|
||||||
/** */ TemplateMixinStatement templateMixinStatement;
|
/** */ TemplateMixinStatement templateMixinStatement;
|
||||||
|
@ -1736,6 +1736,7 @@ class SliceExpression : ASTNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
|
/** */ UnaryExpression unaryExpression;
|
||||||
/** */ AssignExpression lower;
|
/** */ AssignExpression lower;
|
||||||
/** */ AssignExpression upper;
|
/** */ AssignExpression upper;
|
||||||
}
|
}
|
||||||
|
@ -1946,7 +1947,7 @@ class TemplateInstance : ASTNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
/** */ Symbol symbol;
|
/** */ Token identifier;
|
||||||
/** */ TemplateArguments templateArguments;
|
/** */ TemplateArguments templateArguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2176,6 +2177,8 @@ public:
|
||||||
/** */ ArgumentList argumentList;
|
/** */ ArgumentList argumentList;
|
||||||
/** */ IdentifierOrTemplateInstance identifierOrTemplateInstance;
|
/** */ IdentifierOrTemplateInstance identifierOrTemplateInstance;
|
||||||
/** */ AssertExpression assertExpression;
|
/** */ AssertExpression assertExpression;
|
||||||
|
/** */ SliceExpression sliceExpression;
|
||||||
|
/** */ IndexExpression indexExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -2247,8 +2250,7 @@ class WithStatement : ASTNode
|
||||||
public:
|
public:
|
||||||
mixin(DEFAULT_ACCEPT);
|
mixin(DEFAULT_ACCEPT);
|
||||||
/** */ Expression expression;
|
/** */ Expression expression;
|
||||||
/** */ Symbol symbol;
|
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
||||||
/** */ TemplateInstance templateInstance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
932
std/d/parser.d
932
std/d/parser.d
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue