"Fossies" - the Fresh Open Source Software Archive

Member "dmd2/src/dmd/dmd/visitor.h" (20 Nov 2020, 26430 Bytes) of package /linux/misc/dmd.2.094.2.linux.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 /* Compiler implementation of the D programming language
    3  * Copyright (C) 2013-2020 by The D Language Foundation, All Rights Reserved
    4  * http://www.digitalmars.com
    5  * Distributed under the Boost Software License, Version 1.0.
    6  * http://www.boost.org/LICENSE_1_0.txt
    7  * https://github.com/dlang/dmd/blob/master/src/dmd/visitor.h
    8  */
    9 
   10 #pragma once
   11 
   12 #include "root/dsystem.h"
   13 
   14 class Statement;
   15 class ErrorStatement;
   16 class PeelStatement;
   17 class ExpStatement;
   18 class DtorExpStatement;
   19 class CompileStatement;
   20 class CompoundStatement;
   21 class CompoundDeclarationStatement;
   22 class UnrolledLoopStatement;
   23 class ScopeStatement;
   24 class ForwardingStatement;
   25 class WhileStatement;
   26 class DoStatement;
   27 class ForStatement;
   28 class ForeachStatement;
   29 class ForeachRangeStatement;
   30 class StaticForeachStatement;
   31 class IfStatement;
   32 class ConditionalStatement;
   33 class PragmaStatement;
   34 class StaticAssertStatement;
   35 class SwitchStatement;
   36 class CaseStatement;
   37 class CaseRangeStatement;
   38 class DefaultStatement;
   39 class GotoDefaultStatement;
   40 class GotoCaseStatement;
   41 class SwitchErrorStatement;
   42 class ReturnStatement;
   43 class BreakStatement;
   44 class ContinueStatement;
   45 class SynchronizedStatement;
   46 class WithStatement;
   47 class TryCatchStatement;
   48 class TryFinallyStatement;
   49 class ScopeGuardStatement;
   50 class ThrowStatement;
   51 class DebugStatement;
   52 class GotoStatement;
   53 class LabelStatement;
   54 class AsmStatement;
   55 class InlineAsmStatement;
   56 class GccAsmStatement;
   57 class CompoundAsmStatement;
   58 class ImportStatement;
   59 
   60 class Type;
   61 class TypeError;
   62 class TypeNext;
   63 class TypeBasic;
   64 class TypeVector;
   65 class TypeArray;
   66 class TypeSArray;
   67 class TypeDArray;
   68 class TypeAArray;
   69 class TypePointer;
   70 class TypeReference;
   71 class TypeFunction;
   72 class TypeDelegate;
   73 class TypeQualified;
   74 class TypeIdentifier;
   75 class TypeInstance;
   76 class TypeTypeof;
   77 class TypeReturn;
   78 class TypeStruct;
   79 class TypeEnum;
   80 class TypeClass;
   81 class TypeTuple;
   82 class TypeSlice;
   83 class TypeNull;
   84 class TypeTraits;
   85 class TypeMixin;
   86 
   87 class Dsymbol;
   88 
   89 class StaticAssert;
   90 class DebugSymbol;
   91 class VersionSymbol;
   92 class EnumMember;
   93 class Import;
   94 class OverloadSet;
   95 class LabelDsymbol;
   96 class AliasThis;
   97 
   98 class AttribDeclaration;
   99 class StorageClassDeclaration;
  100 class DeprecatedDeclaration;
  101 class LinkDeclaration;
  102 class CPPMangleDeclaration;
  103 class CPPNamespaceDeclaration;
  104 class ProtDeclaration;
  105 class AlignDeclaration;
  106 class AnonDeclaration;
  107 class PragmaDeclaration;
  108 class ConditionalDeclaration;
  109 class StaticIfDeclaration;
  110 class CompileDeclaration;
  111 class StaticForeachDeclaration;
  112 class UserAttributeDeclaration;
  113 class ForwardingAttribDeclaration;
  114 
  115 class ScopeDsymbol;
  116 class TemplateDeclaration;
  117 class TemplateInstance;
  118 class TemplateMixin;
  119 class EnumDeclaration;
  120 class Package;
  121 class Module;
  122 class WithScopeSymbol;
  123 class ArrayScopeSymbol;
  124 class Nspace;
  125 
  126 class AggregateDeclaration;
  127 class StructDeclaration;
  128 class UnionDeclaration;
  129 class ClassDeclaration;
  130 class InterfaceDeclaration;
  131 
  132 class Declaration;
  133 class TupleDeclaration;
  134 class AliasDeclaration;
  135 class OverDeclaration;
  136 class VarDeclaration;
  137 class SymbolDeclaration;
  138 class ThisDeclaration;
  139 
  140 class TypeInfoDeclaration;
  141 class TypeInfoStructDeclaration;
  142 class TypeInfoClassDeclaration;
  143 class TypeInfoInterfaceDeclaration;
  144 class TypeInfoPointerDeclaration;
  145 class TypeInfoArrayDeclaration;
  146 class TypeInfoStaticArrayDeclaration;
  147 class TypeInfoAssociativeArrayDeclaration;
  148 class TypeInfoEnumDeclaration;
  149 class TypeInfoFunctionDeclaration;
  150 class TypeInfoDelegateDeclaration;
  151 class TypeInfoTupleDeclaration;
  152 class TypeInfoConstDeclaration;
  153 class TypeInfoInvariantDeclaration;
  154 class TypeInfoSharedDeclaration;
  155 class TypeInfoWildDeclaration;
  156 class TypeInfoVectorDeclaration;
  157 
  158 class FuncDeclaration;
  159 class FuncAliasDeclaration;
  160 class FuncLiteralDeclaration;
  161 class CtorDeclaration;
  162 class PostBlitDeclaration;
  163 class DtorDeclaration;
  164 class StaticCtorDeclaration;
  165 class SharedStaticCtorDeclaration;
  166 class StaticDtorDeclaration;
  167 class SharedStaticDtorDeclaration;
  168 class InvariantDeclaration;
  169 class UnitTestDeclaration;
  170 class NewDeclaration;
  171 
  172 class Initializer;
  173 class VoidInitializer;
  174 class ErrorInitializer;
  175 class StructInitializer;
  176 class ArrayInitializer;
  177 class ExpInitializer;
  178 
  179 class Expression;
  180 class IntegerExp;
  181 class ErrorExp;
  182 class RealExp;
  183 class ComplexExp;
  184 class IdentifierExp;
  185 class DollarExp;
  186 class DsymbolExp;
  187 class ThisExp;
  188 class SuperExp;
  189 class NullExp;
  190 class StringExp;
  191 class TupleExp;
  192 class ArrayLiteralExp;
  193 class AssocArrayLiteralExp;
  194 class StructLiteralExp;
  195 class ObjcClassReferenceExp;
  196 class TypeExp;
  197 class ScopeExp;
  198 class TemplateExp;
  199 class NewExp;
  200 class NewAnonClassExp;
  201 class SymbolExp;
  202 class SymOffExp;
  203 class VarExp;
  204 class OverExp;
  205 class FuncExp;
  206 class DeclarationExp;
  207 class TypeidExp;
  208 class TraitsExp;
  209 class HaltExp;
  210 class IsExp;
  211 class UnaExp;
  212 class BinExp;
  213 class BinAssignExp;
  214 class CompileExp;
  215 class ImportExp;
  216 class AssertExp;
  217 class DotIdExp;
  218 class DotTemplateExp;
  219 class DotVarExp;
  220 class DotTemplateInstanceExp;
  221 class DelegateExp;
  222 class DotTypeExp;
  223 class CallExp;
  224 class AddrExp;
  225 class PtrExp;
  226 class NegExp;
  227 class UAddExp;
  228 class ComExp;
  229 class NotExp;
  230 class DeleteExp;
  231 class CastExp;
  232 class VectorExp;
  233 class VectorArrayExp;
  234 class SliceExp;
  235 class ArrayLengthExp;
  236 class IntervalExp;
  237 class DelegatePtrExp;
  238 class DelegateFuncptrExp;
  239 class ArrayExp;
  240 class DotExp;
  241 class CommaExp;
  242 class IndexExp;
  243 class PostExp;
  244 class PreExp;
  245 class AssignExp;
  246 class ConstructExp;
  247 class BlitExp;
  248 class AddAssignExp;
  249 class MinAssignExp;
  250 class MulAssignExp;
  251 class DivAssignExp;
  252 class ModAssignExp;
  253 class AndAssignExp;
  254 class OrAssignExp;
  255 class XorAssignExp;
  256 class PowAssignExp;
  257 class ShlAssignExp;
  258 class ShrAssignExp;
  259 class UshrAssignExp;
  260 class CatAssignExp;
  261 class AddExp;
  262 class MinExp;
  263 class CatExp;
  264 class MulExp;
  265 class DivExp;
  266 class ModExp;
  267 class PowExp;
  268 class ShlExp;
  269 class ShrExp;
  270 class UshrExp;
  271 class AndExp;
  272 class OrExp;
  273 class XorExp;
  274 class LogicalExp;
  275 class CmpExp;
  276 class InExp;
  277 class RemoveExp;
  278 class EqualExp;
  279 class IdentityExp;
  280 class CondExp;
  281 class DefaultInitExp;
  282 class FileInitExp;
  283 class LineInitExp;
  284 class ModuleInitExp;
  285 class FuncInitExp;
  286 class PrettyFuncInitExp;
  287 class ClassReferenceExp;
  288 class VoidInitExp;
  289 class ThrownExceptionExp;
  290 
  291 class TemplateParameter;
  292 class TemplateTypeParameter;
  293 class TemplateThisParameter;
  294 class TemplateValueParameter;
  295 class TemplateAliasParameter;
  296 class TemplateTupleParameter;
  297 
  298 class Condition;
  299 class DVCondition;
  300 class DebugCondition;
  301 class VersionCondition;
  302 class StaticIfCondition;
  303 
  304 class Parameter;
  305 
  306 class ParseTimeVisitor
  307 {
  308 public:
  309     virtual void visit(Dsymbol *) { assert(0); }
  310     virtual void visit(Parameter *) { assert(0); }
  311     virtual void visit(Statement *) { assert(0); }
  312     virtual void visit(Type *) { assert(0); }
  313     virtual void visit(Expression *) { assert(0); }
  314     virtual void visit(TemplateParameter *) { assert(0); }
  315     virtual void visit(Condition *) { assert(0); }
  316     virtual void visit(Initializer *) { assert(0); }
  317 
  318     // Dsymbols
  319     virtual void visit(AliasThis *s) { visit((Dsymbol *)s); }
  320     virtual void visit(Declaration *s) { visit((Dsymbol *)s); }
  321     virtual void visit(ScopeDsymbol *s) { visit((Dsymbol *)s); }
  322     virtual void visit(Import *s) { visit((Dsymbol *)s); }
  323     virtual void visit(AttribDeclaration *s) { visit((Dsymbol *)s); }
  324     virtual void visit(StaticAssert *s) { visit((Dsymbol *)s); }
  325     virtual void visit(DebugSymbol *s) { visit((Dsymbol *)s); }
  326     virtual void visit(VersionSymbol *s) { visit((Dsymbol *)s); }
  327 
  328     // ScopeDsymbols
  329     virtual void visit(Package *s) { visit((ScopeDsymbol *)s); }
  330     virtual void visit(EnumDeclaration *s) { visit((ScopeDsymbol *)s); }
  331     virtual void visit(AggregateDeclaration *s) { visit((ScopeDsymbol *)s); }
  332     virtual void visit(TemplateDeclaration *s) { visit((ScopeDsymbol *)s); }
  333     virtual void visit(TemplateInstance *s) { visit((ScopeDsymbol *)s); }
  334     virtual void visit(Nspace *s) { visit((ScopeDsymbol *)s); }
  335 
  336     // Declarations
  337     virtual void visit(VarDeclaration *s) { visit((Declaration *)s); }
  338     virtual void visit(FuncDeclaration *s) { visit((Declaration *)s); }
  339     virtual void visit(AliasDeclaration *s) { visit((Declaration *)s); }
  340     virtual void visit(TupleDeclaration *s) { visit((Declaration *)s); }
  341 
  342     // FuncDeclarations
  343     virtual void visit(FuncLiteralDeclaration *s) { visit((FuncDeclaration *)s); }
  344     virtual void visit(PostBlitDeclaration *s) { visit((FuncDeclaration *)s); }
  345     virtual void visit(CtorDeclaration *s) { visit((FuncDeclaration *)s); }
  346     virtual void visit(DtorDeclaration *s) { visit((FuncDeclaration *)s); }
  347     virtual void visit(InvariantDeclaration *s) { visit((FuncDeclaration *)s); }
  348     virtual void visit(UnitTestDeclaration *s) { visit((FuncDeclaration *)s); }
  349     virtual void visit(NewDeclaration *s) { visit((FuncDeclaration *)s); }
  350     virtual void visit(StaticCtorDeclaration *s) { visit((FuncDeclaration *)s); }
  351     virtual void visit(StaticDtorDeclaration *s) { visit((FuncDeclaration *)s); }
  352     virtual void visit(SharedStaticCtorDeclaration *s) { visit((StaticCtorDeclaration *)s); }
  353     virtual void visit(SharedStaticDtorDeclaration *s) { visit((StaticDtorDeclaration *)s); }
  354 
  355     // AttribDeclarations
  356     virtual void visit(CompileDeclaration *s) { visit((AttribDeclaration *)s); }
  357     virtual void visit(UserAttributeDeclaration *s) { visit((AttribDeclaration *)s); }
  358     virtual void visit(LinkDeclaration *s) { visit((AttribDeclaration *)s); }
  359     virtual void visit(AnonDeclaration *s) { visit((AttribDeclaration *)s); }
  360     virtual void visit(AlignDeclaration *s) { visit((AttribDeclaration *)s); }
  361     virtual void visit(CPPMangleDeclaration *s) { visit((AttribDeclaration *)s); }
  362     virtual void visit(CPPNamespaceDeclaration *s) { visit((AttribDeclaration *)s); }
  363     virtual void visit(ProtDeclaration *s) { visit((AttribDeclaration *)s); }
  364     virtual void visit(PragmaDeclaration *s) { visit((AttribDeclaration *)s); }
  365     virtual void visit(StorageClassDeclaration *s) { visit((AttribDeclaration *)s); }
  366     virtual void visit(ConditionalDeclaration *s) { visit((AttribDeclaration *)s); }
  367     virtual void visit(StaticForeachDeclaration *s) { visit((AttribDeclaration *)s); }
  368 
  369     // Miscellaneous
  370     virtual void visit(DeprecatedDeclaration *s) { visit((StorageClassDeclaration *)s); }
  371     virtual void visit(StaticIfDeclaration *s) { visit((ConditionalDeclaration *)s); }
  372     virtual void visit(EnumMember *s) { visit((VarDeclaration *)s); }
  373     virtual void visit(Module *s) { visit((Package *)s); }
  374     virtual void visit(StructDeclaration *s) { visit((AggregateDeclaration *)s); }
  375     virtual void visit(UnionDeclaration *s) { visit((StructDeclaration *)s); }
  376     virtual void visit(ClassDeclaration *s) { visit((AggregateDeclaration *)s); }
  377     virtual void visit(InterfaceDeclaration *s) { visit((ClassDeclaration *)s); }
  378     virtual void visit(TemplateMixin *s) { visit((TemplateInstance *)s); }
  379 
  380     // Statements
  381     virtual void visit(ImportStatement *s) { visit((Statement *)s); }
  382     virtual void visit(ScopeStatement *s) { visit((Statement *)s); }
  383     virtual void visit(ReturnStatement *s) { visit((Statement *)s); }
  384     virtual void visit(LabelStatement *s) { visit((Statement *)s); }
  385     virtual void visit(StaticAssertStatement *s) { visit((Statement *)s); }
  386     virtual void visit(CompileStatement *s) { visit((Statement *)s); }
  387     virtual void visit(WhileStatement *s) { visit((Statement *)s); }
  388     virtual void visit(ForStatement *s) { visit((Statement *)s); }
  389     virtual void visit(DoStatement *s) { visit((Statement *)s); }
  390     virtual void visit(ForeachRangeStatement *s) { visit((Statement *)s); }
  391     virtual void visit(ForeachStatement *s) { visit((Statement *)s); }
  392     virtual void visit(IfStatement *s) { visit((Statement *)s); }
  393     virtual void visit(ScopeGuardStatement *s) { visit((Statement *)s); }
  394     virtual void visit(ConditionalStatement *s) { visit((Statement *)s); }
  395     virtual void visit(StaticForeachStatement *s) { visit((Statement *)s); }
  396     virtual void visit(PragmaStatement *s) { visit((Statement *)s); }
  397     virtual void visit(SwitchStatement *s) { visit((Statement *)s); }
  398     virtual void visit(CaseRangeStatement *s) { visit((Statement *)s); }
  399     virtual void visit(CaseStatement *s) { visit((Statement *)s); }
  400     virtual void visit(DefaultStatement *s) { visit((Statement *)s); }
  401     virtual void visit(BreakStatement *s) { visit((Statement *)s); }
  402     virtual void visit(ContinueStatement *s) { visit((Statement *)s); }
  403     virtual void visit(GotoDefaultStatement *s) { visit((Statement *)s); }
  404     virtual void visit(GotoCaseStatement *s) { visit((Statement *)s); }
  405     virtual void visit(GotoStatement *s) { visit((Statement *)s); }
  406     virtual void visit(SynchronizedStatement *s) { visit((Statement *)s); }
  407     virtual void visit(WithStatement *s) { visit((Statement *)s); }
  408     virtual void visit(TryCatchStatement *s) { visit((Statement *)s); }
  409     virtual void visit(TryFinallyStatement *s) { visit((Statement *)s); }
  410     virtual void visit(ThrowStatement *s) { visit((Statement *)s); }
  411     virtual void visit(AsmStatement *s) { visit((Statement *)s); }
  412     virtual void visit(ExpStatement *s) { visit((Statement *)s); }
  413     virtual void visit(CompoundStatement *s) { visit((Statement *)s); }
  414 
  415     // CompoundStatements
  416     virtual void visit(CompoundDeclarationStatement *s) { visit((CompoundStatement *)s); }
  417     virtual void visit(CompoundAsmStatement *s) { visit((CompoundStatement *)s); }
  418 
  419     // AsmStatements
  420     virtual void visit(InlineAsmStatement *s) { visit((AsmStatement *)s); }
  421     virtual void visit(GccAsmStatement *s) { visit((AsmStatement *)s); }
  422 
  423     // Types
  424     virtual void visit(TypeBasic *t) { visit((Type *)t); }
  425     virtual void visit(TypeError *t) { visit((Type *)t); }
  426     virtual void visit(TypeNull *t) { visit((Type *)t); }
  427     virtual void visit(TypeVector *t) { visit((Type *)t); }
  428     virtual void visit(TypeEnum *t) { visit((Type *)t); }
  429     virtual void visit(TypeTuple *t) { visit((Type *)t); }
  430     virtual void visit(TypeClass *t) { visit((Type *)t); }
  431     virtual void visit(TypeStruct *t) { visit((Type *)t); }
  432     virtual void visit(TypeNext *t) { visit((Type *)t); }
  433     virtual void visit(TypeQualified *t) { visit((Type *)t); }
  434     virtual void visit(TypeTraits *t) { visit((Type *)t); }
  435     virtual void visit(TypeMixin *t) { visit((Type *)t); }
  436 
  437     // TypeNext
  438     virtual void visit(TypeReference *t) { visit((TypeNext *)t); }
  439     virtual void visit(TypeSlice *t) { visit((TypeNext *)t); }
  440     virtual void visit(TypeDelegate *t) { visit((TypeNext *)t); }
  441     virtual void visit(TypePointer *t) { visit((TypeNext *)t); }
  442     virtual void visit(TypeFunction *t) { visit((TypeNext *)t); }
  443     virtual void visit(TypeArray *t) { visit((TypeNext *)t); }
  444 
  445     // TypeArray
  446     virtual void visit(TypeDArray *t) { visit((TypeArray *)t); }
  447     virtual void visit(TypeAArray *t) { visit((TypeArray *)t); }
  448     virtual void visit(TypeSArray *t) { visit((TypeArray *)t); }
  449 
  450     // TypeQualified
  451     virtual void visit(TypeIdentifier *t) { visit((TypeQualified *)t); }
  452     virtual void visit(TypeReturn *t) { visit((TypeQualified *)t); }
  453     virtual void visit(TypeTypeof *t) { visit((TypeQualified *)t); }
  454     virtual void visit(TypeInstance *t) { visit((TypeQualified *)t); }
  455 
  456     // Expressions
  457     virtual void visit(DeclarationExp *e) { visit((Expression *)e); }
  458     virtual void visit(IntegerExp *e) { visit((Expression *)e); }
  459     virtual void visit(NewAnonClassExp *e) { visit((Expression *)e); }
  460     virtual void visit(IsExp *e) { visit((Expression *)e); }
  461     virtual void visit(RealExp *e) { visit((Expression *)e); }
  462     virtual void visit(NullExp *e) { visit((Expression *)e); }
  463     virtual void visit(TypeidExp *e) { visit((Expression *)e); }
  464     virtual void visit(TraitsExp *e) { visit((Expression *)e); }
  465     virtual void visit(StringExp *e) { visit((Expression *)e); }
  466     virtual void visit(NewExp *e) { visit((Expression *)e); }
  467     virtual void visit(AssocArrayLiteralExp *e) { visit((Expression *)e); }
  468     virtual void visit(ArrayLiteralExp *e) { visit((Expression *)e); }
  469     virtual void visit(CompileExp *e) { visit((Expression *)e); }
  470     virtual void visit(FuncExp *e) { visit((Expression *)e); }
  471     virtual void visit(IntervalExp *e) { visit((Expression *)e); }
  472     virtual void visit(TypeExp *e) { visit((Expression *)e); }
  473     virtual void visit(ScopeExp *e) { visit((Expression *)e); }
  474     virtual void visit(IdentifierExp *e) { visit((Expression *)e); }
  475     virtual void visit(UnaExp *e) { visit((Expression *)e); }
  476     virtual void visit(DefaultInitExp *e) { visit((Expression *)e); }
  477     virtual void visit(BinExp *e) { visit((Expression *)e); }
  478     virtual void visit(DsymbolExp *e) { visit((Expression *)e); }
  479     virtual void visit(TemplateExp *e) { visit((Expression *)e); }
  480     virtual void visit(SymbolExp *e) { visit((Expression *)e); }
  481     virtual void visit(TupleExp *e) { visit((Expression *)e); }
  482     virtual void visit(ThisExp *e) { visit((Expression *)e); }
  483 
  484     // Miscellaneous
  485     virtual void visit(VarExp *e) { visit((SymbolExp *)e); }
  486     virtual void visit(DollarExp *e) { visit((IdentifierExp *)e); }
  487     virtual void visit(SuperExp *e) { visit((ThisExp *)e); }
  488 
  489     // UnaExp
  490     virtual void visit(AddrExp *e) { visit((UnaExp *)e); }
  491     virtual void visit(PreExp *e) { visit((UnaExp *)e); }
  492     virtual void visit(PtrExp *e) { visit((UnaExp *)e); }
  493     virtual void visit(NegExp *e) { visit((UnaExp *)e); }
  494     virtual void visit(UAddExp *e) { visit((UnaExp *)e); }
  495     virtual void visit(NotExp *e) { visit((UnaExp *)e); }
  496     virtual void visit(ComExp *e) { visit((UnaExp *)e); }
  497     virtual void visit(DeleteExp *e) { visit((UnaExp *)e); }
  498     virtual void visit(CastExp *e) { visit((UnaExp *)e); }
  499     virtual void visit(CallExp *e) { visit((UnaExp *)e); }
  500     virtual void visit(DotIdExp *e) { visit((UnaExp *)e); }
  501     virtual void visit(AssertExp *e) { visit((UnaExp *)e); }
  502     virtual void visit(ImportExp *e) { visit((UnaExp *)e); }
  503     virtual void visit(DotTemplateInstanceExp *e) { visit((UnaExp *)e); }
  504     virtual void visit(ArrayExp *e) { visit((UnaExp *)e); }
  505 
  506     // DefaultInitExp
  507     virtual void visit(FuncInitExp *e) { visit((DefaultInitExp *)e); }
  508     virtual void visit(PrettyFuncInitExp *e) { visit((DefaultInitExp *)e); }
  509     virtual void visit(FileInitExp *e) { visit((DefaultInitExp *)e); }
  510     virtual void visit(LineInitExp *e) { visit((DefaultInitExp *)e); }
  511     virtual void visit(ModuleInitExp *e) { visit((DefaultInitExp *)e); }
  512 
  513     // BinExp
  514     virtual void visit(CommaExp *e) { visit((BinExp *)e); }
  515     virtual void visit(PostExp *e) { visit((BinExp *)e); }
  516     virtual void visit(PowExp *e) { visit((BinExp *)e); }
  517     virtual void visit(MulExp *e) { visit((BinExp *)e); }
  518     virtual void visit(DivExp *e) { visit((BinExp *)e); }
  519     virtual void visit(ModExp *e) { visit((BinExp *)e); }
  520     virtual void visit(AddExp *e) { visit((BinExp *)e); }
  521     virtual void visit(MinExp *e) { visit((BinExp *)e); }
  522     virtual void visit(CatExp *e) { visit((BinExp *)e); }
  523     virtual void visit(ShlExp *e) { visit((BinExp *)e); }
  524     virtual void visit(ShrExp *e) { visit((BinExp *)e); }
  525     virtual void visit(UshrExp *e) { visit((BinExp *)e); }
  526     virtual void visit(EqualExp *e) { visit((BinExp *)e); }
  527     virtual void visit(InExp *e) { visit((BinExp *)e); }
  528     virtual void visit(IdentityExp *e) { visit((BinExp *)e); }
  529     virtual void visit(CmpExp *e) { visit((BinExp *)e); }
  530     virtual void visit(AndExp *e) { visit((BinExp *)e); }
  531     virtual void visit(XorExp *e) { visit((BinExp *)e); }
  532     virtual void visit(OrExp *e) { visit((BinExp *)e); }
  533     virtual void visit(LogicalExp *e) { visit((BinExp *)e); }
  534     virtual void visit(CondExp *e) { visit((BinExp *)e); }
  535     virtual void visit(AssignExp *e) { visit((BinExp *)e); }
  536     virtual void visit(BinAssignExp *e) { visit((BinExp *)e); }
  537 
  538     // BinAssignExp
  539     virtual void visit(AddAssignExp *e) { visit((BinAssignExp *)e); }
  540     virtual void visit(MinAssignExp *e) { visit((BinAssignExp *)e); }
  541     virtual void visit(MulAssignExp *e) { visit((BinAssignExp *)e); }
  542     virtual void visit(DivAssignExp *e) { visit((BinAssignExp *)e); }
  543     virtual void visit(ModAssignExp *e) { visit((BinAssignExp *)e); }
  544     virtual void visit(PowAssignExp *e) { visit((BinAssignExp *)e); }
  545     virtual void visit(AndAssignExp *e) { visit((BinAssignExp *)e); }
  546     virtual void visit(OrAssignExp *e) { visit((BinAssignExp *)e); }
  547     virtual void visit(XorAssignExp *e) { visit((BinAssignExp *)e); }
  548     virtual void visit(ShlAssignExp *e) { visit((BinAssignExp *)e); }
  549     virtual void visit(ShrAssignExp *e) { visit((BinAssignExp *)e); }
  550     virtual void visit(UshrAssignExp *e) { visit((BinAssignExp *)e); }
  551     virtual void visit(CatAssignExp *e) { visit((BinAssignExp *)e); }
  552 
  553     // TemplateParameter
  554     virtual void visit(TemplateAliasParameter *tp) { visit((TemplateParameter *)tp); }
  555     virtual void visit(TemplateTypeParameter *tp) { visit((TemplateParameter *)tp); }
  556     virtual void visit(TemplateTupleParameter *tp) { visit((TemplateParameter *)tp); }
  557     virtual void visit(TemplateValueParameter *tp) { visit((TemplateParameter *)tp); }
  558 
  559     virtual void visit(TemplateThisParameter *tp) { visit((TemplateTypeParameter *)tp); }
  560 
  561     // Condition
  562     virtual void visit(StaticIfCondition *c) { visit((Condition *)c); }
  563     virtual void visit(DVCondition *c) { visit((Condition *)c); }
  564     virtual void visit(DebugCondition *c) { visit((DVCondition *)c); }
  565     virtual void visit(VersionCondition *c) { visit((DVCondition *)c); }
  566 
  567     // Initializer
  568     virtual void visit(ExpInitializer *i) { visit((Initializer *)i); }
  569     virtual void visit(StructInitializer *i) { visit((Initializer *)i); }
  570     virtual void visit(ArrayInitializer *i) { visit((Initializer *)i); }
  571     virtual void visit(VoidInitializer *i) { visit((Initializer *)i); }
  572 };
  573 
  574 class Visitor : public ParseTimeVisitor
  575 {
  576 public:
  577     using ParseTimeVisitor::visit;
  578 
  579     // Miscellaneous
  580     virtual void visit(ErrorStatement *s) { visit((Statement *)s); }
  581     virtual void visit(PeelStatement *s) { visit((Statement *)s); }
  582     virtual void visit(UnrolledLoopStatement *s) { visit((Statement *)s); }
  583     virtual void visit(SwitchErrorStatement *s) { visit((Statement *)s); }
  584     virtual void visit(DebugStatement *s) { visit((Statement *)s); }
  585     virtual void visit(DtorExpStatement *s) { visit((ExpStatement *)s); }
  586     virtual void visit(ForwardingStatement *s) { visit((Statement *)s); }
  587     virtual void visit(OverloadSet *s) { visit((Dsymbol *)s); }
  588     virtual void visit(LabelDsymbol *s) { visit((Dsymbol *)s); }
  589     virtual void visit(WithScopeSymbol *s) { visit((ScopeDsymbol *)s); }
  590     virtual void visit(ArrayScopeSymbol *s) { visit((ScopeDsymbol *)s); }
  591     virtual void visit(OverDeclaration *s) { visit((Declaration *)s); }
  592     virtual void visit(SymbolDeclaration *s) { visit((Declaration *)s); }
  593     virtual void visit(ForwardingAttribDeclaration *s) { visit((AttribDeclaration *)s); }
  594     virtual void visit(ThisDeclaration *s) { visit((VarDeclaration *)s); }
  595     virtual void visit(TypeInfoDeclaration *s) { visit((VarDeclaration *)s); }
  596     virtual void visit(TypeInfoStructDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  597     virtual void visit(TypeInfoClassDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  598     virtual void visit(TypeInfoInterfaceDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  599     virtual void visit(TypeInfoPointerDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  600     virtual void visit(TypeInfoArrayDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  601     virtual void visit(TypeInfoStaticArrayDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  602     virtual void visit(TypeInfoAssociativeArrayDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  603     virtual void visit(TypeInfoEnumDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  604     virtual void visit(TypeInfoFunctionDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  605     virtual void visit(TypeInfoDelegateDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  606     virtual void visit(TypeInfoTupleDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  607     virtual void visit(TypeInfoConstDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  608     virtual void visit(TypeInfoInvariantDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  609     virtual void visit(TypeInfoSharedDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  610     virtual void visit(TypeInfoWildDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  611     virtual void visit(TypeInfoVectorDeclaration *s) { visit((TypeInfoDeclaration *)s); }
  612     virtual void visit(FuncAliasDeclaration *s) { visit((FuncDeclaration *)s); }
  613     virtual void visit(ErrorInitializer *i) { visit((Initializer *)i); }
  614     virtual void visit(ErrorExp *e) { visit((Expression *)e); }
  615     virtual void visit(ComplexExp *e) { visit((Expression *)e); }
  616     virtual void visit(StructLiteralExp *e) { visit((Expression *)e); }
  617     virtual void visit(ObjcClassReferenceExp *e) { visit((Expression *)e); }
  618     virtual void visit(SymOffExp *e) { visit((SymbolExp *)e); }
  619     virtual void visit(OverExp *e) { visit((Expression *)e); }
  620     virtual void visit(HaltExp *e) { visit((Expression *)e); }
  621     virtual void visit(DotTemplateExp *e) { visit((UnaExp *)e); }
  622     virtual void visit(DotVarExp *e) { visit((UnaExp *)e); }
  623     virtual void visit(DelegateExp *e) { visit((UnaExp *)e); }
  624     virtual void visit(DotTypeExp *e) { visit((UnaExp *)e); }
  625     virtual void visit(VectorExp *e) { visit((UnaExp *)e); }
  626     virtual void visit(VectorArrayExp *e) { visit((UnaExp *)e); }
  627     virtual void visit(SliceExp *e) { visit((UnaExp *)e); }
  628     virtual void visit(ArrayLengthExp *e) { visit((UnaExp *)e); }
  629     virtual void visit(DelegatePtrExp *e) { visit((UnaExp *)e); }
  630     virtual void visit(DelegateFuncptrExp *e) { visit((UnaExp *)e); }
  631     virtual void visit(DotExp *e) { visit((BinExp *)e); }
  632     virtual void visit(IndexExp *e) { visit((BinExp *)e); }
  633     virtual void visit(ConstructExp *e) { visit((AssignExp *)e); }
  634     virtual void visit(BlitExp *e) { visit((AssignExp *)e); }
  635     virtual void visit(RemoveExp *e) { visit((BinExp *)e); }
  636     virtual void visit(ClassReferenceExp *e) { visit((Expression *)e); }
  637     virtual void visit(VoidInitExp *e) { visit((Expression *)e); }
  638     virtual void visit(ThrownExceptionExp *e) { visit((Expression *)e); }
  639 };
  640 
  641 class StoppableVisitor : public Visitor
  642 {
  643 public:
  644     bool stop;
  645     StoppableVisitor() : stop(false) {}
  646 };