summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index fd1568b..08a5e52 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>"." {}
@@ -6611,6 +6618,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(SkipString);
}
}
+<*>\? {
+ if (insideCS)
+ {
+ if (current->type.isEmpty())
+ {
+ if (current->name.isEmpty())
+ current->name="?";
+ else
+ current->name+="?";
+ }
+ else
+ {
+ current->type+="?";
+ }
+ }
+ }
<*>.
<SkipComment>"//"|"/*"
<*>"/*" { lastCContext = YY_START ;