summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-28 17:26:53 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-28 17:26:53 -0400
commit0f298a5396cf95f4e58988583f862a4b97444bec (patch)
treecfce730aeca8d6832d9ec09d1e4d3450f85a444d /src/urweb.grm
parent43bdca1c4bef142cde7080f317a4686b01721359 (diff)
Subforms
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index da817ab3..55a38c57 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -280,7 +280,7 @@ datatype attr = Class of exp | Normal of con * exp
| rexp of (con * exp) list
| xml of exp
| xmlOne of exp
- | tag of string * exp
+ | tag of (string * exp) * exp
| tagHead of string * exp
| bind of string * con option * exp
| edecl of edecl
@@ -1240,7 +1240,7 @@ xmlOne : NOTAGS (EApp ((EVar (["Basis"], "cdata", Infer)
val pos = s (tagleft, GTright)
val cdata =
- if #1 tag = "submit" orelse #1 tag = "dyn" then
+ if #1 (#1 tag) = "submit" orelse #1 (#1 tag) = "dyn" then
let
val e = (EVar (["Basis"], "cdata", DontInfer), pos)
val e = (ECApp (e, (CWild (KWild, pos), pos)), pos)
@@ -1261,10 +1261,13 @@ xmlOne : NOTAGS (EApp ((EVar (["Basis"], "cdata", Infer)
val pos = s (tagleft, GTright)
val et = tagIn END_TAG
in
- if #1 tag = et then
+ if #1 (#1 tag) = et then
if et = "form" then
(EApp ((EVar (["Basis"], "form", Infer), pos),
xml), pos)
+ else if et = "subform" then
+ (EApp ((EDisjointApp (#2 (#1 tag)), pos),
+ xml), pos)
else
(EApp (#2 tag, xml), pos)
else
@@ -1295,7 +1298,7 @@ tag : tagHead attrs (let
val e = (EApp (e, (EApp (#2 tagHead,
(ERecord [], pos)), pos)), pos)
in
- (#1 tagHead, e)
+ (tagHead, e)
end)
tagHead: BEGIN_TAG (let