Add optionality for parameters

This commit allows for parameters that does not require any arguments to
be provided in function calls. It changes collection syntax where
parameters are list of objects instead of primitive strings. A
parameter has now 'name' and 'optional' properties. 'name' is required
and used in same way as older strings as parameter definitions.
'Optional' property is optional, 'false' is the default behavior if
undefined. It also adds additional validation to restrict parameter
names to alphanumeric strings to have a clear syntax in expressions.
This commit is contained in:
undergroundwires
2021-09-02 18:59:25 +01:00
parent dcccb61781
commit 6a89c6224b
51 changed files with 1311 additions and 354 deletions

View File

@@ -1,6 +1,8 @@
import { IReadOnlyFunctionParameterCollection } from './Parameter/IFunctionParameterCollection';
export interface ISharedFunction {
readonly name: string;
readonly parameters?: readonly string[];
readonly parameters: IReadOnlyFunctionParameterCollection;
readonly code: string;
readonly revertCode?: string;
}