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
Streaming Operator detection #1692
Conversation
The function is called `verilog-at-streaming-op-p`. Also adds a check for streaming-op in `verilog-at-constraint-p`. (Streaming operators mistaken as constraints otherwise) This should fix veripool#1516
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this, glad to get these improvements.
Please add a test/ and test_ok/ file that checks the indentation of these.
Minor thing below.
Thanks
verilog-mode.el
Outdated
)) | ||
|
||
(defun verilog-at-streaming-op-p () | ||
"If at the { of a streaming operator, return true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If at the { of a streaming operator, return true" | |
"If at the { of a streaming operator, return t." |
(M-x checkdoc will otherwise complain if no period.)
However I wonder if this function is worth bothering with - perhaps just inline the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do make it inline, we'll be putting code that checks if something is a streaming op or not, inside a function that itself checks if something is a constraint or not. Since constraints and streaming operators are not really related, this level of abstraction helps code readability by a significant amount, IMO.
Also, I believe this function is 'fundamental' enough, that we probably will end up using it at other places too.
The function is called `verilog-at-streaming-op-p`. Also adds a check for streaming-op in `verilog-at-constraint-p`. (Streaming operators mistaken as constraints otherwise) This should fix veripool#1516
3e657c0
to
1414f5f
Compare
The particular test is taken from the issue veripool#1516. The issue has now been solved.
Thanks much for working on this. |
This PR does 2 jobs:
verilog-streaming-op-re
,verilog-at-streaming-op-p
for future use