vhdl-style-guide/vsg/vhdlFile/classify/comment.py

12 lines
307 B
Python

import re
def comment(dVars, oLine):
# Check for comment lines
if '--' in oLine.line:
oLine.hasComment = True
oLine.commentColumn = oLine.line.find('--')
if re.match('^\s*--', oLine.line):
oLine.isComment = True
oLine.indentLevel = dVars['iCurrentIndentLevel']