Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
c87833a2
Commit
c87833a2
authored
4 years ago
by
Andre Maroneze
Committed by
Julien Signoles
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Kernel] fix -autocomplete to avoid displaying 'Input C files' option
parent
1f3fc9c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/kernel_internals/runtime/special_hooks.ml
+23
-18
23 additions, 18 deletions
src/kernel_internals/runtime/special_hooks.ml
with
23 additions
and
18 deletions
src/kernel_internals/runtime/special_hooks.ml
+
23
−
18
View file @
c87833a2
...
@@ -174,24 +174,29 @@ let run_list_all_plugin_options () =
...
@@ -174,24 +174,29 @@ let run_list_all_plugin_options () =
generate 2 strings *)
generate 2 strings *)
let
strings_of_typed_parameter
tp
=
let
strings_of_typed_parameter
tp
=
let
name
=
tp
.
Typed_parameter
.
name
in
let
name
=
tp
.
Typed_parameter
.
name
in
match
tp
.
Typed_parameter
.
accessor
with
(* special case due to the "cmdline hack" related to
|
Typed_parameter
.
Bool
(
_
,
opt_neg
)
->
the "Input C files" option: if it does not start
begin
with '-', ignore it *)
match
opt_neg
with
if
String
.
get
name
0
<>
'
-
'
then
[]
|
None
->
[(
name
,
"bool"
)]
else
|
Some
neg
->
[(
name
,
"bool"
);
(
neg
,
"bool"
)]
match
tp
.
Typed_parameter
.
accessor
with
end
|
Typed_parameter
.
Bool
(
_
,
opt_neg
)
->
|
Int
(
_
,
frange
)
->
begin
let
(
min
,
max
)
=
frange
()
in
match
opt_neg
with
if
min
=
min_int
&&
max
=
max_int
then
[(
name
,
"int"
)]
|
None
->
[(
name
,
"bool"
)]
else
[(
name
,
Format
.
asprintf
"int (%d, %d)"
min
max
)]
|
Some
neg
->
[(
name
,
"bool"
);
(
neg
,
"bool"
)]
|
String
(
_
,
fvalues
)
->
end
let
values
=
fvalues
()
in
|
Int
(
_
,
frange
)
->
if
values
=
[]
then
[(
name
,
"string"
)]
let
(
min
,
max
)
=
frange
()
in
else
if
min
=
min_int
&&
max
=
max_int
then
[(
name
,
"int"
)]
[(
name
,
Format
.
asprintf
"string (%a)"
else
[(
name
,
Format
.
asprintf
"int (%d, %d)"
min
max
)]
(
Pretty_utils
.
pp_list
~
sep
:
", "
|
String
(
_
,
fvalues
)
->
Format
.
pp_print_string
)
values
)]
let
values
=
fvalues
()
in
if
values
=
[]
then
[(
name
,
"string"
)]
else
[(
name
,
Format
.
asprintf
"string (%a)"
(
Pretty_utils
.
pp_list
~
sep
:
", "
Format
.
pp_print_string
)
values
)]
in
in
let
group_options
=
let
group_options
=
List
.
flatten
List
.
flatten
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment