tools/protocolParser.hs
branchqmlfrontend
changeset 10933 f1da4126a61c
parent 10931 384765cd0caf
child 11047 46482475af2b
--- a/tools/protocolParser.hs	Fri May 15 23:28:31 2015 +0300
+++ b/tools/protocolParser.hs	Sun May 17 00:14:30 2015 +0300
@@ -109,11 +109,8 @@
         bodies = vcat $ punctuate (char '\n') $ map handlerBody fixedNames
         handlerBody n = text "procedure handler_" <> text n <> semi
             $+$ text "begin" 
-            $+$ nest 4 (
-                text "state.cmd:= cmd_" <> text n <> semi
-            )
             $+$ text "end" <> semi
-        cmds = text "type TCmdType = " <> parens (hsep $ punctuate comma $ map ((<>) (text "cmd_") . text) fixedNames) <> semi
+        cmds = text "type TCmdType = " <> parens (hsep $ punctuate comma $ map ((<>) (text "cmd_") . text) $ reverse fixedNames) <> semi
 
 pas = renderArrays $ buildTables $ buildParseTree commands
     where