Skip to content

Commit

Permalink
Imporve[indent]: to behind of delay ctrl of assignment
Browse files Browse the repository at this point in the history
Apply suggestions from code review

delay control of assignment can be the format of "#[ \t]*[0-9]+"

Co-authored-by: Wilson Snyder <[email protected]>

fix[indent]: indent_delay_assignment.v of tests_ok
  • Loading branch information
my2817 committed Nov 7, 2024
1 parent 85d8429 commit 58da0e5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
14 changes: 14 additions & 0 deletions tests/indent_delay_assignment.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module a();
always(*)begin
a = #1 b |
c |
d;
a <= #1 b |
c |
d;
a <= # 1 b |
c |
d;

end
endmodule
14 changes: 14 additions & 0 deletions tests_ok/indent_delay_assignment.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module a();
always(*)begin
a = #1 b |
c |
d;
a <= #1 b |
c |
d;
a <= # 1 b |
c |
d;

end
endmodule
2 changes: 1 addition & 1 deletion verilog-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -7242,7 +7242,7 @@ Only look at a few lines to determine indent level."
(verilog-beg-of-statement-1)
(let ((val
(if (and (< (point) here)
(verilog-re-search-forward "=[ \t]*" here 'move)
(verilog-re-search-forward "=[ \t]*\\(#[ \t]*[0-9]+[ \t]*\\)?" here 'move)
;; not at a |=>, #=#, or [=n] operator
(not (string-match "\\[=.\\|#=#\\||=>"
(or (buffer-substring
Expand Down

0 comments on commit 58da0e5

Please sign in to comment.