Changeset 14cebb7a for src/AST/Decl.hpp


Ignore:
Timestamp:
May 10, 2019, 9:31:29 AM (4 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
36354b1
Parents:
77a3f41
Message:

Removed trailing white-space in AST.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.hpp

    r77a3f41 r14cebb7a  
    4646        bool extension = false;
    4747
    48         Decl( const CodeLocation& loc, const std::string& name, Storage::Classes storage, 
     48        Decl( const CodeLocation& loc, const std::string& name, Storage::Classes storage,
    4949                Linkage::Spec linkage )
    5050        : ParseNode( loc ), name( name ), storage( storage ), linkage( linkage ) {}
     
    6868        /// This field is generated by SymTab::Validate::Pass2
    6969        std::string mangleName;
    70         /// Stores the scope level at which the variable was declared. 
     70        /// Stores the scope level at which the variable was declared.
    7171        /// Used to access shadowed identifiers.
    7272        int scopeLevel = 0;
     
    7777        bool isDeleted = false;
    7878
    79         DeclWithType( const CodeLocation& loc, const std::string& name, Storage::Classes storage, 
     79        DeclWithType( const CodeLocation& loc, const std::string& name, Storage::Classes storage,
    8080                Linkage::Spec linkage, std::vector<ptr<Attribute>>&& attrs, Function::Specs fs )
    81         : Decl( loc, name, storage, linkage ), mangleName(), attributes( std::move(attrs) ), 
     81        : Decl( loc, name, storage, linkage ), mangleName(), attributes( std::move(attrs) ),
    8282                funcSpec(fs), asmName() {}
    83        
     83
    8484        std::string scopedMangleName() const { return mangleName + "_" + std::to_string(scopeLevel); }
    8585
     
    102102
    103103        ObjectDecl( const CodeLocation& loc, const std::string& name, Type* type, Init* init = nullptr,
    104                 Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::C, Expr* bitWd = nullptr, 
     104                Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::C, Expr* bitWd = nullptr,
    105105                std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {})
    106         : DeclWithType( loc, name, storage, linkage, std::move(attrs), fs ), type( type ), 
     106        : DeclWithType( loc, name, storage, linkage, std::move(attrs), fs ), type( type ),
    107107          init( init ), bitfieldWidth( bitWd ) {}
    108        
     108
    109109        const Type* get_type() const override { return type; }
    110110        void set_type( Type* ty ) override { type = ty; }
     
    124124        readonly<AggregateDecl> parent = {};
    125125
    126         AggregateDecl( const CodeLocation& loc, const std::string& name, 
    127                 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall )
    128         : Decl( loc, name, Storage::Classes{}, linkage ), members(), parameters(), 
     126        AggregateDecl( const CodeLocation& loc, const std::string& name,
     127                std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall )
     128        : Decl( loc, name, Storage::Classes{}, linkage ), members(), parameters(),
    129129          attributes( std::move(attrs) ) {}
    130        
     130
    131131        AggregateDecl* set_body( bool b ) { body = b; return this; }
    132132
     
    141141        DeclarationNode::Aggregate kind;
    142142
    143         StructDecl( const CodeLocation& loc, const std::string& name, 
    144                 DeclarationNode::Aggregate kind = DeclarationNode::Struct, 
     143        StructDecl( const CodeLocation& loc, const std::string& name,
     144                DeclarationNode::Aggregate kind = DeclarationNode::Struct,
    145145                std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall )
    146146        : AggregateDecl( loc, name, std::move(attrs), linkage ), kind( kind ) {}
     
    160160class UnionDecl final : public AggregateDecl {
    161161public:
    162         UnionDecl( const CodeLocation& loc, const std::string& name, 
     162        UnionDecl( const CodeLocation& loc, const std::string& name,
    163163                std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall )
    164164        : AggregateDecl( loc, name, std::move(attrs), linkage ) {}
     
    174174class EnumDecl final : public AggregateDecl {
    175175public:
    176         EnumDecl( const CodeLocation& loc, const std::string& name, 
     176        EnumDecl( const CodeLocation& loc, const std::string& name,
    177177                std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall )
    178178        : AggregateDecl( loc, name, std::move(attrs), linkage ), enumValues() {}
     
    194194class TraitDecl final : public AggregateDecl {
    195195public:
    196         TraitDecl( const CodeLocation& loc, const std::string& name, 
     196        TraitDecl( const CodeLocation& loc, const std::string& name,
    197197                std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall )
    198198        : AggregateDecl( loc, name, std::move(attrs), linkage ) {}
Note: See TracChangeset for help on using the changeset viewer.