- Timestamp:
- Feb 26, 2024, 3:49:23 AM (11 months ago)
- Branches:
- master
- Children:
- a4da45e
- Parents:
- c17dc80
- Location:
- src/AST
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Fwd.hpp
rc17dc80 r0522ebe 133 133 class OneType; 134 134 class GlobalScopeType; 135 class EnumPosType; 135 136 136 137 class Designation; -
src/AST/Pass.hpp
rc17dc80 r0522ebe 222 222 const ast::Type * visit( const ast::UnionInstType * ) override final; 223 223 const ast::Type * visit( const ast::EnumInstType * ) override final; 224 const ast::Type * visit( const ast::EnumPosType * ) override final; 224 225 const ast::Type * visit( const ast::TraitInstType * ) override final; 225 226 const ast::Type * visit( const ast::TypeInstType * ) override final; -
src/AST/Pass.impl.hpp
rc17dc80 r0522ebe 1986 1986 1987 1987 //-------------------------------------------------------------------------- 1988 // EnumPosType 1989 template< typename core_t > 1990 const ast::Type * ast::Pass< core_t >::visit( const ast::EnumPosType * node ) { 1991 VISIT_START( node ); 1992 1993 VISIT_END( Type, node ); 1994 } 1995 1996 //-------------------------------------------------------------------------- 1988 1997 // TraitInstType 1989 1998 template< typename core_t > -
src/AST/Print.cpp
rc17dc80 r0522ebe 1576 1576 } 1577 1577 1578 virtual const ast::Type * visit( const ast::EnumPosType * node ) override final { 1579 preprint( node ); 1580 os << "enum pos with "; 1581 (*(node->instance)).accept( *this ); 1582 return node; 1583 } 1584 1578 1585 virtual const ast::Type * visit( const ast::TraitInstType * node ) override final { 1579 1586 preprint( node ); -
src/AST/Type.hpp
rc17dc80 r0522ebe 362 362 using EnumInstType = SueInstType<EnumDecl>; 363 363 364 class EnumPosType final : public Type { 365 public: 366 readonly<EnumInstType> instance; 367 const Type * accept( Visitor & v ) const override { return v.visit( this ); } 368 EnumPosType( const EnumInstType * instance ): instance(instance) {} 369 370 private: 371 EnumPosType * clone() const override { return new EnumPosType{ *this }; } 372 MUTATE_FRIEND 373 }; 374 364 375 /// An instance of a trait type. 365 376 class TraitInstType final : public BaseInstType { -
src/AST/Visitor.hpp
rc17dc80 r0522ebe 119 119 virtual const ast::Type * visit( const ast::OneType * ) = 0; 120 120 virtual const ast::Type * visit( const ast::GlobalScopeType * ) = 0; 121 virtual const ast::Type * visit( const ast::EnumPosType * ) = 0; 121 122 virtual const ast::Designation * visit( const ast::Designation * ) = 0; 122 123 virtual const ast::Init * visit( const ast::SingleInit * ) = 0;
Note: See TracChangeset
for help on using the changeset viewer.