Ignore:
Timestamp:
Apr 27, 2023, 3:13:24 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT
Children:
561354f
Parents:
b110bcc
Message:

Save progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.h

    rb110bcc r28f8f15  
    7676        static DeclarationNode * newStaticAssert( ExpressionNode * condition, ast::Expr * message );
    7777
     78        // Experimental algebric data type
     79        static DeclarationNode * newADT( const std::string * name, DeclarationNode * constructors );
     80        static DeclarationNode * newDataConstructor( const std::string * name );
     81        // static DeclarationNode * newDataConstructor( const std::string * name, DeclarationNode * typeSpecifiers );
     82
    7883        DeclarationNode();
    7984        ~DeclarationNode();
     
    156161        ExpressionNode * bitfieldWidth = nullptr;
    157162        std::unique_ptr<ExpressionNode> enumeratorValue;
     163
    158164        bool hasEllipsis = false;
    159165        ast::Linkage::Spec linkage;
     
    210216void buildList( DeclarationNode * firstNode, std::vector<ast::ptr<ast::DeclWithType>> & outputList );
    211217void buildTypeList( const DeclarationNode * firstNode, std::vector<ast::ptr<ast::Type>> & outputList );
     218void buildDataConstructors( DeclarationNode * firstNode, std::vector<ast::ptr<ast::StructDecl>> & outputList );
     219ast::UnionDecl * buildDataUnion( ast::EnumDecl * data, const std::vector<ast::ptr<ast::StructDecl>> & typeList );
     220ast::EnumDecl * buildTag( ast::EnumDecl * data, const std::vector<ast::ptr<ast::StructDecl>> & typeList );
     221ast::StructDecl * buildTaggedUnions( const ast::EnumDecl * data, const ast::EnumDecl * tags, const ast::UnionDecl * data_union );
    212222
    213223template<typename AstType, typename NodeType,
Note: See TracChangeset for help on using the changeset viewer.