diff src/urweb.grm @ 1192:9c82548c97e9

Subquery FROM items
author Adam Chlipala <adamc@hcoop.net>
date Thu, 25 Mar 2010 16:06:04 -0400
parents 61c3139eab12
children 601a77af0477
line wrap: on
line diff
--- a/src/urweb.grm	Thu Mar 25 15:44:24 2010 -0400
+++ b/src/urweb.grm	Thu Mar 25 16:06:04 2010 -0400
@@ -1629,6 +1629,14 @@
                                              (#1 fitem1 @ #1 fitem2,
                                               (EApp (e, sqlexp), loc))
                                          end)
+       | LPAREN query RPAREN AS tname   (let
+                                             val loc = s (LPARENleft, RPARENright)
+                                                       
+                                             val e = (EVar (["Basis"], "sql_from_query", Infer), loc)
+                                             val e = (ECApp (e, tname), loc)
+                                         in
+                                             ([tname], (EApp (e, query), loc))
+                                         end)
 
 tname  : CSYMBOL                        (CName CSYMBOL, s (CSYMBOLleft, CSYMBOLright))
        | LBRACE cexp RBRACE             (cexp)