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

Wrong indent on 'typedef' and 'virtual class' #928

Closed
veripoolbot opened this issue Jun 5, 2015 · 3 comments
Closed

Wrong indent on 'typedef' and 'virtual class' #928

veripoolbot opened this issue Jun 5, 2015 · 3 comments
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Enzo Chi
Original Redmine Issue: 928 from https://www.veripool.org
Original Date: 2015-06-05
Original Assignee: Alex Reed


I got a file from Cadence and the indent for it is quite wrong. I am not good enough to figure out the cause so I just attach the file.

The indent start to get wrong from line 38 and 39, also line 47, 48. The list goes on and on.

My Environment:
Ubuntu 14.04
Emacs 25.1
Verilog-mode (master: 8e560c2)

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Kaushal Modi
Original Date: 2015-06-22T15:50:28Z


It looks like the @pure@ keyword is messing up the indentation.

       // this basically is a proxy to handle which applies the msg to the core process
       virtual class uvm_thread_handle_proxy extends uvm_object;
          pure virtual task apply(uvm_thread_notification_t what, process pid);
    function new(string name="");
       super.new(name);
    endfunction
endclass // uvm_thread_handle_proxy

If I remove the @pure@ keyword, indentation works fine.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Alex Reed
Original Date: 2015-06-26T22:06:15Z


Partially resolved in 56fe426. Indentation after pure virtual methods (in abstract classes and interface, maybe other places) should now be correct.

Note that the provided test-case is still horribly indented. I don't feel comfortable committing this file to the test-suite due to copyright issues. We will need to fabricate test-cases to isolate and test the other issues in this file.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Alex Reed
Original Date: 2015-06-26T23:08:12Z


Found one more - when a typedef has an enumerated value that is a keyword with different case (e.g. TASK, Package) and possibly when verilog-case-fold is t, then the indention engine gets confused. When searching for regular expressions that match keywords, the matches need to be case-sensitive, which is the opposite of the default for emacs.

Here's the fix: 832636e

There are still indentation issues in the supplied test-case which are already known - namely nested classes (http://www.veripool.org/issues/286)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant