1
0
forked from GitHub/gf-core

in the shell, permit 3-letter lang codes as concrete syntax names

This commit is contained in:
aarne
2010-04-04 20:46:36 +00:00
parent 1040f2a10d
commit 0e2f34b269
3 changed files with 15 additions and 3 deletions

View File

@@ -924,7 +924,12 @@ allCommands cod env@(pgf, mos) = Map.fromList [
optLangs opts = case valStrOpts "lang" "" opts of
"" -> languages pgf
lang -> map mkCId (chunks ',' lang)
lang -> map completeLang (chunks ',' lang)
completeLang la = let cla = (mkCId la) in
if elem cla (languages pgf)
then cla
else (mkCId (showCId (abstractName pgf) ++ la))
optLang opts = head $ optLangs opts ++ [wildCId]
optOpenTypes opts = case valStrOpts "openclass" "" opts of