summaryrefslogtreecommitdiff
path: root/src/code.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/code.l b/src/code.l
index c2eaeed..783cf7e 100644
--- a/src/code.l
+++ b/src/code.l
@@ -15,6 +15,8 @@
*
*/
%option never-interactive
+%option prefix="codeYY"
+
%{
/*
@@ -2564,7 +2566,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
generateClassOrGlobalLink(*g_code,yytext);
g_name+=yytext;
}
-<Body>{SCOPENAME}/{BN}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
+<Body>{SCOPENAME}/{BN}*[:;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" , or int var : 5;
addType();
// changed this to generateFunctionLink, see bug 624514
//generateClassOrGlobalLink(*g_code,yytext,FALSE,TRUE);
@@ -3038,12 +3040,18 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
if (yytext[0]==')') // no a pointer cast
{
//printf("addVariable(%s,%s)\n",g_parmType.data(),g_parmName.data());
+ if (g_parmType.isEmpty())
+ {
+ g_parmType=g_parmName;
+ g_parmName.resize(0);
+ }
g_theVarContext.addVariable(g_parmType,g_parmName);
}
else
{
- g_parmType.resize(0);
+ g_parmType = g_parmName;
g_parmName.resize(0);
+ g_theVarContext.addVariable(g_parmType,g_parmName);
}
g_theCallContext.popScope();
g_inForEachExpression = FALSE;