Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
26e70fb7
Commit
26e70fb7
authored
Jan 10, 2019
by
Mart Lubbers
Browse files
cpm: Support adding multiple paths
parent
0138914b
Pipeline
#17643
passed with stage
in 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cpm/AbsSyn.dcl
View file @
26e70fb7
...
...
@@ -26,7 +26,7 @@ from PmTypes import ::Pathname,::Output
|
ProjectHelp
::
PathAction
=
AddPathAction
String
=
AddPathAction
[
String
]
|
RemovePathAction
Int
|
ListPathsAction
|
MovePathAction
Int
PathDirection
...
...
cpm/CpmLogic.icl
View file @
26e70fb7
...
...
@@ -276,8 +276,8 @@ withProject pwd pn cleanhome f world
* Execute path-related project actions
*/
doProjectPathAction
::
String
String
String
Project
PathAction
*
World
->
*
World
doProjectPathAction
cleanhome
pwd
pn
project
(
AddPathAction
path
)
world
=
doModPaths
cleanhome
pwd
pn
project
(
\
t
->
[!
GetLongPathName
path
:
t
!])
world
doProjectPathAction
cleanhome
pwd
pn
project
(
AddPathAction
path
s
)
world
=
doModPaths
cleanhome
pwd
pn
project
(
Concat
[!
GetLongPathName
path
\\
path
<-
paths
!])
world
doProjectPathAction
cleanhome
pwd
pn
project
(
RemovePathAction
i
)
world
=
doModPaths
cleanhome
pwd
pn
project
(
RemoveAt
i
)
world
...
...
cpm/Parser.icl
View file @
26e70fb7
...
...
@@ -49,8 +49,8 @@ parse_Project_build_args _ _ _ _ error_cpm_action
=
error_cpm_action
;
parse_Project_path_args
::
![
String
]
!
String
->
CpmAction
;
parse_Project_path_args
[
"add"
,
path
]
project_name
=
Project
project_name
(
ProjectPath
(
AddPathAction
path
));
parse_Project_path_args
[
"add"
:
path
]
project_name
|
length
path
<>
0
=
Project
project_name
(
ProjectPath
(
AddPathAction
path
));
parse_Project_path_args
[
"remove"
,
i
]
project_name
|
size
i
>
0
&&
only_digits_in_string
0
i
=
Project
project_name
(
ProjectPath
(
RemovePathAction
(
toInt
i
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment