38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
from vsg import parser, token
|
|
from vsg.rules import remove_lines_starting_with_token_between_token_pairs
|
|
|
|
lTokens = []
|
|
lTokens.append([token.simple_release_assignment.assignment, token.simple_release_assignment.semicolon])
|
|
lTokens.append([token.simple_force_assignment.assignment, token.simple_force_assignment.semicolon])
|
|
lTokens.append([token.simple_waveform_assignment.assignment, token.simple_waveform_assignment.semicolon])
|
|
|
|
oRemoveToken = parser.comment
|
|
|
|
|
|
class rule_006(remove_lines_starting_with_token_between_token_pairs):
|
|
"""
|
|
This rule checks for comments within multiline sequential statements.
|
|
|
|
**Violation**
|
|
|
|
.. code-block:: vhdl
|
|
|
|
overflow <= wr_en and
|
|
-- rd_address(0)
|
|
rd_en;
|
|
|
|
**Fix**
|
|
|
|
.. code-block:: vhdl
|
|
|
|
overflow <= wr_en and
|
|
rd_en;
|
|
"""
|
|
|
|
def __init__(self):
|
|
super().__init__(oRemoveToken, lTokens)
|
|
self.solution = "Remove comments inside sequential assignment"
|
|
self.fixable = False
|