Changeset e874605 for src/SynTree
- Timestamp:
- Oct 28, 2022, 3:11:57 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 93d2219
- Parents:
- 77de429
- Location:
- src/SynTree
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r77de429 re874605 449 449 }; 450 450 451 452 class InlineValueDecl : public DeclarationWithType { 453 typedef DeclarationWithType Parent; 454 public: 455 Type * type; 456 457 InlineValueDecl( const std::string & name, Type::StorageClasses scs, LinkageSpec::Spec linkage, Type * type, 458 const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() ); 459 InlineValueDecl( const InlineValueDecl & other ); 460 virtual ~InlineValueDecl(); 461 462 virtual Type * get_type() const override { return type; } 463 virtual void set_type(Type * newType) override { type = newType; } 464 465 static InlineValueDecl * newInlineValueDecl( const std::string & name, Type * type ); 466 467 virtual InlineValueDecl * clone() const override { return new InlineValueDecl( *this ); } 468 virtual void accept( Visitor & v ) override { v.visit( this ); } 469 virtual void accept( Visitor & v ) const override { v.visit( this ); } 470 virtual DeclarationWithType * acceptMutator( Mutator & m ) override { return m.mutate( this ); } 471 virtual void print( std::ostream & os, Indenter indent = {} ) const override; 472 virtual void printShort( std::ostream & os, Indenter indent = {} ) const override; 473 474 }; 475 451 476 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ); 452 477 -
src/SynTree/Mutator.h
r77de429 re874605 36 36 virtual DirectiveDecl * mutate( DirectiveDecl * directiveDecl ) = 0; 37 37 virtual StaticAssertDecl * mutate( StaticAssertDecl * assertDecl ) = 0; 38 virtual DeclarationWithType * mutate( InlineValueDecl * inlineValueDecl ) = 0; 38 39 39 40 virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) = 0; -
src/SynTree/SynTree.h
r77de429 re874605 38 38 class DirectiveDecl; 39 39 class StaticAssertDecl; 40 class InlineValueDecl; 40 41 41 42 class Statement; -
src/SynTree/Visitor.h
r77de429 re874605 49 49 virtual void visit( StaticAssertDecl * node ) { visit( const_cast<const StaticAssertDecl *>(node) ); } 50 50 virtual void visit( const StaticAssertDecl * assertDecl ) = 0; 51 virtual void visit( InlineValueDecl * node ) { visit( const_cast<const InlineValueDecl *>(node) ); } 52 virtual void visit( const InlineValueDecl * valueDecl ) = 0; 51 53 52 54 virtual void visit( CompoundStmt * node ) { visit( const_cast<const CompoundStmt *>(node) ); } -
src/SynTree/module.mk
r77de429 re874605 42 42 SynTree/Initializer.cc \ 43 43 SynTree/Initializer.h \ 44 SynTree/InlineValueDecl.cc \ 44 45 SynTree/Label.h \ 45 46 SynTree/LinkageSpec.cc \
Note:
See TracChangeset
for help on using the changeset viewer.