mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-04-28 22:30:04 +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;
|
||||
|
||||
// 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)
|
||||
* for the various AST ///
|
||||
classes
|
||||
* for the various AST classes
|
||||
*/
|
||||
abstract class ASTVisitor
|
||||
{
|
||||
|
@ -104,7 +105,6 @@ abstract class ASTVisitor
|
|||
/** */ void visit(FinalSwitchStatement finalSwitchStatement) { finalSwitchStatement.accept(this); }
|
||||
/** */ void visit(Finally finally_) { finally_.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(ForeachType foreachType) { foreachType.accept(this); }
|
||||
/** */ void visit(ForeachTypeList foreachTypeList) { foreachTypeList.accept(this); }
|
||||
|
@ -262,7 +262,7 @@ public:
|
|||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ Type type;
|
||||
/** */ Declarator declarator;
|
||||
/** */ AliasInitializer[] initializations;
|
||||
/** */ AliasInitializer[] initializers;
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -313,7 +313,7 @@ class ArgumentList : ASTNode
|
|||
{
|
||||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ AssignExpression[] arguments;
|
||||
/** */ AssignExpression[] items;
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -881,15 +881,24 @@ public:
|
|||
class DeclarationsAndStatements : ASTNode
|
||||
{
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ ASTNode[] declarationsAndStatements;
|
||||
/** */ DeclarationOrStatement[] declarationsAndStatements;
|
||||
}
|
||||
|
||||
///
|
||||
class DeclarationOrInvariant : ASTNode
|
||||
{
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
Declaration declaration;
|
||||
Invariant invariant_;
|
||||
/** */ Declaration declaration;
|
||||
/** */ Invariant invariant_;
|
||||
}
|
||||
|
||||
///
|
||||
class DeclarationOrStatement : ASTNode
|
||||
{
|
||||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ Declaration declaration;
|
||||
/** */ StatementNoCaseNoDefault statement;
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -1032,25 +1041,15 @@ public:
|
|||
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
||||
}
|
||||
|
||||
///
|
||||
class ForeachRangeStatement : ASTNode
|
||||
{
|
||||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ ForeachType foreachType;
|
||||
/** */ Expression lower;
|
||||
/** */ Expression higher;
|
||||
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
||||
}
|
||||
|
||||
///
|
||||
class ForeachStatement : ASTNode
|
||||
{
|
||||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ Token foreachType;
|
||||
/** */ TokenType foreachType;
|
||||
/** */ ForeachTypeList foreachTypeList;
|
||||
/** */ Expression expression;
|
||||
/** */ Expression low;
|
||||
/** */ Expression high;
|
||||
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
||||
}
|
||||
|
||||
|
@ -1115,6 +1114,8 @@ class FunctionDeclaration : ASTNode
|
|||
{
|
||||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ bool hasAuto;
|
||||
/** */ bool hasRef;
|
||||
/** */ Type returnType;
|
||||
/** */ Token name;
|
||||
/** */ TemplateParameters templateParameters;
|
||||
|
@ -1350,7 +1351,7 @@ class LambdaExpression : ASTNode
|
|||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ Token identifier;
|
||||
/** */ Parameters paramaters;
|
||||
/** */ Parameters parameters;
|
||||
/** */ FunctionAttribute[] functionAttributes;
|
||||
/** */ AssignExpression assignExpression;
|
||||
}
|
||||
|
@ -1499,7 +1500,6 @@ public:
|
|||
/** */ ThrowStatement throwStatement;
|
||||
/** */ ScopeGuardStatement scopeGuardStatement;
|
||||
/** */ AsmStatement asmStatement;
|
||||
/** */ ForeachRangeStatement foreachRangeStatement;
|
||||
/** */ ConditionalStatement conditionalStatement;
|
||||
/** */ StaticAssertStatement staticAssertStatement;
|
||||
/** */ TemplateMixinStatement templateMixinStatement;
|
||||
|
@ -1736,6 +1736,7 @@ class SliceExpression : ASTNode
|
|||
{
|
||||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ UnaryExpression unaryExpression;
|
||||
/** */ AssignExpression lower;
|
||||
/** */ AssignExpression upper;
|
||||
}
|
||||
|
@ -1946,7 +1947,7 @@ class TemplateInstance : ASTNode
|
|||
{
|
||||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ Symbol symbol;
|
||||
/** */ Token identifier;
|
||||
/** */ TemplateArguments templateArguments;
|
||||
}
|
||||
|
||||
|
@ -2176,6 +2177,8 @@ public:
|
|||
/** */ ArgumentList argumentList;
|
||||
/** */ IdentifierOrTemplateInstance identifierOrTemplateInstance;
|
||||
/** */ AssertExpression assertExpression;
|
||||
/** */ SliceExpression sliceExpression;
|
||||
/** */ IndexExpression indexExpression;
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -2247,8 +2250,7 @@ class WithStatement : ASTNode
|
|||
public:
|
||||
mixin(DEFAULT_ACCEPT);
|
||||
/** */ Expression expression;
|
||||
/** */ Symbol symbol;
|
||||
/** */ TemplateInstance templateInstance;
|
||||
/** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
|
||||
}
|
||||
|
||||
///
|
||||
|
|
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