SourceForge has been redesigned. Learn more.
Close

#277 Auto indent after macro incorrect

v1.0_(example)
closed-duplicate
nobody
None
5
2017-03-23
2013-09-02
VaughanB
No

The SVAutoIndentStrategy class does not perform any macro expansion when determining the indent level for the next line. For instance, the following indents too much, not allowing for the semi-colon in the macro definition:

~~~~~
`define d(ARG) $display(ARG);

class test_class;
task say_hello();
`d("hello") //<RETURN> here

    //  ^ cursor placed here

    `d("hello");  //<RETURN> here

// ^ cursor placed here
endtask
endclass

Discussion

  • VaughanB

    VaughanB - 2013-10-17

    In hindsight, I take this back. I think it would be preferable if there was a user-configurable option to indent or not-indent after using a macro like this. In my case, I always include semi-colons as part of the macro definition (as does UVM), but others may not. This is more of a feature request than a bug.

     
  • StevenAZ

    StevenAZ - 2017-03-23

    Hi VaughanB,

    This is probably a duplicate of "#392 Wrong indent in case of unrecognized macro". In that report I implemented a "fix" which may have solved (or at least made more palletable) the issue reported above.

    Does this code seem to be better indented than it was previously to you?

    Can/should this be closed as a duplicate of 392?

     
  • VaughanB

    VaughanB - 2017-03-23

    Just tried out the current behaviour and it seems pretty good now, so yes, this can be closed.

     
  • StevenAZ

    StevenAZ - 2017-03-23

    Closed as duplicate of 392

     
  • StevenAZ

    StevenAZ - 2017-03-23
    • status: open --> closed-duplicate
     

Log in to post a comment.