Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preprocessor statements break indentation. #103

Open
lewis6991 opened this issue May 19, 2016 · 3 comments
Open

Preprocessor statements break indentation. #103

lewis6991 opened this issue May 19, 2016 · 3 comments
Assignees
Milestone

Comments

@lewis6991
Copy link
Collaborator

lewis6991 commented May 19, 2016

my_module u_my_instance(
  `ifdef TEST
    .port1 (wire1),
  `endif
  .port2 (wire2)
);

  logic a; // Incorrect indentation.
@lewis6991 lewis6991 added this to the Release 3.1 milestone May 19, 2016
@lewis6991 lewis6991 self-assigned this May 19, 2016
@lewis6991
Copy link
Collaborator Author

Found another case which causes them to break:

if (`SOME_TYPE(var))
  a = b; // Incorrect indentation.

@vhda
Copy link
Owner

vhda commented Jul 1, 2016

More examples.

In the following scenarios my_function() has one extra indentation level:

  assign test = {
      3'b0
    , `ifdef SOMETHING 1'b1 `else 1'b0 `endif
  };
    my_function();

or:

  assign test = {
      3'b0
    `ifdef SOMETHING
    , 1'b1
    `endif
  };
    my_function();

@lewis6991
Copy link
Collaborator Author

I've been working on something for a while that should address this among a few other issues.

@vhda vhda assigned vhda and unassigned lewis6991 Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants