From 55bc883842af5dee2d7eedd4f9c06a4ee5573add Mon Sep 17 00:00:00 2001 From: Yeser Amer Date: Fri, 9 Feb 2024 01:26:41 +0100 Subject: [PATCH] kie-issues#672: Implement DMN 1.5 new FEEL functions support (range) in the new DMN Editor (#2152) --- .../src/parser/ReservedWords.ts | 1 + packages/feel-input-component/src/FeelConfigs.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/packages/dmn-feel-antlr4-parser/src/parser/ReservedWords.ts b/packages/dmn-feel-antlr4-parser/src/parser/ReservedWords.ts index 90d58c99bbf..83e8cf04800 100644 --- a/packages/dmn-feel-antlr4-parser/src/parser/ReservedWords.ts +++ b/packages/dmn-feel-antlr4-parser/src/parser/ReservedWords.ts @@ -111,6 +111,7 @@ export class ReservedWords { "overlaps before", "overlaps", "product", + "range", "remove", "replace", "reverse", diff --git a/packages/feel-input-component/src/FeelConfigs.ts b/packages/feel-input-component/src/FeelConfigs.ts index 1462d70afe0..85b2d9a0374 100644 --- a/packages/feel-input-component/src/FeelConfigs.ts +++ b/packages/feel-input-component/src/FeelConfigs.ts @@ -1161,6 +1161,19 @@ export const feelDefaultSuggestions = (): Monaco.languages.CompletionItem[] => { parameters: [["list", `\`list\` of \`number\` elements`]], examples: ["product( [2, 3, 4] ) = 24", "product( [] ) = null", "product( 2, 3, 4 ) = 24"], }, + { + label: "range(from)", + insertText: "range($1)", + description: "Convert from a range `string` to a `range`.", + parameters: [["from", `range \`string\``]], + examples: [ + 'range( "[18..21)" ) is [18..21)', + 'range( "[2..)" ) is >=2', + 'range( "(..2)" ) is <2', + 'range( "" ) is null', + 'range( "[..]" ) is null', + ], + }, { label: "remove(list, position)", insertText: "remove($1, $2)",