From 44f678794f5338881620525a5e0fbe25962c7690 Mon Sep 17 00:00:00 2001 From: Adrian Negreanu Date: Thu, 11 Apr 2019 13:38:26 +0300 Subject: declinfo.l: move function declarations before --- src/declinfo.l | 79 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/src/declinfo.l b/src/declinfo.l index 653a251..ade4168 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -57,48 +57,14 @@ static bool funcTempListFound; static QCString exceptionString; static bool insideObjC; -static void addType() -{ - //printf("addType() type=`%s' scope=`%s' name=`%s'\n", - // type.data(),scope.data(),name.data()); - if (name.isEmpty() && scope.isEmpty()) return; - if (!type.isEmpty()) type+=" "; - if (!scope.isEmpty()) type+=scope+"::"; - type+=name; - scope.resize(0); - name.resize(0); -} - -static void addTypeName() -{ - //printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n", - // type.data(),scope.data(),name.data()); - if (name.isEmpty() || - name.at(name.length()-1)==':') // end of Objective-C keyword => append to name not type - { - return; - } - if (!type.isEmpty()) type+=' '; - type+=name; - name.resize(0); -} - +static void addType(); +static void addTypeName(); +static int yyread(char *buf,int max_size); + /* ----------------------------------------------------------------- */ #undef YY_INPUT #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); - -static int yyread(char *buf,int max_size) -{ - int c=0; - while( c < max_size && inputString[inputPosition] ) - { - *buf = inputString[inputPosition++] ; - c++; buf++; - } - return c; -} - %} B [ \t] @@ -225,6 +191,43 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+) %% +static void addType() +{ + //printf("addType() type=`%s' scope=`%s' name=`%s'\n", + // type.data(),scope.data(),name.data()); + if (name.isEmpty() && scope.isEmpty()) return; + if (!type.isEmpty()) type+=" "; + if (!scope.isEmpty()) type+=scope+"::"; + type+=name; + scope.resize(0); + name.resize(0); +} + +static void addTypeName() +{ + //printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n", + // type.data(),scope.data(),name.data()); + if (name.isEmpty() || + name.at(name.length()-1)==':') // end of Objective-C keyword => append to name not type + { + return; + } + if (!type.isEmpty()) type+=' '; + type+=name; + name.resize(0); +} + +static int yyread(char *buf,int max_size) +{ + int c=0; + while( c < max_size && inputString[inputPosition] ) + { + *buf = inputString[inputPosition++] ; + c++; buf++; + } + return c; +} + /*@ ---------------------------------------------------------------------------- */ -- cgit v0.12