- Timestamp:
- May 9, 2019, 5:17:55 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 77a3f41
- Parents:
- a300e4a (diff), db27767 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Visitor.hpp
ra300e4a r3e46cc8 1 // 2 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo 3 // 4 // The contents of this file are covered under the licence agreement in the 5 // file "LICENCE" distributed with Cforall. 6 // 7 // Visitor.hpp -- Interface of a class that visits ast nodes. 8 // 9 // Author : Andrew Beach 10 // Created On : Thr May 9 15:28:00 2019 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr May 9 15:33:00 2019 13 // Update Count : 0 14 // 15 16 #pragma once 17 18 #include "Fwd.hpp" 19 20 namespace ast { 21 22 class Visitor { 23 public: 24 virtual DeclWithType * visit( const ObjectDecl * ) = 0; 25 virtual DeclWithType * visit( const FunctionDecl * ) = 0; 26 virtual Decl * visit( const StructDecl * ) = 0; 27 virtual Decl * visit( const UnionDecl * ) = 0; 28 virtual Decl * visit( const EnumDecl * ) = 0; 29 virtual Decl * visit( const TraitDecl * ) = 0; 30 virtual Decl * visit( const TypeDecl * ) = 0; 31 virtual Decl * visit( const TypedefDecl * ) = 0; 32 virtual AsmDecl * visit( const AsmDecl * ) = 0; 33 virtual StaticAssertDecl * visit( const StaticAssertDecl * ) = 0; 34 virtual CompoundStmt * visit( const CompoundStmt * ) = 0; 35 virtual Stmt * visit( const ExprStmt * ) = 0; 36 virtual Stmt * visit( const AsmStmt * ) = 0; 37 virtual Stmt * visit( const DirectiveStmt * ) = 0; 38 virtual Stmt * visit( const IfStmt * ) = 0; 39 virtual Stmt * visit( const WhileStmt * ) = 0; 40 virtual Stmt * visit( const ForStmt * ) = 0; 41 virtual Stmt * visit( const SwitchStmt * ) = 0; 42 virtual Stmt * visit( const CaseStmt * ) = 0; 43 virtual Stmt * visit( const BranchStmt * ) = 0; 44 virtual Stmt * visit( const ReturnStmt * ) = 0; 45 virtual Stmt * visit( const ThrowStmt * ) = 0; 46 virtual Stmt * visit( const TryStmt * ) = 0; 47 virtual Stmt * visit( const CatchStmt * ) = 0; 48 virtual Stmt * visit( const FinallyStmt * ) = 0; 49 virtual Stmt * visit( const WaitForStmt * ) = 0; 50 virtual Stmt * visit( const WithStmt * ) = 0; 51 virtual NullStmt * visit( const NullStmt * ) = 0; 52 virtual Stmt * visit( const DeclStmt * ) = 0; 53 virtual Stmt * visit( const ImplicitCtorDtorStmt * ) = 0; 54 virtual Expr * visit( const ApplicationExpr * ) = 0; 55 virtual Expr * visit( const UntypedExpr * ) = 0; 56 virtual Expr * visit( const NameExpr * ) = 0; 57 virtual Expr * visit( const AddressExpr * ) = 0; 58 virtual Expr * visit( const LabelAddressExpr * ) = 0; 59 virtual Expr * visit( const CastExpr * ) = 0; 60 virtual Expr * visit( const KeywordCastExpr * ) = 0; 61 virtual Expr * visit( const VirtualCastExpr * ) = 0; 62 virtual Expr * visit( const UntypedMemberExpr * ) = 0; 63 virtual Expr * visit( const MemberExpr * ) = 0; 64 virtual Expr * visit( const VariableExpr * ) = 0; 65 virtual Expr * visit( const ConstantExpr * ) = 0; 66 virtual Expr * visit( const SizeofExpr * ) = 0; 67 virtual Expr * visit( const AlignofExpr * ) = 0; 68 virtual Expr * visit( const UntypedOffsetofExpr * ) = 0; 69 virtual Expr * visit( const OffsetofExpr * ) = 0; 70 virtual Expr * visit( const OffsetPackExpr * ) = 0; 71 virtual Expr * visit( const AttrExpr * ) = 0; 72 virtual Expr * visit( const LogicalExpr * ) = 0; 73 virtual Expr * visit( const ConditionalExpr * ) = 0; 74 virtual Expr * visit( const CommaExpr * ) = 0; 75 virtual Expr * visit( const TypeExpr * ) = 0; 76 virtual Expr * visit( const AsmExpr * ) = 0; 77 virtual Expr * visit( const ImplicitCopyCtorExpr * ) = 0; 78 virtual Expr * visit( const ConstructorExpr * ) = 0; 79 virtual Expr * visit( const CompoundLiteralExpr * ) = 0; 80 virtual Expr * visit( const RangeExpr * ) = 0; 81 virtual Expr * visit( const UntypedTupleExpr * ) = 0; 82 virtual Expr * visit( const TupleExpr * ) = 0; 83 virtual Expr * visit( const TupleIndexExpr * ) = 0; 84 virtual Expr * visit( const TupleAssignExpr * ) = 0; 85 virtual Expr * visit( const StmtExpr * ) = 0; 86 virtual Expr * visit( const UniqueExpr * ) = 0; 87 virtual Expr * visit( const UntypedInitExpr * ) = 0; 88 virtual Expr * visit( const InitExpr * ) = 0; 89 virtual Expr * visit( const DeletedExpr * ) = 0; 90 virtual Expr * visit( const DefaultArgExpr * ) = 0; 91 virtual Expr * visit( const GenericExpr * ) = 0; 92 virtual Type * visit( const VoidType * ) = 0; 93 virtual Type * visit( const BasicType * ) = 0; 94 virtual Type * visit( const PointerType * ) = 0; 95 virtual Type * visit( const ArrayType * ) = 0; 96 virtual Type * visit( const ReferenceType * ) = 0; 97 virtual Type * visit( const QualifiedType * ) = 0; 98 virtual Type * visit( const FunctionType * ) = 0; 99 virtual Type * visit( const StructInstType * ) = 0; 100 virtual Type * visit( const UnionInstType * ) = 0; 101 virtual Type * visit( const EnumInstType * ) = 0; 102 virtual Type * visit( const TraitInstType * ) = 0; 103 virtual Type * visit( const TypeInstType * ) = 0; 104 virtual Type * visit( const TupleType * ) = 0; 105 virtual Type * visit( const TypeofType * ) = 0; 106 virtual Type * visit( const AttrType * ) = 0; 107 virtual Type * visit( const VarArgsType * ) = 0; 108 virtual Type * visit( const ZeroType * ) = 0; 109 virtual Type * visit( const OneType * ) = 0; 110 virtual Type * visit( const GlobalScopeType * ) = 0; 111 virtual Designation * visit( const Designation * ) = 0; 112 virtual Init * visit( const SingleInit * ) = 0; 113 virtual Init * visit( const ListInit * ) = 0; 114 virtual Init * visit( const ConstructorInit * ) = 0; 115 virtual Constant * visit( const Constant * ) = 0; 116 virtual Attribute * visit( const Attribute * ) = 0; 117 virtual TypeSubstitution * visit( const TypeSubstitution * ) = 0; 118 }; 119 120 } 121 122 // Local Variables: // 123 // tab-width: 4 // 124 // mode: c++ // 125 // compile-command: "make install" // 126 // End: //
Note: See TracChangeset
for help on using the changeset viewer.