File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -567,7 +567,6 @@ static const char *implementationString (const impType imp)
567
567
/*
568
568
* Debugging functions
569
569
*/
570
- #define DEBUG
571
570
#ifdef DEBUG
572
571
573
572
#define boolString (c ) ((c) ? "TRUE" : "FALSE")
@@ -2120,6 +2119,7 @@ static void parseReturnType (statementInfo *const st)
2120
2119
{
2121
2120
int i ;
2122
2121
int lower_bound ;
2122
+ int upper_bound ;
2123
2123
tokenInfo * finding_tok ;
2124
2124
2125
2125
/* FIXME TODO: if java language must be supported then impement this here
@@ -2161,8 +2161,21 @@ static void parseReturnType (statementInfo *const st)
2161
2161
}
2162
2162
else
2163
2163
lower_bound = 1 ;
2164
-
2165
- for (i = (unsigned int ) NumTokens ; i > lower_bound ; i -- )
2164
+
2165
+ upper_bound = -1 ;
2166
+ for (i = 0 ; i < NumTokens ; i ++ ) {
2167
+ tokenInfo * curr_tok ;
2168
+ curr_tok = prevToken (st , i );
2169
+ if (curr_tok -> type == TOKEN_BRACE_CLOSE || curr_tok -> type == TOKEN_BRACE_OPEN ) {
2170
+ upper_bound = i - 1 ;
2171
+ break ;
2172
+ }
2173
+ }
2174
+ if (upper_bound < 0 ) {
2175
+ upper_bound = NumTokens - 1 ;
2176
+ }
2177
+
2178
+ for (i = upper_bound ; i > lower_bound ; i -- )
2166
2179
{
2167
2180
tokenInfo * curr_tok ;
2168
2181
curr_tok = prevToken (st , i );
You can’t perform that action at this time.
0 commit comments