Skip to content
Snippets Groups Projects
Commit fb071e2b authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[ivette] introduce AST view

parent ebd45527
No related branches found
No related tags found
No related merge requests found
// --------------------------------------------------------------------------
// --- 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>
);
// --------------------------------------------------------------------------
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment