on master help sign in
Put back AttribsStart/End, they turn out to be pretty handy
commit05b173957248c2b0a175f9eac122bd786bc2f511 authorNeil Mitchell <ndmitchell@gmail.com> dateThu 4 Jan 2018, 00:53 (9 years ago) parent7d00f9c
2 files changed+5
gen/Main.hs+2 gen/Parser.hs+3
gen/Main.hs+2
@@ -65,4 +65,6 @@ rerender o = f
6565 f ((s,NameStart):(e,NameEnd):(_,TagClose):xs) = "/" ++ sub s e ++ ">" ++ f xs
6666 f ((s,NameStart):(e,NameEnd):xs) = sub s e ++ " " ++ f xs
6767 f ((s,QuoteStart):(e,QuoteEnd):xs) = "=\"" ++ sub s e ++ "\" " ++ f xs
68+ f ((_,AttribsStart):xs) = f xs
69+ f ((_,AttribsEnd):xs) = f xs
6870 f [] = []
gen/Parser.hs+3
@@ -6,6 +6,7 @@ import Lib
66data Out
77 = NameStart | NameEnd
88 | QuoteStart | QuoteEnd
9+ | AttribsStart | AttribsEnd
910 | Tag
1011 | TagComment | TagOpen | TagClose | TagOpenClose
1112 deriving Show
@@ -41,7 +42,9 @@ attrib = do
4142 ,abort "Invalid attribute, expected quote (either ' or \")"]
4243
4344attribs = do
45+ out AttribsStart
4446 many attrib
47+ out AttribsEnd
4548
4649tag = do
4750 out Tag