mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
editor command pc n ; resource/finnish
This commit is contained in:
@@ -5,9 +5,9 @@
|
|||||||
-- Stability : (stable)
|
-- Stability : (stable)
|
||||||
-- Portability : (portable)
|
-- Portability : (portable)
|
||||||
--
|
--
|
||||||
-- > CVS $Date: 2005/06/03 22:44:36 $
|
-- > CVS $Date: 2005/06/10 15:59:58 $
|
||||||
-- > CVS $Author: aarne $
|
-- > CVS $Author: aarne $
|
||||||
-- > CVS $Revision: 1.17 $
|
-- > CVS $Revision: 1.18 $
|
||||||
--
|
--
|
||||||
-- (Description of the module)
|
-- (Description of the module)
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
@@ -122,6 +122,7 @@ pCommandMsg s = (m,pCommandWords $ words c) where
|
|||||||
"u" : _ -> CUndo
|
"u" : _ -> CUndo
|
||||||
"d" : _ -> CDelete
|
"d" : _ -> CDelete
|
||||||
"ac" : _ -> CAddClip
|
"ac" : _ -> CAddClip
|
||||||
|
"pc": i : _ -> CRemoveClip (readIntArg i)
|
||||||
"c" : s : _ -> CTermCommand s
|
"c" : s : _ -> CTermCommand s
|
||||||
"a" : _ -> CRefineRandom --- *a*leatoire
|
"a" : _ -> CRefineRandom --- *a*leatoire
|
||||||
"m" : _ -> CMenu
|
"m" : _ -> CMenu
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
-- Stability : (stable)
|
-- Stability : (stable)
|
||||||
-- Portability : (portable)
|
-- Portability : (portable)
|
||||||
--
|
--
|
||||||
-- > CVS $Date: 2005/04/21 16:23:19 $
|
-- > CVS $Date: 2005/06/10 15:59:58 $
|
||||||
-- > CVS $Author: bringert $
|
-- > CVS $Author: aarne $
|
||||||
-- > CVS $Revision: 1.37 $
|
-- > CVS $Revision: 1.38 $
|
||||||
--
|
--
|
||||||
-- temporary hacks for GF 2.0
|
-- temporary hacks for GF 2.0
|
||||||
--
|
--
|
||||||
@@ -91,6 +91,7 @@ data Command =
|
|||||||
| CRemoveOption Option
|
| CRemoveOption Option
|
||||||
| CDelete
|
| CDelete
|
||||||
| CAddClip
|
| CAddClip
|
||||||
|
| CRemoveClip Int
|
||||||
| CUndo
|
| CUndo
|
||||||
| CView
|
| CView
|
||||||
| CMenu
|
| CMenu
|
||||||
@@ -284,6 +285,7 @@ execECommand env c = case c of
|
|||||||
CRemoveOption o -> changeStOptions (removeOption o)
|
CRemoveOption o -> changeStOptions (removeOption o)
|
||||||
CDelete -> action2commandNext $ deleteSubTree cgr
|
CDelete -> action2commandNext $ deleteSubTree cgr
|
||||||
CAddClip -> \s -> (addtoClip (actTree (stateSState s))) s
|
CAddClip -> \s -> (addtoClip (actTree (stateSState s))) s
|
||||||
|
CRemoveClip n -> \s -> (removeClip n) s
|
||||||
CUndo -> undoCommand
|
CUndo -> undoCommand
|
||||||
CMenu -> \s -> changeMsg (menuState env s) s
|
CMenu -> \s -> changeMsg (menuState env s) s
|
||||||
CView -> changeView
|
CView -> changeView
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
-- Stability : (stable)
|
-- Stability : (stable)
|
||||||
-- Portability : (portable)
|
-- Portability : (portable)
|
||||||
--
|
--
|
||||||
-- > CVS $Date: 2005/04/21 16:23:51 $
|
-- > CVS $Date: 2005/06/10 15:59:59 $
|
||||||
-- > CVS $Author: bringert $
|
-- > CVS $Author: aarne $
|
||||||
-- > CVS $Revision: 1.9 $
|
-- > CVS $Revision: 1.10 $
|
||||||
--
|
--
|
||||||
-- (Description of the module)
|
-- (Description of the module)
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
@@ -82,6 +82,9 @@ changeCands ts ss@((s,(_,cb),(_,b)):_) = (s,(ts,cb),(candInfo ts,b)) : ss
|
|||||||
addtoClip :: Clip -> ECommand
|
addtoClip :: Clip -> ECommand
|
||||||
addtoClip t ss@((s,(ts,cb),(i,b)):_) = (s,(ts,t:cb),(i,b)) : ss
|
addtoClip t ss@((s,(ts,cb),(i,b)):_) = (s,(ts,t:cb),(i,b)) : ss
|
||||||
|
|
||||||
|
removeClip :: Int -> ECommand
|
||||||
|
removeClip n ss@((s,(ts,cb),(i,b)):_) = (s,(ts, drop n cb),(i,b)) : ss
|
||||||
|
|
||||||
changeMsg :: [String] -> ECommand
|
changeMsg :: [String] -> ECommand
|
||||||
changeMsg m ((s,ts,(_,b)):ss) = (s,ts,(m,b)) : ss -- just change message
|
changeMsg m ((s,ts,(_,b)):ss) = (s,ts,(m,b)) : ss -- just change message
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user