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
fb071e2b
Commit
fb071e2b
authored
5 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] introduce AST view
parent
ebd45527
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
ivette/src/renderer/ASTview.js
+41
-0
41 additions, 0 deletions
ivette/src/renderer/ASTview.js
ivette/src/renderer/Application.js
+2
-1
2 additions, 1 deletion
ivette/src/renderer/Application.js
with
43 additions
and
1 deletion
ivette/src/renderer/ASTview.js
0 → 100644
+
41
−
0
View file @
fb071e2b
// --------------------------------------------------------------------------
// --- AST Source Code
// --------------------------------------------------------------------------
import
_
from
'
lodash
'
;
import
React
from
'
react
'
;
import
Dome
from
'
dome
'
;
import
States
from
'
frama-c/states
'
;
import
{
Component
}
from
'
frama-c/labviews
'
;
// --------------------------------------------------------------------------
// --- AST Printer
// --------------------------------------------------------------------------
const
ASTview
=
()
=>
{
// Hooks
const
[
select
,
setSelect
]
=
States
.
useSelection
();
return
(
<
div
>
<
div
>
Function
:
{
select
&&
select
.
function
}
<
/div
>
<
div
>
Marker
:
{
select
&&
select
.
marker
}
<
/div
>
<
/div
>
);
};
// --------------------------------------------------------------------------
// --- Export Component
// --------------------------------------------------------------------------
export
default
()
=>
(
<
Component
id
=
'
frama-c.astview
'
label
=
'
AST
'
title
=
'
Normalized source code representation.
'
>
<
ASTview
/>
<
/Component
>
);
// --------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
ivette/src/renderer/Application.js
+
2
−
1
View file @
fb071e2b
...
...
@@ -17,6 +17,7 @@ import { LabView, View, Group, Component } from 'frama-c/labviews' ;
import
{
GridItem
,
GridHbox
,
GridVbox
}
from
'
dome/layout/grids
'
;
import
Controller
from
'
./Controller
'
;
import
Properties
from
'
./Properties
'
;
import
ASTview
from
'
./ASTview
'
;
// --------------------------------------------------------------------------
// --- Main View
...
...
@@ -56,8 +57,8 @@ export default (function() {
<
/View
>
<
Group
id
=
'
frama-c
'
label
=
'
Frama-C
'
title
=
'
Frama-C Kernel Components
'
>
<
Controller
.
Console
/>
<
Properties
.
PropTable
/>
<
Properties
/>
<
ASTview
/>
<
/Group
>
<
/LabView
>
<
/Splitter
>
...
...
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