]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Interpreter/Base.hs
Record before an experiment
[Rakka.git] / Rakka / Wiki / Interpreter / Base.hs
index e03b669fd083ac568fdd0cfccb1237937cbb094b..1475f461478c4d8694dd680216b449431a0cb3a8 100644 (file)
@@ -3,30 +3,39 @@ module Rakka.Wiki.Interpreter.Base
     )
     where
 
-import           Rakka.Wiki.Interpreter
 import           Rakka.Wiki
+import           Rakka.Wiki.Interpreter
+import           Rakka.Wiki.Interpreter.Base.Image
 
 
 baseInterpreters :: [Interpreter]
 baseInterpreters = [ lineBreakInterp
                    , spanInterp
                    , divInterp
+                   , imageInterp
+                   , imgFrameInterp
                    ]
 
 
 lineBreakInterp :: Interpreter
-lineBreakInterp = pureInlineInterp "br" interpret
-    where
-      interpret (InlineCommand _ attrs _) _ = LineBreak attrs
+lineBreakInterp = InlineCommandInterpreter {
+                    iciName      = "br"
+                  , iciInterpret
+                      = \ _ (InlineCommand _ attrs _) -> return $ LineBreak attrs
+                  }
 
 
 spanInterp :: Interpreter
-spanInterp = pureInlineInterp "span" interpret
-    where
-      interpret (InlineCommand _ attrs contents) _ = Span attrs contents
+spanInterp = InlineCommandInterpreter {
+               iciName      = "span"
+             , iciInterpret
+                 = \ _ (InlineCommand _ attrs contents) -> return $ Span attrs contents
+             }
 
 
 divInterp :: Interpreter
-divInterp = pureBlockInterp "div" interpret
-    where
-      interpret (BlockCommand _ attrs contents) _ = Div attrs contents
\ No newline at end of file
+divInterp = BlockCommandInterpreter {
+              bciName      = "div"
+            , bciInterpret
+                = \ _ (BlockCommand _ attrs contents) -> return $ Div attrs contents
+            }