mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-21 23:23:11 -06:00
fixed reading argvars from gfc in gf-to-gfcc
This commit is contained in:
1 parent
73ef8309ab
commit
0260265de0
4 files changed
+19
-12
No files matched your search
@@ -1,11 +1,11 @@
|
||||
module GF.Infra.CompactPrint where
|
||||
import Data.Char
|
||||
|
||||
compactPrint = concat . map spaceIf . words
|
||||
compactPrint = tail . concat . map spaceIf . words
|
||||
|
||||
spaceIf w = case w of
|
||||
_ | keyword w -> "\n" ++ w
|
||||
c:cs | isAlpha c || isDigit c -> " " ++ w
|
||||
_ -> w
|
||||
|
||||
keyword w = elem w ["cat","fun","lin","lincat","oper","param"]
|
||||
keyword w = elem w ["cat","fun","lin","lincat","lindef","oper","param"]
|
||||
Reference in new issue
Block a user