summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-01-31 17:39:25 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-01-31 17:39:25 (GMT)
commit098bc86187295a77b08c1e5c061ed5788aaa73ae (patch)
treef422fcd252ae4fb78687e0b2d1009196efbb3837 /src/scanner.l
parenta1474373a0be8b099a2458b9c02d19e191e457e7 (diff)
downloadDoxygen-098bc86187295a77b08c1e5c061ed5788aaa73ae.zip
Doxygen-098bc86187295a77b08c1e5c061ed5788aaa73ae.tar.gz
Doxygen-098bc86187295a77b08c1e5c061ed5788aaa73ae.tar.bz2
Bug 793052 - C#: Incorrect parsing of property definitions containing "//" symbols in one line with "}
The handling of comment signs inside a string for property definitions has been corrected, by defining parsing rules for these cases so that not the default comment handler will be used (i.e. remove the part behind the comment sign).
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index fd1568b..90e710b 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -755,6 +755,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
%x CopyHereDocEnd
%x RawString
%x RawGString
+%x CSString
%x IDLAttribute
%x IDLProp
@@ -6235,8 +6236,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<CSAccessorDecl>"add" { if (curlyCount==0) current->spec |= Entry::Addable; }
<CSAccessorDecl>"remove" { if (curlyCount==0) current->spec |= Entry::Removable; }
<CSAccessorDecl>"raise" { if (curlyCount==0) current->spec |= Entry::Raisable; }
-<CSAccessorDecl>. {}
+<CSAccessorDecl>"\"" { BEGIN(CSString);}
+<CSAccessorDecl>"." {}
<CSAccessorDecl>\n { lineCount(); }
+<CSString>"\"" { BEGIN(CSAccessorDecl);}
+<CSString>"//" {} /* Otherwise the rule <*>"//" will kick in */
+<CSString>"/*" {} /* Otherwise the rule <*>"/*" will kick in */
+<CSString>\n { lineCount(); }
+<CSString>"." {}