comparison src/lex.l @ 7587:1f662945c2be

handle varargin and varargout without keywords
author John W. Eaton <jwe@octave.org>
date Thu, 13 Mar 2008 13:05:43 -0400
parents 745a8299c2b5
children ae90e05ad299
comparison
equal deleted inserted replaced
7586:84122fb29c75 7587:1f662945c2be
1142 1142
1143 case magic_line_kw: 1143 case magic_line_kw:
1144 yylval.tok_val = new token (static_cast<double> (l), "", l, c); 1144 yylval.tok_val = new token (static_cast<double> (l), "", l, c);
1145 break; 1145 break;
1146 1146
1147 case varargin_kw:
1148 if (! lexer_flags.looking_at_parameter_list)
1149 return 0;
1150 break;
1151
1152 case varargout_kw:
1153 if (! (lexer_flags.looking_at_return_list
1154 || (lexer_flags.defining_func
1155 && ! lexer_flags.parsed_function_name)))
1156 return 0;
1157 break;
1158
1159 default: 1147 default:
1160 panic_impossible (); 1148 panic_impossible ();
1161 } 1149 }
1162 1150
1163 if (! yylval.tok_val) 1151 if (! yylval.tok_val)