Mercurial > octave-nkf
diff src/oct-parse.yy @ 12400:5252f12537f8
don't warn about coercing nested functions to subfunctions if yyparse failed
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 08 Feb 2011 03:22:12 -0500 |
parents | 91fa3871e9bf |
children | 7a5aacf65f81 |
line wrap: on
line diff
--- a/src/oct-parse.yy Sun Feb 06 21:11:01 2011 -0500 +++ b/src/oct-parse.yy Tue Feb 08 03:22:12 2011 -0500 @@ -3589,14 +3589,14 @@ fcn_ptr = primary_fcn_ptr; - if (reading_fcn_file && endfunction_found && max_function_depth > 1) + if (status != 0) + error ("parse error while reading %s file %s", + file_type.c_str(), ff.c_str ()); + else if (reading_fcn_file && endfunction_found + && max_function_depth > 1) warning_with_id ("Octave:nested-functions-coerced", "nested functions are coerced into subfunctions " "in file %s", ff.c_str ()); - - if (status != 0) - error ("parse error while reading %s file %s", - file_type.c_str(), ff.c_str ()); } else {