summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/code.l b/src/code.l
index a8ba916..ac5480c 100644
--- a/src/code.l
+++ b/src/code.l
@@ -1226,6 +1226,7 @@ static void startFontClass(const char *s)
static void writeObjCMethodCall(ObjCCallCtx *ctx)
{
if (ctx==0) return;
+ if (ctx->methodName.isEmpty()) return;
const char *p = ctx->format.data();
//printf("writeObjCMethodCall(%s) obj=%s method=%s\n",
// ctx->format.data(),ctx->objectTypeOrName.data(),ctx->methodName.data());
@@ -2418,6 +2419,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<ObjCCall,ObjCMName,ObjCSkipStr>"$" { g_currentCtx->format+="$$"; }
<ObjCCall,ObjCMName>"(" { g_currentCtx->format+=*yytext; g_braceCount++; }
<ObjCCall,ObjCMName>")" { g_currentCtx->format+=*yytext; g_braceCount--; }
+<ObjCSkipStr>"@"/"\"" { // needed to prevent matching the global rule (for C#)
+ g_currentCtx->format+=yytext;
+ }
<ObjCCall,ObjCMName,ObjCSkipStr>. { g_currentCtx->format+=*yytext; }
<ObjCCall,ObjCMName,ObjCSkipStr>\n { g_currentCtx->format+=*yytext; }