From 10e7bacbfd909dcee85e2df23ab5f0f98257c8e1 Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 10 Aug 2015 16:30:17 +0000 Subject: Factor out common code from GF.Command.Commands and GF.Command.Commands2 Created module GF.Command.CommonCommands with ~250 lines of code for commands that do not depend on the type of PGF in the environemnt, either because they don't use the PGF or because they are just documented here and implemented elsewhere. TODO: further refactoring so that documentation and implementation of *all* commands can be kept together. --- src/compiler/GF/Command/CommandInfo.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/compiler/GF/Command/CommandInfo.hs') diff --git a/src/compiler/GF/Command/CommandInfo.hs b/src/compiler/GF/Command/CommandInfo.hs index bffb452ce..696d14cbc 100644 --- a/src/compiler/GF/Command/CommandInfo.hs +++ b/src/compiler/GF/Command/CommandInfo.hs @@ -55,3 +55,7 @@ toStrings = map showAsString showAsString t = case t of H.ELit (H.LStr s) -> s _ -> "\n" ++ H.showExpr [] t ---newline needed in other cases than the first + +-- ** Creating documentation + +mkEx s = let (command,expl) = break (=="--") (words s) in (unwords command, unwords (drop 1 expl)) -- cgit v1.2.3