Skip to content
Snippets Groups Projects
Commit 9e4ed8ca authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[Ivette] Make API

parent 9b614100
No related branches found
No related tags found
No related merge requests found
...@@ -107,8 +107,7 @@ update-distrib-files: ...@@ -107,8 +107,7 @@ update-distrib-files:
api: api:
@echo "[Ivette] Generating TypeScript API" @echo "[Ivette] Generating TypeScript API"
@find src/frama-c -path "*/api/*" -name "*.ts" -exec rm -f {} \; @find src/frama-c -path "*/api/*" -name "*.ts" -exec rm -f {} \;
../bin/frama-c.byte \ ../bin/frama-c \
-load-module src/frama-c/api_generator.ml \
-server-tsc -server-tsc
@find src/frama-c -path "*/api/*" -name "*.ts" \ @find src/frama-c -path "*/api/*" -name "*.ts" \
-exec headache \ -exec headache \
......
...@@ -64,15 +64,14 @@ import { tag } from 'frama-c/kernel/api/data'; ...@@ -64,15 +64,14 @@ import { tag } from 'frama-c/kernel/api/data';
const getConfig_internal: Server.GetRequest< const getConfig_internal: Server.GetRequest<
null, null,
{ pluginpath: string[], libdir: string, datadir: string, version: string } { pluginpath: string[], datadir: string[], version: string }
> = { > = {
kind: Server.RqKind.GET, kind: Server.RqKind.GET,
name: 'kernel.services.getConfig', name: 'kernel.services.getConfig',
input: Json.jNull, input: Json.jNull,
output: Json.jObject({ output: Json.jObject({
pluginpath: Json.jList(Json.jString), pluginpath: Json.jList(Json.jString),
libdir: Json.jFail(Json.jString,'String expected'), datadir: Json.jList(Json.jString),
datadir: Json.jFail(Json.jString,'String expected'),
version: Json.jFail(Json.jString,'String expected'), version: Json.jFail(Json.jString,'String expected'),
}), }),
signals: [], signals: [],
...@@ -80,7 +79,7 @@ const getConfig_internal: Server.GetRequest< ...@@ -80,7 +79,7 @@ const getConfig_internal: Server.GetRequest<
/** Frama-C Kernel configuration */ /** Frama-C Kernel configuration */
export const getConfig: Server.GetRequest< export const getConfig: Server.GetRequest<
null, null,
{ pluginpath: string[], libdir: string, datadir: string, version: string } { pluginpath: string[], datadir: string[], version: string }
>= getConfig_internal; >= getConfig_internal;
const load_internal: Server.SetRequest<string,string | undefined> = { const load_internal: Server.SetRequest<string,string | undefined> = {
......
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