Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
clean-ide
Commits
e7a889a4
Commit
e7a889a4
authored
Jun 03, 2019
by
Mart Lubbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support template exporting in cpm
parent
5b47e3d8
Pipeline
#24386
passed with stage
in 49 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
cpm/AbsSyn.dcl
cpm/AbsSyn.dcl
+1
-0
cpm/CpmLogic.icl
cpm/CpmLogic.icl
+8
-0
cpm/Parser.icl
cpm/Parser.icl
+1
-0
No files found.
cpm/AbsSyn.dcl
View file @
e7a889a4
...
@@ -25,6 +25,7 @@ from StdMaybe import :: Maybe
...
@@ -25,6 +25,7 @@ from StdMaybe import :: Maybe
|
SetExec
String
|
SetExec
String
|
SetBytecode
(
Maybe
String
)
|
SetBytecode
(
Maybe
String
)
|
SetProjectOptions
[
ProjectOption
]
|
SetProjectOptions
[
ProjectOption
]
|
ExportTemplate
FilePath
|
ProjectHelp
|
ProjectHelp
::
PathAction
::
PathAction
...
...
cpm/CpmLogic.icl
View file @
e7a889a4
...
@@ -170,6 +170,13 @@ where
...
@@ -170,6 +170,13 @@ where
doProjectAction
cleanhome
pwd
pn
(
SetBytecode
(
Just
bcfile
))
world
doProjectAction
cleanhome
pwd
pn
(
SetBytecode
(
Just
bcfile
))
world
=
withProject
pwd
pn
cleanhome
(
PR_SetByteCodePath
bcfile
)
world
=
withProject
pwd
pn
cleanhome
(
PR_SetByteCodePath
bcfile
)
world
doProjectAction
cleanhome
pwd
pn
(
ExportTemplate
prt
)
world
#
(
project_path
,
project
,
ok
,
world
)
=
openProject
pwd
pn
cleanhome
world
|
not
ok
=
error
"Error opening project"
world
#
(
ok
,
world
)
=
accFiles
(
save_project_template_file
prt
project
cleanhome
)
world
|
not
ok
=
error
"Error saving project template"
world
=
world
doProjectAction
cleanhome
pwd
pn
(
SetProjectOptions
project_options
)
world
doProjectAction
cleanhome
pwd
pn
(
SetProjectOptions
project_options
)
world
=
withProject
pwd
pn
cleanhome
(
set_project_options
project_options
)
world
=
withProject
pwd
pn
cleanhome
(
set_project_options
project_options
)
world
where
where
...
@@ -242,6 +249,7 @@ doProjectAction _ _ _ _ world =
...
@@ -242,6 +249,7 @@ doProjectAction _ _ _ _ world =
,
" target <env> : set target environment to <env>"
,
" target <env> : set target environment to <env>"
,
" exec <execname> : set executable name to <execname>"
,
" exec <execname> : set executable name to <execname>"
,
" bytecode [bc] : set bytecode file to <bcfile> or <execname>.bc if no file given"
,
" bytecode [bc] : set bytecode file to <bcfile> or <execname>.bc if no file given"
,
" template <template.prt> : export the given project to a template file"
,
" set <option> [<option>] : Set one or more of the following options:"
,
" set <option> [<option>] : Set one or more of the following options:"
,
" : -h SIZE"
,
" : -h SIZE"
,
" : Change the heapsize (e.g. 2M)"
,
" : Change the heapsize (e.g. 2M)"
...
...
cpm/Parser.icl
View file @
e7a889a4
...
@@ -34,6 +34,7 @@ parse_Project ["target",s] project_name = Project project_name (SetTarget s);
...
@@ -34,6 +34,7 @@ parse_Project ["target",s] project_name = Project project_name (SetTarget s);
parse_Project
[
"exec"
,
s
]
project_name
=
Project
project_name
(
SetExec
s
);
parse_Project
[
"exec"
,
s
]
project_name
=
Project
project_name
(
SetExec
s
);
parse_Project
[
"bytecode"
,
s
]
project_name
=
Project
project_name
(
SetBytecode
(
Just
s
));
parse_Project
[
"bytecode"
,
s
]
project_name
=
Project
project_name
(
SetBytecode
(
Just
s
));
parse_Project
[
"bytecode"
]
project_name
=
Project
project_name
(
SetBytecode
Nothing
);
parse_Project
[
"bytecode"
]
project_name
=
Project
project_name
(
SetBytecode
Nothing
);
parse_Project
[
"template"
,
s
]
project_name
=
Project
project_name
(
ExportTemplate
s
);
parse_Project
[
"set"
:
project_option_args
]
project_name
parse_Project
[
"set"
:
project_option_args
]
project_name
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
|
ok
|
ok
...
...
Write
Preview
Markdown
is supported
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