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
25ac0835
Commit
25ac0835
authored
4 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[server] Kernel_ast: adds a data for a pair kf * localizable.
This is the type for an ivette location.
parent
2a23f673
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/server/kernel_ast.ml
+26
-0
26 additions, 0 deletions
src/plugins/server/kernel_ast.ml
src/plugins/server/kernel_ast.mli
+2
-0
2 additions, 0 deletions
src/plugins/server/kernel_ast.mli
with
28 additions
and
0 deletions
src/plugins/server/kernel_ast.ml
+
26
−
0
View file @
25ac0835
...
@@ -240,6 +240,32 @@ struct
...
@@ -240,6 +240,32 @@ struct
with
Not_found
->
Data
.
failure
"Undefined function '%s'"
key
with
Not_found
->
Data
.
failure
"Undefined function '%s'"
key
end
end
module
KfMarker
=
struct
type
record
let
record
:
record
Record
.
signature
=
Record
.
signature
()
let
fct
=
Record
.
field
record
~
name
:
"function"
~
descr
:
(
Md
.
plain
"Function"
)
(
module
Kf
)
let
marker
=
Record
.
field
record
~
name
:
"marker"
~
descr
:
(
Md
.
plain
"Marker"
)
(
module
Marker
)
let
data
=
Record
.
publish
~
package
~
name
:
"location"
~
descr
:
(
Md
.
plain
"Location: function and marker"
)
record
module
R
:
Record
.
S
with
type
r
=
record
=
(
val
data
)
type
t
=
kernel_function
*
Printer_tag
.
localizable
let
jtype
=
R
.
jtype
let
to_json
(
kf
,
loc
)
=
R
.
default
|>
R
.
set
fct
kf
|>
R
.
set
marker
loc
|>
R
.
to_json
let
of_json
json
=
let
r
=
R
.
of_json
json
in
R
.
get
fct
r
,
R
.
get
marker
r
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(* --- Functions --- *)
(* --- Functions --- *)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
...
...
This diff is collapsed.
Click to expand it.
src/plugins/server/kernel_ast.mli
+
2
−
0
View file @
25ac0835
...
@@ -47,6 +47,8 @@ sig
...
@@ -47,6 +47,8 @@ sig
val
lookup
:
string
->
t
(** Get back the localizable, if any. *)
val
lookup
:
string
->
t
(** Get back the localizable, if any. *)
end
end
module
KfMarker
:
Data
.
S
with
type
t
=
kernel_function
*
Printer_tag
.
localizable
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(** Ast Printer *)
(** Ast Printer *)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
...
...
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