Changeset af746cc for src/AST/Print.cpp


Ignore:
Timestamp:
Apr 15, 2024, 12:03:53 PM (6 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
dc58e5d
Parents:
d9bad51
Message:

Reimplement the resolution of Enum instance type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    rd9bad51 raf746cc  
    15761576        }
    15771577
    1578         virtual const ast::Type * visit( const ast::EnumPosType * node ) override final {
    1579                 preprint( node );
    1580                 os << "enum pos with ";
     1578        virtual const ast::Type * visit( const ast::EnumAttrType * node ) override final {
     1579                preprint( node );
     1580                os << "enum attr ";
     1581        if ( node->attr == ast::EnumAttribute::Label ) {
     1582            os << "Label ";
     1583        } else if ( node->attr == ast::EnumAttribute::Value ) {
     1584            os << "Value ";
     1585        } else {
     1586            os << "Posn ";
     1587        }
    15811588                (*(node->instance)).accept( *this );
    15821589                return node;
Note: See TracChangeset for help on using the changeset viewer.