[mod] lib:plankton

This commit is contained in:
Christian Fraß 2023-07-11 20:39:47 +02:00
parent 94864eaeec
commit 6ff79fe093
3 changed files with 1267 additions and 25 deletions

View file

@ -925,6 +925,215 @@ declare namespace lib_plankton.file {
*/
function write_buffer(path: string, content: Buffer, options?: {}): Promise<void>;
}
declare namespace lib_plankton.prog {
/**
*/
abstract class struct_expression {
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_variable extends struct_expression {
name: string;
constructor(name: string);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_literal extends struct_expression {
value: any;
constructor(value: any);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_function_application extends struct_expression {
head: struct_expression;
arguments: Array<struct_expression>;
constructor(head: struct_expression, arguments_: Array<struct_expression>);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_operation_comparison extends struct_expression {
left: struct_expression;
right: struct_expression;
constructor(left: struct_expression, right: struct_expression);
}
}
declare namespace lib_plankton.prog {
/**
*/
abstract class struct_type {
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_literal extends struct_type {
value: struct_expression;
constructor(value: struct_expression);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_boolean extends struct_type {
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_integer extends struct_type {
constructor();
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_string extends struct_type {
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_list extends struct_type {
element: struct_type;
constructor(element: struct_type);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_map extends struct_type {
key: struct_type;
value: struct_type;
constructor(key: struct_type, value: struct_type);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_record extends struct_type {
fields: Array<{
name: string;
type: struct_type;
mandatory: boolean;
}>;
constructor(fields: Array<{
name: string;
type: struct_type;
mandatory: boolean;
}>);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_function extends struct_type {
arguments: Array<struct_type>;
target: struct_type;
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_construction extends struct_type {
name: string;
arguments: (null | Array<struct_type>);
constructor(name: string, arguments_: (null | Array<struct_type>));
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_union extends struct_type {
left: struct_type;
right: struct_type;
constructor(left: struct_type, right: struct_type);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_type_intersection extends struct_type {
left: struct_type;
right: struct_type;
}
}
declare namespace lib_plankton.prog {
/**
*/
abstract class struct_statement {
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_statement_type_definition extends struct_statement {
name: string;
type: struct_type;
constructor(name: string, type: struct_type);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_statement_declaration extends struct_statement {
constant: boolean;
name: string;
type: (null | struct_type);
value: (null | struct_expression);
constructor(constant: boolean, name: string, type: (null | struct_type), value: (null | struct_expression));
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_statement_assignment extends struct_statement {
name: string;
value: (null | struct_expression);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_program {
statements: Array<struct_statement>;
constructor(statements: Array<struct_statement>);
}
}
declare namespace lib_plankton.prog {
/**
*/
type type_output = {
render_expression: ((expression: struct_expression) => string);
render_type: ((type: struct_type) => string);
render_statement: ((program: struct_statement) => string);
render_program: ((program: struct_program) => string);
};
}
declare namespace lib_plankton.prog {
/**
*/
function render_expression(expression: struct_expression): string;
/**
*/
function render_type(type: struct_type): string;
/**
*/
function render_statement(statement: struct_statement): string;
/**
*/
function render_program(program: struct_program): string;
/**
*/
function output_typescript(): type_output;
}
declare namespace lib_plankton.args {
/**
*/

File diff suppressed because it is too large Load diff

View file

@ -6,6 +6,7 @@ modules="${modules} base"
modules="${modules} string"
modules="${modules} json"
modules="${modules} file"
modules="${modules} prog"
modules="${modules} args"
mkdir -p lib/plankton