1
0
forked from GitHub/gf-core

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.
This commit is contained in:
hallgren
2015-08-10 16:30:17 +00:00
parent 8d6e61a8df
commit 10e7bacbfd
5 changed files with 265 additions and 459 deletions

View File

@@ -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))