on master help sign in
Put back AttribsStart/End, they turn out to be pretty handy
05b1739Neil Mitchell
gen/Main.hs+2
@@ -65,4 +65,6 @@ rerender o = f
65 f ((s,NameStart):(e,NameEnd):(_,TagClose):xs) = "/" ++ sub s e ++ ">" ++ f xs
65 f ((s,NameStart):(e,NameEnd):(_,TagClose):xs) = "/" ++ sub s e ++ ">" ++ f xs
66 f ((s,NameStart):(e,NameEnd):xs) = sub s e ++ " " ++ f xs
66 f ((s,NameStart):(e,NameEnd):xs) = sub s e ++ " " ++ f xs
67 f ((s,QuoteStart):(e,QuoteEnd):xs) = "=\"" ++ sub s e ++ "\" " ++ f xs
67 f ((s,QuoteStart):(e,QuoteEnd):xs) = "=\"" ++ sub s e ++ "\" " ++ f xs
68+ f ((_,AttribsStart):xs) = f xs
69+ f ((_,AttribsEnd):xs) = f xs
68 f [] = []
70 f [] = []
gen/Parser.hs+3
@@ -6,6 +6,7 @@ import Lib
6data Out
6data Out
7 = NameStart | NameEnd
7 = NameStart | NameEnd
8 | QuoteStart | QuoteEnd
8 | QuoteStart | QuoteEnd
9+ | AttribsStart | AttribsEnd
9 | Tag
10 | Tag
10 | TagComment | TagOpen | TagClose | TagOpenClose
11 | TagComment | TagOpen | TagClose | TagOpenClose
11 deriving Show
12 deriving Show
@@ -41,7 +42,9 @@ attrib = do
41 ,abort "Invalid attribute, expected quote (either ' or \")"]
42 ,abort "Invalid attribute, expected quote (either ' or \")"]
42
43
43attribs = do
44attribs = do
45+ out AttribsStart
44 many attrib
46 many attrib
47+ out AttribsEnd
45
48
46tag = do
49tag = do
47 out Tag
50 out Tag