finish the break overloading and add some more tests (really need to get these automated)

This commit is contained in:
Bill Currie 2007-04-07 04:58:27 +00:00 committed by Jeff Teunissen
parent 5a78bf1bff
commit 25bf40a71a
3 changed files with 19 additions and 1 deletions

View file

@ -205,7 +205,7 @@ storage_class_t current_storage = st_global;
%}
%expect 4
%expect 5
%%
@ -1070,6 +1070,7 @@ unary_expr
primary
: NAME { $$ = new_name_expr ($1); }
| BREAK { $$ = new_name_expr (save_string ("break")); }
| ARGS { $$ = new_name_expr (".args"); }
| ARGC { $$ = argc_expr (); }
| ARGV { $$ = argv_expr (); }

9
tools/qfcc/test/break.r Normal file
View file

@ -0,0 +1,9 @@
void () break = #0;
void () foo =
{
break ();
while (1) {
break;
}
};

View file

@ -0,0 +1,8 @@
vector vec;
float f;
void()foo =
{
vec = f;
f = vec;
}