# HG changeset patch # User Adam Chlipala # Date 1220811545 14400 # Node ID 148ba06f3e67d4e56ac64cf82fd9c24ba735d51c # Parent 7204fab29486d070c35d53483fe7505dc34a942e Parsing DELETE diff -r 7204fab29486 -r 148ba06f3e67 src/urweb.grm --- a/src/urweb.grm Sun Sep 07 14:15:16 2008 -0400 +++ b/src/urweb.grm Sun Sep 07 14:19:05 2008 -0400 @@ -758,6 +758,15 @@ in (EApp (e, sqlexp), loc) end) + | LPAREN DELETE FROM texp CWHERE sqlexp RPAREN + (let + val loc = s (LPARENleft, RPARENright) + + val e = (EVar (["Basis"], "delete"), loc) + val e = (EApp (e, texp), loc) + in + (EApp (e, sqlexp), loc) + end) | UNDER (EWild, s (UNDERleft, UNDERright)) diff -r 7204fab29486 -r 148ba06f3e67 tests/delete.ur --- a/tests/delete.ur Sun Sep 07 14:15:16 2008 -0400 +++ b/tests/delete.ur Sun Sep 07 14:19:05 2008 -0400 @@ -1,5 +1,5 @@ table t1 : {A : int, B : string, C : float, D : bool} fun main () : transaction page = - () <- dml (delete t1 (WHERE T.A = 5)); + () <- dml (DELETE FROM t1 WHERE T.A = 5); return Deleted.