]> mj.ucw.cz Git - umpf.git/blobdiff - cond.y
save headers
[umpf.git] / cond.y
diff --git a/cond.y b/cond.y
index 42a663d1f9947ac78f022f867e894d51d4e71437..fd5dc304303c6f8f14d38b52f743dddf15a93536 100644 (file)
--- a/cond.y
+++ b/cond.y
@@ -19,6 +19,7 @@ static struct tree* tree_malloc(int type);
 %token <str> CONST
 %token <n> NUM
 %token <str> VAR
+%token <str> KW_DISCARD
 %token <str> KW_PIPE KW_MAIL KW_COPY
 %token '(' ')' '{' '}' ';'
 %nonassoc KW_IF
@@ -169,6 +170,12 @@ arrow:     left ARROW right ass_right  {
                                        $$->pt.arrow.kw_left = $1;
                                        $$->pt.arrow.kw_right = $3;
                                }
+       | left ARROW KW_DISCARD         { //FIXME: actually left does not make sense here 
+                                       $$ = tree_malloc(ST_ARROW);
+                                       $$->pt.arrow.s = NULL;
+                                       $$->pt.arrow.kw_left = NULL;
+                                       $$->pt.arrow.kw_right = "discard";
+                               }
 ;
 
 left:  /* empty */ { $$ = NULL;}