[upd] plankton

This commit is contained in:
Christian Fraß 2023-07-24 13:09:28 +02:00
parent 1f73fb3d80
commit dde0e1f4fc
2 changed files with 908 additions and 525 deletions

View file

@ -564,6 +564,10 @@ declare namespace lib_plankton.string {
* @author fenris
*/
function generate(prefix?: string): string;
/**
* @author fenris
*/
function join(parts: Array<string>, glue?: string): string;
/**
* @desc splits a string, but returns an empty list, if the string is empty
* @param {string} chain
@ -645,8 +649,15 @@ declare namespace lib_plankton.string {
}): string;
/**
* @author fenris
* @deprecated use limit
*/
function cut(str: string, length: int, delimiter?: string): string;
/**
*/
function limit(str: string, options?: {
length?: int;
indicator?: string;
}): string;
}
/**
* @deprecated
@ -925,94 +936,6 @@ 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_dict extends struct_expression {
fields: Array<{
key: string;
value: struct_expression;
}>;
constructor(fields: Array<{
key: string;
value: struct_expression;
}>);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_abstraction extends struct_expression {
arguments: Array<{
name: string;
type: (null | struct_type);
}>;
output_type: (null | struct_type);
body: Array<struct_statement>;
constructor(arguments_: Array<{
name: string;
type: (null | struct_type);
}>, output_type: (null | struct_type), body: Array<struct_statement>);
}
}
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_projection extends struct_expression {
source: struct_expression;
index: struct_expression;
constructor(source: struct_expression, index: struct_expression);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_fieldaccess extends struct_expression {
structure: struct_expression;
fieldname: string;
constructor(structure: struct_expression, fieldname: string);
}
}
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 {
/**
*/
@ -1125,12 +1048,138 @@ declare namespace lib_plankton.prog {
right: struct_type;
}
}
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_list extends struct_expression {
elements: Array<struct_expression>;
constructor(elements: Array<struct_expression>);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_dict extends struct_expression {
fields: Array<{
key: string;
value: struct_expression;
}>;
constructor(fields: Array<{
key: string;
value: struct_expression;
}>);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_abstraction extends struct_expression {
arguments: Array<{
name: string;
type: (null | struct_type);
}>;
output_type: (null | struct_type);
body: Array<struct_statement>;
async_: boolean;
constructor(arguments_: Array<{
name: string;
type: (null | struct_type);
}>, output_type: (null | struct_type), body: Array<struct_statement>, options?: {
async?: boolean;
});
}
}
declare namespace lib_plankton.prog {
/**
* @todo rename to function_call
*/
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_projection extends struct_expression {
source: struct_expression;
index: struct_expression;
constructor(source: struct_expression, index: struct_expression);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_fieldaccess extends struct_expression {
structure: struct_expression;
fieldname: string;
constructor(structure: struct_expression, fieldname: string);
}
}
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 {
/**
*/
class struct_expression_await extends struct_expression {
target: struct_expression;
constructor(target: struct_expression);
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_expression_cast extends struct_expression {
expression: struct_expression;
type: struct_type;
constructor(expression: struct_expression, type: struct_type);
}
}
declare namespace lib_plankton.prog {
/**
*/
abstract class struct_statement {
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_statement_comment extends struct_statement {
block: boolean;
lines: Array<string>;
constructor(block: boolean, lines: Array<string>);
}
}
declare namespace lib_plankton.prog {
/**
*/
@ -1168,6 +1217,15 @@ declare namespace lib_plankton.prog {
constructor(name: string, value: (null | struct_expression));
}
}
declare namespace lib_plankton.prog {
/**
*/
class struct_statement_procedure_call extends struct_statement {
head: struct_expression;
arguments: Array<struct_expression>;
constructor(head: struct_expression, arguments_: Array<struct_expression>);
}
}
declare namespace lib_plankton.prog {
/**
*/
@ -1179,10 +1237,13 @@ declare namespace lib_plankton.prog {
}>;
output_type: (null | struct_type);
body: Array<struct_statement>;
async_: boolean;
constructor(name: string, arguments_: Array<{
name: string;
type: (null | struct_type);
}>, output_type: (null | struct_type), body: Array<struct_statement>);
}>, output_type: (null | struct_type), body: Array<struct_statement>, options?: {
async?: boolean;
});
}
}
declare namespace lib_plankton.prog {

File diff suppressed because it is too large Load diff