summaryrefslogtreecommitdiffstats
path: root/src/vhdlscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdlscanner.l')
-rw-r--r--src/vhdlscanner.l4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l
index eb435b5..cedf780 100644
--- a/src/vhdlscanner.l
+++ b/src/vhdlscanner.l
@@ -1426,6 +1426,10 @@ ALLID [^;()\t ]
line=line.left(pos);
}
comment.stripWhiteSpace();
+ // must subtract "(" and ")" in comments because they are used for determining the
+ // end of a port/generic construct
+ openCount-=comment.contains('(');
+ closeCount-=comment.contains(')');
if (!comment.stripPrefix("!")) // not a special comment
{
comment.resize(0);