summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2014-06-25 14:04:13 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2014-06-25 14:04:13 -0400
commit4d2154f281d63408567a4f063dc4a5f9846cbf44 (patch)
treeaa657a36e2c449a4aa47aac3b924487db6097d9a /src/urweb.grm
parent0a45f32c63f2d9a3df8c8ea15ea67b8e8c0fef5a (diff)
New syntactic shorthand for antiquoting subqueries
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index 4671569d..1f4540ba 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -1981,6 +1981,14 @@ fitem : table' ([#1 table'], #2 table')
in
([tname], (EApp (e, query), loc))
end)
+ | LPAREN LBRACE LBRACE eexp RBRACE RBRACE 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, eexp), loc))
+ end)
| LPAREN fitem RPAREN (fitem)
tname : CSYMBOL (CName CSYMBOL, s (CSYMBOLleft, CSYMBOLright))