forked from jeremiah-c-leary/vhdl-style-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrule_403.py
More file actions
40 lines (27 loc) · 958 Bytes
/
rule_403.py
File metadata and controls
40 lines (27 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
from vsg.rules import multiline_structure as Rule
from vsg.token import variable_declaration as token
lTokenPairs = []
lTokenPairs.append([token.assignment_operator, token.semicolon])
class rule_403(Rule):
"""
This rule checks the structure of multiline variable initializations that contain arrays.
|configuring_array_multiline_structure_rules_link|
.. NOTE:: The indenting of multiline array variables is handled by the rule `variable_402 <variable_rules.html#variable-402>`_.
**Violation**
.. code-block:: vhdl
variable rom : romq_type := (0, 65535, 32768);
**Fix**
.. code-block:: vhdl
variable rom : romq_type :=
(
0,
65535,
32768
);
"""
def __init__(self):
super().__init__(lTokenPairs)
self.assignment_operator = token.assignment_operator
self.semicolon = token.semicolon
self.phase = 5