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

Imporve[indent]: to behind of delay ctrl of assignment #1883

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
my2817 marked this conversation as resolved.
Show resolved Hide resolved
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