[add <% ... %> Yoshikuni Jujo **20081103024828] { hunk ./Main.hs 50 -parseText, parseEq, parseEqEq, parseEqShow, parseEqEqShow, parseDef +parseText, parseN, parseEq, parseEqEq, parseEqShow, parseEqEqShow, parseDef hunk ./Main.hs 54 -mkOutputText, +mkOutputText, mkOutputHere, hunk ./Main.hs 73 + single parseN + `mplus` hunk ./Main.hs 99 +parseN = do + tokens "<%" >> still (parseNot () $ spot $ flip elem "-=") + code <- parseInner + still (parseNot () $ tokenBack '-') + tokens "%>" + return $ (False, mkOutputHere code) + hunk ./Main.hs 108 - greedyList $ spot isSpace hunk ./Main.hs 114 - greedyList $ spot isSpace hunk ./Main.hs 120 - greedyList $ spot isSpace hunk ./Main.hs 126 - greedyList $ spot isSpace hunk ./Main.hs 132 - greedyList $ spot isSpace hunk ./Main.hs 173 +mkOutputHere code = " " ++ code ++ ";\n" hunk ./ehaskell.cabal 2 -Version: 0.0 +Version: 0.1 hunk ./ehaskell.cabal 14 + <%% ... %%>: <%% import Some.Module %%> <%% h = "hello" %%> + . + <% h <- return "hello" %> + . + <% -%> + . + <%= %> + . hunk ./ehaskell.cabal 24 - > It's <%=$ getClockTime %> now. + > <%% + > It's <%==$ getClockTime %> now. + > adddir ./examples/haskell addfile ./examples/haskell/first.hs.ehs hunk ./examples/haskell/first.hs.ehs 1 +main = do + <% putStrLn "debug?(y/n)" %> + <% d <- getChar %> + <% if d == 'y' then -%> + putStrLn "DEBUG" + <%- else -%> + putStrLn "Hello" + <%-%> adddir ./examples/html addfile ./examples/html/first.html.ehs hunk ./examples/html/first.html.ehs 1 +<%% import System.Time (getClockTime) %%> + +test ehaskell 1 +

It's <%==$ getClockTime %> now.

+ }