Skip to content
Snippets Groups Projects
Commit 1d41eb45 authored by Michele Alberti's avatar Michele Alberti
Browse files

[ivette] Some typing in ASTinfo.

parent 6ce36f5e
No related branches found
No related tags found
No related merge requests found
...@@ -14,13 +14,13 @@ import { Component } from 'frama-c/LabViews'; ...@@ -14,13 +14,13 @@ import { Component } from 'frama-c/LabViews';
// --- Parsing information from the server // --- Parsing information from the server
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
function addMarker(buffer: any, fct: string) { function addMarker(buffer: RichTextBuffer, fct: string) {
buffer.openTextMarker({ id: fct, css: 'color: blue' }); buffer.openTextMarker({ id: fct, css: 'color: blue' });
buffer.append(fct); buffer.append(fct);
buffer.closeTextMarker(); buffer.closeTextMarker();
} }
function parseVarinfo(buffer: any, data: any) { function parseVarinfo(buffer: RichTextBuffer, data: any) {
buffer.append(`Variable ${data.name} has type '${data.type.name}'.`); buffer.append(`Variable ${data.name} has type '${data.type.name}'.`);
buffer.flushline(); buffer.flushline();
if (data.global) { if (data.global) {
...@@ -41,7 +41,7 @@ function parseVarinfo(buffer: any, data: any) { ...@@ -41,7 +41,7 @@ function parseVarinfo(buffer: any, data: any) {
buffer.append(`It is ${ref}referenced and its address is ${taken}taken.`); buffer.append(`It is ${ref}referenced and its address is ${taken}taken.`);
} }
function parseInfo(buffer: any, data: any) { function parseInfo(buffer: RichTextBuffer, data: any) {
switch (data.kind) { switch (data.kind) {
case 'expression': case 'expression':
buffer.append(`This is a pure C expression of type '${data.type.name}'.`); buffer.append(`This is a pure C expression of type '${data.type.name}'.`);
......
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