SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2015 v20 Beta Discussion => Topic started by: warnerrs on October 29, 2015, 10:11:50 PM

Title: RC3 SystemVerilog macro beautification
Post by: warnerrs on October 29, 2015, 10:11:50 PM
Very common in SystemVerilog is defining classes in macros like this:

Code: [Select]
    `define rvm_export_suffix( SUFFIX )                                               \
    class rvm_export``SUFFIX#( type TARGET=rvm_export_base ) extends rvm_export_base; \
        function new(string name = "", rvm_component parent = null);                  \
            super.new(name,parent);                                                   \
        endfunction                                                                   \
        virtual function void write( rvm_object obj );                                \
            TARGET tgt;                                                               \
            $cast(tgt, m_parent);                                                     \
            tgt.write``SUFFIX( obj );                                                 \
        endfunction                                                                   \
    endclass

After beautification, it looks like this:

Code: [Select]
    `define rvm_export_suffix( SUFFIX )                                               \
    class rvm_export``SUFFIX#( type TARGET=rvm_export_base ) extends rvm_export_base; \
    function new(string name = "", rvm_component parent = null);                  \
    super.new(name,parent);                                                   \
    endfunction                                                                   \
    virtual function void write( rvm_object obj );                                \
    TARGET tgt;                                                               \
    $cast(tgt, m_parent);                                                     \
    tgt.write``SUFFIX( obj );                                                 \
    endfunction                                                                   \
    endclass
Title: Re: RC3 SystemVerilog macro beautification
Post by: patrick on October 30, 2015, 01:59:26 PM
Reproduced, I'll take a look at it. 
Title: Re: RC3 SystemVerilog macro beautification
Post by: patrick on November 04, 2015, 02:42:09 PM
Fixed in rc5.