- Timestamp:
- Oct 18, 2022, 9:12:19 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- c2b3243
- Parents:
- 1e30df7
- Location:
- src/AST
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/AST/Convert.cpp ¶
r1e30df7 r5408b59 310 310 node->name, 311 311 get<Attribute>().acceptL( node->attributes ), 312 false, // Temporary312 node->isTyped, 313 313 LinkageSpec::Spec( node->linkage.val ), 314 314 get<Type>().accept1(node->base) 315 315 ); 316 return aggregatePostamble( decl, node ); // Node info, including members, processed in aggregatePostamble316 return aggregatePostamble( decl, node ); 317 317 } 318 318 … … 737 737 node->name 738 738 ); 739 temp->var = get<DeclarationWithType>().accept1(node->var);740 739 auto expr = visitBaseExpr( node, 741 740 temp … … 2282 2281 } 2283 2282 2284 /// xxx - type_decl should be DeclWithType in the final design2285 /// type_decl is set to EnumDecl as a temporary fix2286 2283 virtual void visit( const QualifiedNameExpr * old ) override final { 2287 2284 this->node = visitBaseExpr( old, … … 2289 2286 old->location, 2290 2287 GET_ACCEPT_1(type_decl, Decl), 2291 GET_ACCEPT_1(var, DeclWithType),2292 2288 old->name 2293 2289 ) -
TabularUnified src/AST/Decl.hpp ¶
r1e30df7 r5408b59 315 315 class EnumDecl final : public AggregateDecl { 316 316 public: 317 bool isTyped; 318 ptr<Type> base; 317 bool isTyped; // isTyped indicated if the enum has a declaration like: 318 // enum (type_optional) Name {...} 319 ptr<Type> base; // if isTyped == true && base.get() == nullptr, it is a "void" type enum 319 320 320 321 EnumDecl( const CodeLocation& loc, const std::string& name, bool isTyped = false, -
TabularUnified src/AST/Expr.hpp ¶
r1e30df7 r5408b59 257 257 public: 258 258 ptr<Decl> type_decl; 259 ptr<DeclWithType> var;260 259 std::string name; 261 260 262 QualifiedNameExpr( const CodeLocation & loc, const Decl * d, const DeclWithType * r, conststd::string & n )263 : Expr( loc ), type_decl( d ), var(r),name( n ) {}261 QualifiedNameExpr( const CodeLocation & loc, const Decl * d, const std::string & n ) 262 : Expr( loc ), type_decl( d ), name( n ) {} 264 263 265 264 const Expr * accept( Visitor & v ) const override { return v.visit( this ); } -
TabularUnified src/AST/Pass.impl.hpp ¶
r1e30df7 r5408b59 1205 1205 if ( __visit_children() ) { 1206 1206 guard_symtab guard { *this }; 1207 maybe_accept( node, &QualifiedNameExpr::var );1208 1207 maybe_accept( node, &QualifiedNameExpr::type_decl ); 1209 1208 }
Note: See TracChangeset
for help on using the changeset viewer.