about summary refs log tree commit diff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r--src/libexpr/parser.y12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index 347516f69239..88ee8326b8d3 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -41,11 +41,11 @@ ATerm makePos(YYLTYPE * loc, void * data)
   ATermList ts;
 }
 
-%type <t> start expr expr_function expr_assert expr_if expr_op
+%type <t> start expr expr_function expr_if expr_op
 %type <t> expr_app expr_select expr_simple bind inheritsrc formal
 %type <ts> binds ids expr_list formals
 %token <t> ID INT STR PATH URI
-%token IF THEN ELSE ASSERT LET REC INHERIT EQ NEQ AND OR IMPL
+%token IF THEN ELSE ASSERT WITH LET REC INHERIT EQ NEQ AND OR IMPL
 
 %nonassoc IMPL
 %left OR
@@ -67,12 +67,10 @@ expr_function
     { $$ = ATmake("Function(<term>, <term>, <term>)", $2, $5, CUR_POS); }
   | ID ':' expr_function
     { $$ = ATmake("Function1(<term>, <term>, <term>)", $1, $3, CUR_POS); }
-  | expr_assert
-  ;
-
-expr_assert
-  : ASSERT expr ';' expr_assert
+  | ASSERT expr ';' expr_function
     { $$ = ATmake("Assert(<term>, <term>, <term>)", $2, $4, CUR_POS); }
+  | WITH expr ';' expr_function
+    { $$ = ATmake("With(<term>, <term>, <term>)", $2, $4, CUR_POS); }
   | expr_if
   ;