This is an automated email from the ASF dual-hosted git repository.
thiagoelg pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 08bf97cc81a kie-issue#1192: On the DMN Editor's Boxed Expression
Editor, FEEL autocompletion does not suggest the type properties - Part 2 of 2
(#3397)
08bf97cc81a is described below
commit 08bf97cc81a5748ba880f02feca1b97ecbdd4907
Author: Daniel José dos Santos <[email protected]>
AuthorDate: Mon Feb 16 16:08:49 2026 -0300
kie-issue#1192: On the DMN Editor's Boxed Expression Editor, FEEL
autocompletion does not suggest the type properties - Part 2 of 2 (#3397)
---
.../src/parser/BuiltInTypes.ts | 48 ++
.../src/parser/FeelFunctionReturningTypes.ts | 125 ++++
.../src/parser/FeelIdentifiersParser.ts | 67 +-
.../src/parser/FeelSyntacticSymbolNature.ts | 10 +
.../src/parser/ReservedWords.ts | 104 +--
.../grammar/generated-parser/FEEL_1_1Visitor.ts | 749 +++++++++++++++++++++
.../src/parser/grammar/visitor/FeelVisitorImpl.ts | 303 +++++++++
.../src/parser/grammar/visitor/SemanticToken.ts | 80 +++
.../src/parser/grammar/visitor/VisitorResult.ts} | 36 +-
packages/feel-input-component/src/FeelConfigs.ts | 1 +
.../src/semanticTokensProvider.ts | 28 +-
.../feel-input-component/src/themes/Element.ts | 10 +
12 files changed, 1434 insertions(+), 127 deletions(-)
diff --git a/packages/dmn-feel-antlr4-parser/src/parser/BuiltInTypes.ts
b/packages/dmn-feel-antlr4-parser/src/parser/BuiltInTypes.ts
index d2098bd41fe..d49f8f6f6d8 100644
--- a/packages/dmn-feel-antlr4-parser/src/parser/BuiltInTypes.ts
+++ b/packages/dmn-feel-antlr4-parser/src/parser/BuiltInTypes.ts
@@ -159,4 +159,52 @@ export class BuiltInTypes {
feelSyntacticSymbolNature: FeelSyntacticSymbolNature.GlobalVariable,
},
};
+
+ public static readonly List: DataType = {
+ uuid: generateUuid(),
+ name: "list",
+ typeRef: "list",
+ properties: new Map(),
+ source: {
+ expressionsThatUseTheIdentifier: new Map<string, Expression>(),
+ value: "list",
+ feelSyntacticSymbolNature: FeelSyntacticSymbolNature.GlobalVariable,
+ },
+ };
+
+ public static readonly Any: DataType = {
+ uuid: generateUuid(),
+ name: "any",
+ typeRef: "any",
+ properties: new Map(),
+ source: {
+ expressionsThatUseTheIdentifier: new Map<string, Expression>(),
+ value: "any",
+ feelSyntacticSymbolNature: FeelSyntacticSymbolNature.GlobalVariable,
+ },
+ };
+
+ public static readonly Context: DataType = {
+ uuid: generateUuid(),
+ name: "context",
+ typeRef: "context",
+ properties: new Map(),
+ source: {
+ expressionsThatUseTheIdentifier: new Map<string, Expression>(),
+ value: "context",
+ feelSyntacticSymbolNature: FeelSyntacticSymbolNature.GlobalVariable,
+ },
+ };
+
+ public static readonly Range: DataType = {
+ uuid: generateUuid(),
+ name: "range",
+ typeRef: "range",
+ properties: new Map(),
+ source: {
+ expressionsThatUseTheIdentifier: new Map<string, Expression>(),
+ value: "range",
+ feelSyntacticSymbolNature: FeelSyntacticSymbolNature.GlobalVariable,
+ },
+ };
}
diff --git
a/packages/dmn-feel-antlr4-parser/src/parser/FeelFunctionReturningTypes.ts
b/packages/dmn-feel-antlr4-parser/src/parser/FeelFunctionReturningTypes.ts
new file mode 100644
index 00000000000..8a4a554dc82
--- /dev/null
+++ b/packages/dmn-feel-antlr4-parser/src/parser/FeelFunctionReturningTypes.ts
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { DataType } from "./DataType";
+import { BuiltInTypes } from "./BuiltInTypes";
+
+export class FeelFunctionReturningTypes {
+ public static readonly Index: ReadonlyMap<string, DataType> = new
Map<string, DataType>([
+ ["abs", BuiltInTypes.Number],
+ ["after", BuiltInTypes.Boolean],
+ ["all", BuiltInTypes.Boolean],
+ ["any", BuiltInTypes.Boolean],
+ ["append", BuiltInTypes.List],
+ ["before", BuiltInTypes.Boolean],
+ ["ceiling", BuiltInTypes.Number],
+ ["code", BuiltInTypes.Number],
+ ["coincides", BuiltInTypes.Boolean],
+ ["concatenate", BuiltInTypes.String],
+ ["contains", BuiltInTypes.Boolean],
+ ["context", BuiltInTypes.Context],
+ ["context put", BuiltInTypes.Context],
+ ["context merge", BuiltInTypes.Context],
+ ["count", BuiltInTypes.Number],
+ ["date", BuiltInTypes.Date],
+ ["date and time", BuiltInTypes.DateAndTime],
+ ["day of week", BuiltInTypes.String],
+ ["day of year", BuiltInTypes.Number],
+ ["decimal", BuiltInTypes.Number],
+ ["decision table", BuiltInTypes.Any],
+ ["distinct values", BuiltInTypes.List],
+ ["duration", BuiltInTypes.DaysAndTimeDuration],
+ ["during", BuiltInTypes.Boolean],
+ ["ends with", BuiltInTypes.Boolean],
+ ["even", BuiltInTypes.Boolean],
+ ["exp", BuiltInTypes.Number],
+ ["finished by", BuiltInTypes.Boolean],
+ ["finishes", BuiltInTypes.Boolean],
+ ["flatten", BuiltInTypes.List],
+ ["floor", BuiltInTypes.Number],
+ ["get entries", BuiltInTypes.List],
+ ["get value", BuiltInTypes.Any],
+ ["includes", BuiltInTypes.Boolean],
+ ["index of", BuiltInTypes.List],
+ ["insert before", BuiltInTypes.List],
+ ["invoke", BuiltInTypes.Any],
+ ["is", BuiltInTypes.Boolean],
+ ["list contains", BuiltInTypes.Boolean],
+ ["list replace", BuiltInTypes.List],
+ ["log", BuiltInTypes.Number],
+ ["lower case", BuiltInTypes.String],
+ ["matches", BuiltInTypes.Boolean],
+ ["max", BuiltInTypes.Any],
+ ["mean", BuiltInTypes.Number],
+ ["median", BuiltInTypes.Number],
+ ["meets", BuiltInTypes.Boolean],
+ ["met by", BuiltInTypes.Boolean],
+ ["min", BuiltInTypes.Any],
+ ["mode", BuiltInTypes.Number],
+ ["modulo", BuiltInTypes.Number],
+ ["month of year", BuiltInTypes.String],
+ ["nn all", BuiltInTypes.Boolean],
+ ["nn any", BuiltInTypes.Boolean],
+ ["nn count", BuiltInTypes.Number],
+ ["nn max", BuiltInTypes.Number],
+ ["nn mean", BuiltInTypes.Number],
+ ["nn median", BuiltInTypes.Number],
+ ["nn min", BuiltInTypes.Number],
+ ["nn mode", BuiltInTypes.Number],
+ ["nn stddev", BuiltInTypes.Number],
+ ["nn sum", BuiltInTypes.Number],
+ ["not", BuiltInTypes.Boolean],
+ ["now", BuiltInTypes.DateAndTime],
+ ["number", BuiltInTypes.Number],
+ ["odd", BuiltInTypes.Boolean],
+ ["overlaps after", BuiltInTypes.Boolean],
+ ["overlaps before", BuiltInTypes.Boolean],
+ ["overlaps", BuiltInTypes.Boolean],
+ ["product", BuiltInTypes.Number],
+ ["range", BuiltInTypes.Range],
+ ["remove", BuiltInTypes.List],
+ ["replace", BuiltInTypes.String],
+ ["reverse", BuiltInTypes.List],
+ ["round down", BuiltInTypes.Number],
+ ["round half down", BuiltInTypes.Number],
+ ["round half up", BuiltInTypes.Number],
+ ["round up", BuiltInTypes.Number],
+ ["sort", BuiltInTypes.List],
+ ["split", BuiltInTypes.List],
+ ["sqrt", BuiltInTypes.Number],
+ ["started by", BuiltInTypes.Boolean],
+ ["starts with", BuiltInTypes.Boolean],
+ ["starts", BuiltInTypes.Boolean],
+ ["stddev", BuiltInTypes.Number],
+ ["string", BuiltInTypes.String],
+ ["string join", BuiltInTypes.String],
+ ["string length", BuiltInTypes.Number],
+ ["sublist", BuiltInTypes.List],
+ ["substring after", BuiltInTypes.String],
+ ["substring before", BuiltInTypes.String],
+ ["substring", BuiltInTypes.String],
+ ["sum", BuiltInTypes.Number],
+ ["time", BuiltInTypes.Time],
+ ["today", BuiltInTypes.Date],
+ ["union", BuiltInTypes.List],
+ ["upper case", BuiltInTypes.String],
+ ["week of year", BuiltInTypes.Number],
+ ["years and months duration", BuiltInTypes.YearsAndMonthsDuration],
+ ]);
+}
diff --git
a/packages/dmn-feel-antlr4-parser/src/parser/FeelIdentifiersParser.ts
b/packages/dmn-feel-antlr4-parser/src/parser/FeelIdentifiersParser.ts
index d295e418ac1..8b24a963f89 100644
--- a/packages/dmn-feel-antlr4-parser/src/parser/FeelIdentifiersParser.ts
+++ b/packages/dmn-feel-antlr4-parser/src/parser/FeelIdentifiersParser.ts
@@ -29,6 +29,7 @@ import { IdentifierContext } from "./IdentifierContext";
import { ParsedExpression } from "./ParsedExpression";
import { FeelSyntacticSymbolNature } from "./FeelSyntacticSymbolNature";
import { Expression } from "./Expression";
+import { FeelVisitorImpl } from "./grammar/visitor/FeelVisitorImpl";
export class FeelIdentifiersParser {
private repository: IdentifiersRepository;
@@ -38,7 +39,6 @@ export class FeelIdentifiersParser {
}
public parse(variableContextUuid: string, expression: string):
ParsedExpression {
- const variables = new Array<FeelIdentifiedSymbol>();
const chars = new CharStream(expression);
const lexer = new FEEL_1_1Lexer(chars);
const feelTokens = new CommonTokenStream(lexer);
@@ -52,13 +52,72 @@ export class FeelIdentifiersParser {
// We're ignoring the errors for now
parser.removeErrorListeners();
- parser.expression();
+ // 1. Lexical analyzer = evaluates the tokens of a given string
+ // 2. Parser = Perform the Syntax Analysis, building a tree.
+ // 3. Semantic Analysis = the logical meaning and consistency in code. In
this stage we know that date() returns
+ // a object of type Date, and then we can not, for example, perform an add
operation with a boolean.
+ // At this stage we will get the type and return it.
+ // For future releases, we can also paint the expression if it has some
errors.
+
+ // After the parser, we navigate through the tree identifying the return
types of expressions.
+
+ parser.buildParseTrees = true;
+ const expressionContext = parser.compilation_unit();
+ const visitor = new FeelVisitorImpl();
+ visitor.visit(expressionContext);
+ const symbolsFromVisitor: FeelIdentifiedSymbol[] = [];
+ for (const visitedNodeResult of visitor.semanticTokens.filter(
+ (v) => v.symbolNature !== FeelSyntacticSymbolNature.TerminalNode
+ )) {
+ const scopeSymbols = [];
+ for (const [key, value] of visitedNodeResult.dataTypeReturn.properties) {
+ scopeSymbols.push({
+ name: key,
+ type: value.typeRef ?? value.name,
+ });
+ }
+
+ const symbol = new FeelIdentifiedSymbol(
+ visitedNodeResult.startIndex + 1,
+ visitedNodeResult.endIndex - visitedNodeResult.startIndex,
+ visitedNodeResult.startLine - 1,
+ visitedNodeResult.endLine - 1,
+ visitedNodeResult.symbolNature,
+ visitedNodeResult.text,
+ scopeSymbols
+ );
+
+ symbolsFromVisitor.push(symbol);
+ }
- variables.push(...parser.helper.variables);
+ const identifiedSymbols = [
+ ...parser.helper.variables.filter(
+ (fromParser) =>
+ !symbolsFromVisitor.find(
+ (s) =>
+ (s.startIndex === fromParser.startIndex &&
+ s.startLine === fromParser.startLine &&
+ s.length === fromParser.length &&
+ s.endLine == fromParser.endLine) ||
+ (fromParser.startLine === s.startLine &&
+ fromParser.endLine === s.endLine &&
+ fromParser.startIndex <= s.startIndex &&
+ fromParser.startIndex + fromParser.length >= s.startIndex +
s.length)
+ )
+ ),
+ ...symbolsFromVisitor,
+ ];
return {
availableSymbols: parser.helper.availableSymbols,
- feelIdentifiedSymbols: variables,
+ feelIdentifiedSymbols: identifiedSymbols.sort((a, b) => {
+ const lineComp = a.startLine - b.startLine;
+ if (lineComp !== 0) {
+ return lineComp;
+ } else {
+ return a.startIndex - b.startIndex;
+ }
+ }),
};
}
diff --git
a/packages/dmn-feel-antlr4-parser/src/parser/FeelSyntacticSymbolNature.ts
b/packages/dmn-feel-antlr4-parser/src/parser/FeelSyntacticSymbolNature.ts
index 3ff35d3177e..70a59967bf4 100644
--- a/packages/dmn-feel-antlr4-parser/src/parser/FeelSyntacticSymbolNature.ts
+++ b/packages/dmn-feel-antlr4-parser/src/parser/FeelSyntacticSymbolNature.ts
@@ -53,4 +53,14 @@ export enum FeelSyntacticSymbolNature {
* and are not available to the user.
*/
InvisibleVariables,
+
+ /**
+ * Call to FEEL functions. For example, date("2010-12-14").
+ */
+ FunctionCall,
+
+ /**
+ *
+ */
+ TerminalNode,
}
diff --git a/packages/dmn-feel-antlr4-parser/src/parser/ReservedWords.ts
b/packages/dmn-feel-antlr4-parser/src/parser/ReservedWords.ts
index 83e8cf04800..d8cb056c753 100644
--- a/packages/dmn-feel-antlr4-parser/src/parser/ReservedWords.ts
+++ b/packages/dmn-feel-antlr4-parser/src/parser/ReservedWords.ts
@@ -17,6 +17,8 @@
* under the License.
*/
+import { FeelFunctionReturningTypes } from "./FeelFunctionReturningTypes";
+
export class ReservedWords {
public static readonly FeelKeywords: ReadonlySet<string> = new Set<string>([
"and",
@@ -40,105 +42,5 @@ export class ReservedWords {
"true",
]);
- public static readonly FeelFunctions: ReadonlySet<string> = new Set<string>([
- "abs",
- "after",
- "all",
- "any",
- "append",
- "before",
- "ceiling",
- "code",
- "coincides",
- "concatenate",
- "contains",
- "context",
- "context put",
- "context merge",
- "count",
- "date",
- "date and time",
- "day of week",
- "day of year",
- "decimal",
- "decision table",
- "distinct values",
- "duration",
- "during",
- "ends with",
- "even",
- "exp",
- "finished by",
- "finishes",
- "flatten",
- "floor",
- "get entries",
- "get value",
- "includes",
- "index of",
- "insert before",
- "invoke",
- "is",
- "list contains",
- "list replace",
- "log",
- "lower case",
- "matches",
- "max",
- "mean",
- "median",
- "meets",
- "met by",
- "min",
- "mode",
- "modulo",
- "month of year",
- "nn all",
- "nn any",
- "nn count",
- "nn max",
- "nn mean",
- "nn median",
- "nn min",
- "nn mode",
- "nn stddev",
- "nn sum",
- "not",
- "now",
- "number",
- "odd",
- "overlaps after",
- "overlaps before",
- "overlaps",
- "product",
- "range",
- "remove",
- "replace",
- "reverse",
- "round down",
- "round half down",
- "round half up",
- "round up",
- "sort",
- "split",
- "sqrt",
- "started by",
- "starts with",
- "starts",
- "stddev",
- "string",
- "string join",
- "string length",
- "sublist",
- "substring after",
- "substring before",
- "substring",
- "sum",
- "time",
- "today",
- "union",
- "upper case",
- "week of year",
- "years and months duration",
- ]);
+ public static readonly FeelFunctions: ReadonlySet<string> = new
Set<string>(FeelFunctionReturningTypes.Index.keys());
}
diff --git
a/packages/dmn-feel-antlr4-parser/src/parser/grammar/generated-parser/FEEL_1_1Visitor.ts
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/generated-parser/FEEL_1_1Visitor.ts
new file mode 100644
index 00000000000..9e93b296138
--- /dev/null
+++
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/generated-parser/FEEL_1_1Visitor.ts
@@ -0,0 +1,749 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Generated from FEEL_1_1.g4 by ANTLR 4.13.0
+
+import { ParseTreeVisitor } from "antlr4";
+
+import { Compilation_unitContext } from "./FEEL_1_1Parser";
+import { ExpressionTextualContext } from "./FEEL_1_1Parser";
+import { TextualExpressionContext } from "./FEEL_1_1Parser";
+import { ParametersEmptyContext } from "./FEEL_1_1Parser";
+import { ParametersNamedContext } from "./FEEL_1_1Parser";
+import { ParametersPositionalContext } from "./FEEL_1_1Parser";
+import { NamedParametersContext } from "./FEEL_1_1Parser";
+import { NamedParameterContext } from "./FEEL_1_1Parser";
+import { PositionalParametersContext } from "./FEEL_1_1Parser";
+import { ForExpressionContext } from "./FEEL_1_1Parser";
+import { IterationContextsContext } from "./FEEL_1_1Parser";
+import { IterationContextContext } from "./FEEL_1_1Parser";
+import { IfExpressionContext } from "./FEEL_1_1Parser";
+import { QuantExprSomeContext } from "./FEEL_1_1Parser";
+import { QuantExprEveryContext } from "./FEEL_1_1Parser";
+import { ListTypeContext } from "./FEEL_1_1Parser";
+import { ContextTypeContext } from "./FEEL_1_1Parser";
+import { QnTypeContext } from "./FEEL_1_1Parser";
+import { FunctionTypeContext } from "./FEEL_1_1Parser";
+import { ListContext } from "./FEEL_1_1Parser";
+import { FunctionDefinitionContext } from "./FEEL_1_1Parser";
+import { FormalParametersContext } from "./FEEL_1_1Parser";
+import { FormalParameterContext } from "./FEEL_1_1Parser";
+import { ContextContext } from "./FEEL_1_1Parser";
+import { ContextEntriesContext } from "./FEEL_1_1Parser";
+import { ContextEntryContext } from "./FEEL_1_1Parser";
+import { KeyNameContext } from "./FEEL_1_1Parser";
+import { KeyStringContext } from "./FEEL_1_1Parser";
+import { NameDefinitionContext } from "./FEEL_1_1Parser";
+import { NameDefinitionWithEOFContext } from "./FEEL_1_1Parser";
+import { NameDefinitionTokensContext } from "./FEEL_1_1Parser";
+import { IterationNameDefinitionContext } from "./FEEL_1_1Parser";
+import { IterationNameDefinitionTokensContext } from "./FEEL_1_1Parser";
+import { AdditionalNameSymbolContext } from "./FEEL_1_1Parser";
+import { CondOrContext } from "./FEEL_1_1Parser";
+import { CondOrAndContext } from "./FEEL_1_1Parser";
+import { CondAndCompContext } from "./FEEL_1_1Parser";
+import { CondAndContext } from "./FEEL_1_1Parser";
+import { CompExpressionContext } from "./FEEL_1_1Parser";
+import { CompExpressionRelContext } from "./FEEL_1_1Parser";
+import { RelExpressionBetweenContext } from "./FEEL_1_1Parser";
+import { RelExpressionValueContext } from "./FEEL_1_1Parser";
+import { RelExpressionTestListContext } from "./FEEL_1_1Parser";
+import { RelExpressionAddContext } from "./FEEL_1_1Parser";
+import { RelExpressionInstanceOfContext } from "./FEEL_1_1Parser";
+import { ExpressionListContext } from "./FEEL_1_1Parser";
+import { AddExpressionMultContext } from "./FEEL_1_1Parser";
+import { AddExpressionContext } from "./FEEL_1_1Parser";
+import { MultExpressionPowContext } from "./FEEL_1_1Parser";
+import { MultExpressionContext } from "./FEEL_1_1Parser";
+import { PowExpressionUnaryContext } from "./FEEL_1_1Parser";
+import { PowExpressionContext } from "./FEEL_1_1Parser";
+import { FilterPathExpressionContext } from "./FEEL_1_1Parser";
+import { SignedUnaryExpressionPlusContext } from "./FEEL_1_1Parser";
+import { SignedUnaryExpressionMinusContext } from "./FEEL_1_1Parser";
+import { FnInvocationContext } from "./FEEL_1_1Parser";
+import { NonSignedUnaryExpressionContext } from "./FEEL_1_1Parser";
+import { UenpmPrimaryContext } from "./FEEL_1_1Parser";
+import { PrimaryLiteralContext } from "./FEEL_1_1Parser";
+import { PrimaryForExpressionContext } from "./FEEL_1_1Parser";
+import { PrimaryQuantifiedExpressionContext } from "./FEEL_1_1Parser";
+import { PrimaryIfExpressionContext } from "./FEEL_1_1Parser";
+import { PrimaryIntervalContext } from "./FEEL_1_1Parser";
+import { PrimaryListContext } from "./FEEL_1_1Parser";
+import { PrimaryContextContext } from "./FEEL_1_1Parser";
+import { PrimaryParensContext } from "./FEEL_1_1Parser";
+import { PrimaryUnaryTestContext } from "./FEEL_1_1Parser";
+import { PrimaryNameContext } from "./FEEL_1_1Parser";
+import { NumberLiteralContext } from "./FEEL_1_1Parser";
+import { BoolLiteralContext } from "./FEEL_1_1Parser";
+import { AtLiteralLabelContext } from "./FEEL_1_1Parser";
+import { StringLiteralContext } from "./FEEL_1_1Parser";
+import { NullLiteralContext } from "./FEEL_1_1Parser";
+import { AtLiteralContext } from "./FEEL_1_1Parser";
+import { AtLiteralValueContext } from "./FEEL_1_1Parser";
+import { PositiveUnaryTestIneqIntervalContext } from "./FEEL_1_1Parser";
+import { PositiveUnaryTestIneqContext } from "./FEEL_1_1Parser";
+import { PositiveUnaryTestIntervalContext } from "./FEEL_1_1Parser";
+import { SimplePositiveUnaryTestsContext } from "./FEEL_1_1Parser";
+import { PositiveSimplePositiveUnaryTestsContext } from "./FEEL_1_1Parser";
+import { NegatedSimplePositiveUnaryTestsContext } from "./FEEL_1_1Parser";
+import { PositiveUnaryTestDashContext } from "./FEEL_1_1Parser";
+import { PositiveUnaryTestContext } from "./FEEL_1_1Parser";
+import { PositiveUnaryTestsContext } from "./FEEL_1_1Parser";
+import { UnaryTestsRootContext } from "./FEEL_1_1Parser";
+import { UnaryTests_negatedContext } from "./FEEL_1_1Parser";
+import { UnaryTests_positiveContext } from "./FEEL_1_1Parser";
+import { UnaryTests_emptyContext } from "./FEEL_1_1Parser";
+import { EndpointContext } from "./FEEL_1_1Parser";
+import { IntervalContext } from "./FEEL_1_1Parser";
+import { QualifiedNameContext } from "./FEEL_1_1Parser";
+import { NameRefContext } from "./FEEL_1_1Parser";
+import { NameRefOtherTokenContext } from "./FEEL_1_1Parser";
+import { ReusableKeywordsContext } from "./FEEL_1_1Parser";
+
+/**
+ * This interface defines a complete generic visitor for a parse tree produced
+ * by `FEEL_1_1Parser`.
+ *
+ * @param <Result> The return type of the visit operation. Use `void` for
+ * operations with no return type.
+ */
+export default class FEEL_1_1Visitor<Result> extends ParseTreeVisitor<Result> {
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.compilation_unit`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitCompilation_unit?: (ctx: Compilation_unitContext) => Result;
+ /**
+ * Visit a parse tree produced by the `expressionTextual`
+ * labeled alternative in `FEEL_1_1Parser.expression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitExpressionTextual?: (ctx: ExpressionTextualContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.textualExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitTextualExpression?: (ctx: TextualExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `parametersEmpty`
+ * labeled alternative in `FEEL_1_1Parser.parameters`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitParametersEmpty?: (ctx: ParametersEmptyContext) => Result;
+ /**
+ * Visit a parse tree produced by the `parametersNamed`
+ * labeled alternative in `FEEL_1_1Parser.parameters`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitParametersNamed?: (ctx: ParametersNamedContext) => Result;
+ /**
+ * Visit a parse tree produced by the `parametersPositional`
+ * labeled alternative in `FEEL_1_1Parser.parameters`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitParametersPositional?: (ctx: ParametersPositionalContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.namedParameters`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNamedParameters?: (ctx: NamedParametersContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.namedParameter`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNamedParameter?: (ctx: NamedParameterContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.positionalParameters`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPositionalParameters?: (ctx: PositionalParametersContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.forExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitForExpression?: (ctx: ForExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.iterationContexts`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitIterationContexts?: (ctx: IterationContextsContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.iterationContext`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitIterationContext?: (ctx: IterationContextContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.ifExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitIfExpression?: (ctx: IfExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `quantExprSome`
+ * labeled alternative in `FEEL_1_1Parser.quantifiedExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitQuantExprSome?: (ctx: QuantExprSomeContext) => Result;
+ /**
+ * Visit a parse tree produced by the `quantExprEvery`
+ * labeled alternative in `FEEL_1_1Parser.quantifiedExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitQuantExprEvery?: (ctx: QuantExprEveryContext) => Result;
+ /**
+ * Visit a parse tree produced by the `listType`
+ * labeled alternative in `FEEL_1_1Parser.type`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitListType?: (ctx: ListTypeContext) => Result;
+ /**
+ * Visit a parse tree produced by the `contextType`
+ * labeled alternative in `FEEL_1_1Parser.type`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitContextType?: (ctx: ContextTypeContext) => Result;
+ /**
+ * Visit a parse tree produced by the `qnType`
+ * labeled alternative in `FEEL_1_1Parser.type`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitQnType?: (ctx: QnTypeContext) => Result;
+ /**
+ * Visit a parse tree produced by the `functionType`
+ * labeled alternative in `FEEL_1_1Parser.type`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitFunctionType?: (ctx: FunctionTypeContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.list`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitList?: (ctx: ListContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.functionDefinition`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitFunctionDefinition?: (ctx: FunctionDefinitionContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.formalParameters`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitFormalParameters?: (ctx: FormalParametersContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.formalParameter`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitFormalParameter?: (ctx: FormalParameterContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.context`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitContext?: (ctx: ContextContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.contextEntries`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitContextEntries?: (ctx: ContextEntriesContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.contextEntry`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitContextEntry?: (ctx: ContextEntryContext) => Result;
+ /**
+ * Visit a parse tree produced by the `keyName`
+ * labeled alternative in `FEEL_1_1Parser.key`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitKeyName?: (ctx: KeyNameContext) => Result;
+ /**
+ * Visit a parse tree produced by the `keyString`
+ * labeled alternative in `FEEL_1_1Parser.key`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitKeyString?: (ctx: KeyStringContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.nameDefinition`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNameDefinition?: (ctx: NameDefinitionContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.nameDefinitionWithEOF`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNameDefinitionWithEOF?: (ctx: NameDefinitionWithEOFContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.nameDefinitionTokens`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNameDefinitionTokens?: (ctx: NameDefinitionTokensContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.iterationNameDefinition`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitIterationNameDefinition?: (ctx: IterationNameDefinitionContext) =>
Result;
+ /**
+ * Visit a parse tree produced by
`FEEL_1_1Parser.iterationNameDefinitionTokens`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitIterationNameDefinitionTokens?: (ctx:
IterationNameDefinitionTokensContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.additionalNameSymbol`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitAdditionalNameSymbol?: (ctx: AdditionalNameSymbolContext) => Result;
+ /**
+ * Visit a parse tree produced by the `condOr`
+ * labeled alternative in `FEEL_1_1Parser.conditionalOrExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitCondOr?: (ctx: CondOrContext) => Result;
+ /**
+ * Visit a parse tree produced by the `condOrAnd`
+ * labeled alternative in `FEEL_1_1Parser.conditionalOrExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitCondOrAnd?: (ctx: CondOrAndContext) => Result;
+ /**
+ * Visit a parse tree produced by the `condAndComp`
+ * labeled alternative in `FEEL_1_1Parser.conditionalAndExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitCondAndComp?: (ctx: CondAndCompContext) => Result;
+ /**
+ * Visit a parse tree produced by the `condAnd`
+ * labeled alternative in `FEEL_1_1Parser.conditionalAndExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitCondAnd?: (ctx: CondAndContext) => Result;
+ /**
+ * Visit a parse tree produced by the `compExpression`
+ * labeled alternative in `FEEL_1_1Parser.comparisonExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitCompExpression?: (ctx: CompExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `compExpressionRel`
+ * labeled alternative in `FEEL_1_1Parser.comparisonExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitCompExpressionRel?: (ctx: CompExpressionRelContext) => Result;
+ /**
+ * Visit a parse tree produced by the `relExpressionBetween`
+ * labeled alternative in `FEEL_1_1Parser.relationalExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitRelExpressionBetween?: (ctx: RelExpressionBetweenContext) => Result;
+ /**
+ * Visit a parse tree produced by the `relExpressionValue`
+ * labeled alternative in `FEEL_1_1Parser.relationalExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitRelExpressionValue?: (ctx: RelExpressionValueContext) => Result;
+ /**
+ * Visit a parse tree produced by the `relExpressionTestList`
+ * labeled alternative in `FEEL_1_1Parser.relationalExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitRelExpressionTestList?: (ctx: RelExpressionTestListContext) => Result;
+ /**
+ * Visit a parse tree produced by the `relExpressionAdd`
+ * labeled alternative in `FEEL_1_1Parser.relationalExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitRelExpressionAdd?: (ctx: RelExpressionAddContext) => Result;
+ /**
+ * Visit a parse tree produced by the `relExpressionInstanceOf`
+ * labeled alternative in `FEEL_1_1Parser.relationalExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitRelExpressionInstanceOf?: (ctx: RelExpressionInstanceOfContext) =>
Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.expressionList`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitExpressionList?: (ctx: ExpressionListContext) => Result;
+ /**
+ * Visit a parse tree produced by the `addExpressionMult`
+ * labeled alternative in `FEEL_1_1Parser.additiveExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitAddExpressionMult?: (ctx: AddExpressionMultContext) => Result;
+ /**
+ * Visit a parse tree produced by the `addExpression`
+ * labeled alternative in `FEEL_1_1Parser.additiveExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitAddExpression?: (ctx: AddExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `multExpressionPow`
+ * labeled alternative in `FEEL_1_1Parser.multiplicativeExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitMultExpressionPow?: (ctx: MultExpressionPowContext) => Result;
+ /**
+ * Visit a parse tree produced by the `multExpression`
+ * labeled alternative in `FEEL_1_1Parser.multiplicativeExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitMultExpression?: (ctx: MultExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `powExpressionUnary`
+ * labeled alternative in `FEEL_1_1Parser.powerExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPowExpressionUnary?: (ctx: PowExpressionUnaryContext) => Result;
+ /**
+ * Visit a parse tree produced by the `powExpression`
+ * labeled alternative in `FEEL_1_1Parser.powerExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPowExpression?: (ctx: PowExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.filterPathExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitFilterPathExpression?: (ctx: FilterPathExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `signedUnaryExpressionPlus`
+ * labeled alternative in `FEEL_1_1Parser.unaryExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitSignedUnaryExpressionPlus?: (ctx: SignedUnaryExpressionPlusContext) =>
Result;
+ /**
+ * Visit a parse tree produced by the `signedUnaryExpressionMinus`
+ * labeled alternative in `FEEL_1_1Parser.unaryExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitSignedUnaryExpressionMinus?: (ctx: SignedUnaryExpressionMinusContext)
=> Result;
+ /**
+ * Visit a parse tree produced by the `fnInvocation`
+ * labeled alternative in `FEEL_1_1Parser.unaryExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitFnInvocation?: (ctx: FnInvocationContext) => Result;
+ /**
+ * Visit a parse tree produced by the `nonSignedUnaryExpression`
+ * labeled alternative in `FEEL_1_1Parser.unaryExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNonSignedUnaryExpression?: (ctx: NonSignedUnaryExpressionContext) =>
Result;
+ /**
+ * Visit a parse tree produced by the `uenpmPrimary`
+ * labeled alternative in `FEEL_1_1Parser.unaryExpressionNotPlusMinus`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitUenpmPrimary?: (ctx: UenpmPrimaryContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryLiteral`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryLiteral?: (ctx: PrimaryLiteralContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryForExpression`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryForExpression?: (ctx: PrimaryForExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryQuantifiedExpression`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryQuantifiedExpression?: (ctx: PrimaryQuantifiedExpressionContext)
=> Result;
+ /**
+ * Visit a parse tree produced by the `primaryIfExpression`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryIfExpression?: (ctx: PrimaryIfExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryInterval`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryInterval?: (ctx: PrimaryIntervalContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryList`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryList?: (ctx: PrimaryListContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryContext`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryContext?: (ctx: PrimaryContextContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryParens`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryParens?: (ctx: PrimaryParensContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryUnaryTest`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryUnaryTest?: (ctx: PrimaryUnaryTestContext) => Result;
+ /**
+ * Visit a parse tree produced by the `primaryName`
+ * labeled alternative in `FEEL_1_1Parser.primary`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPrimaryName?: (ctx: PrimaryNameContext) => Result;
+ /**
+ * Visit a parse tree produced by the `numberLiteral`
+ * labeled alternative in `FEEL_1_1Parser.literal`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNumberLiteral?: (ctx: NumberLiteralContext) => Result;
+ /**
+ * Visit a parse tree produced by the `boolLiteral`
+ * labeled alternative in `FEEL_1_1Parser.literal`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitBoolLiteral?: (ctx: BoolLiteralContext) => Result;
+ /**
+ * Visit a parse tree produced by the `atLiteralLabel`
+ * labeled alternative in `FEEL_1_1Parser.literal`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitAtLiteralLabel?: (ctx: AtLiteralLabelContext) => Result;
+ /**
+ * Visit a parse tree produced by the `stringLiteral`
+ * labeled alternative in `FEEL_1_1Parser.literal`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitStringLiteral?: (ctx: StringLiteralContext) => Result;
+ /**
+ * Visit a parse tree produced by the `nullLiteral`
+ * labeled alternative in `FEEL_1_1Parser.literal`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNullLiteral?: (ctx: NullLiteralContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.atLiteral`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitAtLiteral?: (ctx: AtLiteralContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.atLiteralValue`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitAtLiteralValue?: (ctx: AtLiteralValueContext) => Result;
+ /**
+ * Visit a parse tree produced by the `positiveUnaryTestIneqInterval`
+ * labeled alternative in `FEEL_1_1Parser.simplePositiveUnaryTest`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPositiveUnaryTestIneqInterval?: (ctx:
PositiveUnaryTestIneqIntervalContext) => Result;
+ /**
+ * Visit a parse tree produced by the `positiveUnaryTestIneq`
+ * labeled alternative in `FEEL_1_1Parser.simplePositiveUnaryTest`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPositiveUnaryTestIneq?: (ctx: PositiveUnaryTestIneqContext) => Result;
+ /**
+ * Visit a parse tree produced by the `positiveUnaryTestInterval`
+ * labeled alternative in `FEEL_1_1Parser.simplePositiveUnaryTest`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPositiveUnaryTestInterval?: (ctx: PositiveUnaryTestIntervalContext) =>
Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.simplePositiveUnaryTests`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitSimplePositiveUnaryTests?: (ctx: SimplePositiveUnaryTestsContext) =>
Result;
+ /**
+ * Visit a parse tree produced by the `positiveSimplePositiveUnaryTests`
+ * labeled alternative in `FEEL_1_1Parser.simpleUnaryTests`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPositiveSimplePositiveUnaryTests?: (ctx:
PositiveSimplePositiveUnaryTestsContext) => Result;
+ /**
+ * Visit a parse tree produced by the `negatedSimplePositiveUnaryTests`
+ * labeled alternative in `FEEL_1_1Parser.simpleUnaryTests`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNegatedSimplePositiveUnaryTests?: (ctx:
NegatedSimplePositiveUnaryTestsContext) => Result;
+ /**
+ * Visit a parse tree produced by the `positiveUnaryTestDash`
+ * labeled alternative in `FEEL_1_1Parser.simpleUnaryTests`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPositiveUnaryTestDash?: (ctx: PositiveUnaryTestDashContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.positiveUnaryTest`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPositiveUnaryTest?: (ctx: PositiveUnaryTestContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.positiveUnaryTests`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPositiveUnaryTests?: (ctx: PositiveUnaryTestsContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.unaryTestsRoot`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitUnaryTestsRoot?: (ctx: UnaryTestsRootContext) => Result;
+ /**
+ * Visit a parse tree produced by the `unaryTests_negated`
+ * labeled alternative in `FEEL_1_1Parser.unaryTests`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitUnaryTests_negated?: (ctx: UnaryTests_negatedContext) => Result;
+ /**
+ * Visit a parse tree produced by the `unaryTests_positive`
+ * labeled alternative in `FEEL_1_1Parser.unaryTests`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitUnaryTests_positive?: (ctx: UnaryTests_positiveContext) => Result;
+ /**
+ * Visit a parse tree produced by the `unaryTests_empty`
+ * labeled alternative in `FEEL_1_1Parser.unaryTests`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitUnaryTests_empty?: (ctx: UnaryTests_emptyContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.endpoint`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitEndpoint?: (ctx: EndpointContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.interval`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitInterval?: (ctx: IntervalContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.qualifiedName`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitQualifiedName?: (ctx: QualifiedNameContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.nameRef`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNameRef?: (ctx: NameRefContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.nameRefOtherToken`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNameRefOtherToken?: (ctx: NameRefOtherTokenContext) => Result;
+ /**
+ * Visit a parse tree produced by `FEEL_1_1Parser.reusableKeywords`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitReusableKeywords?: (ctx: ReusableKeywordsContext) => Result;
+}
diff --git
a/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/FeelVisitorImpl.ts
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/FeelVisitorImpl.ts
new file mode 100644
index 00000000000..c9efb61092f
--- /dev/null
+++
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/FeelVisitorImpl.ts
@@ -0,0 +1,303 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import FEEL_1_1Visitor from "../generated-parser/FEEL_1_1Visitor";
+import {
+ AddExpressionContext,
+ FilterPathExpressionContext,
+ FnInvocationContext,
+ NameRefContext,
+ ParametersEmptyContext,
+ ParametersNamedContext,
+ ParametersPositionalContext,
+ PrimaryParensContext,
+ QualifiedNameContext,
+ UenpmPrimaryContext,
+} from "../generated-parser/FEEL_1_1Parser";
+import { SemanticToken } from "./SemanticToken";
+import { ParserRuleContext, ParseTree, TerminalNode } from "antlr4";
+import { FeelFunctionReturningTypes } from "../../FeelFunctionReturningTypes";
+import { FeelSyntacticSymbolNature } from "../../FeelSyntacticSymbolNature";
+import { VisitorResult } from "./VisitorResult";
+import { BuiltInTypes } from "../../BuiltInTypes";
+import { DataType } from "../../DataType";
+import FEEL_1_1Lexer from "../generated-parser/FEEL_1_1Lexer";
+
+export class FeelVisitorImpl extends FEEL_1_1Visitor<VisitorResult |
undefined> {
+ private readonly handlers: Map<Function, (node: ParseTree) => VisitorResult>;
+ private readonly _semanticTokens: Array<SemanticToken>;
+ private readonly _normalizedFeelFunctionReturningTypes: ReadonlyMap<string,
DataType>;
+
+ public constructor() {
+ super();
+ this._semanticTokens = new Array<SemanticToken>();
+ this.handlers = new Map<Function, (node: ParseTree) => VisitorResult>([
+ [FilterPathExpressionContext, this.visitFilterPathExpression.bind(this)],
+ [FnInvocationContext, this.visitFnInvocation.bind(this)],
+ [NameRefContext, this.visitNameRef.bind(this)],
+ [AddExpressionContext, this.visitAddExpression.bind(this)],
+ [PrimaryParensContext, this.visitPrimaryParens.bind(this)],
+ [UenpmPrimaryContext, this.visitUenpmPrimary.bind(this)],
+ ]);
+
+ this._normalizedFeelFunctionReturningTypes = new Map(
+ Array.from(FeelFunctionReturningTypes.Index, ([key, value]) =>
[key.replaceAll(" ", ""), value])
+ );
+ }
+
+ private getSpecializedHandlerIfPresent(tree: ParseTree) {
+ for (const [klass, handler] of this.handlers) {
+ if (tree instanceof klass) {
+ return handler;
+ }
+ }
+ }
+
+ get semanticTokens(): Array<SemanticToken> {
+ return this._semanticTokens;
+ }
+
+ private resolveNames(nameContext: QualifiedNameContext | NameRefContext) {
+ const resolvedNames: VisitorResult[] = [];
+ if (!nameContext.children) {
+ return resolvedNames;
+ }
+
+ for (let i = 0; i < nameContext.children.length; i++) {
+ const child = nameContext.getChild(i);
+ if (child instanceof NameRefContext || child instanceof
QualifiedNameContext) {
+ resolvedNames.push(...this.resolveNames(child));
+ } else {
+ const visited = this.visit(child);
+ if (visited) {
+ resolvedNames.push();
+ }
+ }
+ }
+
+ return resolvedNames;
+ }
+
+ public override visit = (tree: ParseTree) => {
+ // If there is a specialized handler for that kind of node, we use it,
because it will know how to handle it.
+ // Otherwise, we just go through they children.
+ const specializedHandler = this.getSpecializedHandlerIfPresent(tree);
+ if (specializedHandler) {
+ return specializedHandler(tree);
+ } else if (tree instanceof ParserRuleContext) {
+ return this.visitChildren(tree);
+ } else if (tree instanceof TerminalNode) {
+ return new VisitorResult({ text: tree.getText(), dataType:
this.getBuiltInTypeFromNodeType(tree.symbol.type) });
+ }
+ return undefined;
+ };
+
+ public override visitChildren(ctx: ParserRuleContext) {
+ if (!ctx.children) {
+ return undefined;
+ }
+
+ const result = new Array<VisitorResult>();
+ const count = ctx.children?.length ?? 0;
+ for (let i = 0; i < count; i++) {
+ result.push(this.visit(ctx.children[i])!);
+ }
+
+ // In case of multiple children, probably we need a specialized handler to
deal with,
+ // but we are not doing that now because is one of the cases that we don't
+ // use in the autocomplete or colorize.
+ return result[0];
+ }
+
+ public override visitUenpmPrimary = (ctx: UenpmPrimaryContext) => {
+ if (ctx.primary() === null || ctx.qualifiedName() === null || ctx.children
=== null) {
+ return this.visitChildren(ctx);
+ }
+
+ // something DOT property
+ const beforeDot = this.visit(ctx.primary());
+ const afterDot = this.resolveNames(ctx.qualifiedName());
+
+ // Here, we care about the first result after dot
+ if (beforeDot && beforeDot.dataType.properties.has(afterDot[0].text)) {
+ const startIndex = ctx.qualifiedName().start.start - 1;
+ this._semanticTokens.push(
+ new SemanticToken({
+ startIndex: startIndex,
+ endIndex: startIndex + afterDot[0].text.length,
+ startLine: ctx.qualifiedName().start.line,
+ endLine: ctx.qualifiedName().start.line,
+ symbolNature: FeelSyntacticSymbolNature.LocalVariable,
+ dataTypeReturn: beforeDot.dataType.properties.get(afterDot[0].text)!,
+ text: afterDot[0].text,
+ })
+ );
+ }
+
+ const lastChildren = ctx.children[ctx.children.length - 1];
+ if (
+ lastChildren instanceof ParametersPositionalContext ||
+ lastChildren instanceof ParametersEmptyContext ||
+ lastChildren instanceof ParametersNamedContext
+ ) {
+ const text = afterDot[afterDot.length - 1].text;
+
+ // Each expression has a type of expected parameters.
+ if (this._normalizedFeelFunctionReturningTypes.has(text)) {
+ this._semanticTokens.push(
+ new SemanticToken({
+ startIndex: lastChildren.LPAREN().symbol.start,
+ endIndex: lastChildren.RPAREN().symbol.start,
+ startLine: lastChildren.LPAREN().symbol.line,
+ endLine: lastChildren.RPAREN().symbol.line,
+ symbolNature: FeelSyntacticSymbolNature.FunctionCall,
+ dataTypeReturn:
this._normalizedFeelFunctionReturningTypes.get(text)!,
+ text: "", // Empty string. It doesn't have a text.
+ })
+ );
+
+ return new VisitorResult({
+ text: ctx.getText(),
+ dataType: this._normalizedFeelFunctionReturningTypes.get(text),
+ });
+ }
+ }
+
+ return new VisitorResult({ text: ctx.getText(), dataType:
beforeDot?.dataType.properties.get(afterDot[0].text) });
+ };
+
+ public override visitPrimaryParens = (ctx: PrimaryParensContext) => {
+ const innerExpressionResult = this.visit(ctx.expression());
+
+ this._semanticTokens.push(
+ new SemanticToken({
+ startIndex: ctx.RPAREN().symbol.start - 1,
+ endIndex: ctx.RPAREN().symbol.start,
+ startLine: ctx.RPAREN().symbol.line,
+ endLine: ctx.RPAREN().symbol.line,
+ symbolNature: FeelSyntacticSymbolNature.FunctionCall,
+ dataTypeReturn: innerExpressionResult?.dataType ?? BuiltInTypes.Any,
+ text: ")",
+ })
+ );
+
+ return innerExpressionResult;
+ };
+
+ public override visitAddExpression = (ctx: AddExpressionContext) => {
+ const additiveExpression = ctx.additiveExpression();
+ const multiplicativeExpression = ctx.multiplicativeExpression();
+
+ const addResult = this.visit(additiveExpression);
+ const multResult = this.visit(multiplicativeExpression);
+
+ if (addResult && multResult && addResult?.dataType ===
multResult?.dataType) {
+ if (addResult.dataType === BuiltInTypes.Date) {
+ return new VisitorResult({ text: ctx.getText(), dataType:
BuiltInTypes.DaysAndTimeDuration });
+ } else {
+ return new VisitorResult({ text: ctx.getText(), dataType:
addResult.dataType });
+ }
+ } else {
+ // We return he right-most result, because the expression is
inconsistent.
+ // In this case, we can assume that the user is typing.
+ return new VisitorResult({ text: ctx.getText(), dataType:
multResult?.dataType });
+ }
+ };
+
+ public override visitNameRef = (ctx: NameRefContext) => {
+ return this.visitChildren(ctx);
+ };
+
+ public override visitFilterPathExpression = (ctx:
FilterPathExpressionContext) => {
+ if (ctx.filterPathExpression() === null || ctx.qualifiedName() === null ||
ctx.qualifiedName().children === null) {
+ return this.visitChildren(ctx);
+ }
+
+ const beforeDot = this.visit(ctx.filterPathExpression());
+ const afterDot = this.resolveNames(ctx.qualifiedName());
+
+ // Here, we care about the first result after dot
+ if (beforeDot?.dataType.properties.has(afterDot[0].text)) {
+ const startIndex = ctx.qualifiedName().start.start - 1;
+ this._semanticTokens.push(
+ new SemanticToken({
+ startIndex: startIndex,
+ endIndex: startIndex + afterDot[0].text.length,
+ startLine: ctx.qualifiedName().start.line,
+ endLine: ctx.qualifiedName().start.line,
+ symbolNature: FeelSyntacticSymbolNature.LocalVariable,
+ dataTypeReturn: beforeDot.dataType.properties.get(afterDot[0].text)!,
+ text: afterDot[0].text,
+ })
+ );
+ }
+
+ return new VisitorResult({ text: ctx.getText(), dataType:
beforeDot?.dataType.properties.get(afterDot[0].text) });
+ };
+
+ public override visitFnInvocation = (ctx: FnInvocationContext) => {
+ if (ctx.children?.length != 2) {
+ // It is a malformed expression.
+ return undefined;
+ }
+
+ const left = ctx.getChild(0).getText();
+ const right = ctx.getChild(1);
+
+ // Each expression has a type of expected parameters.
+ if (
+ this._normalizedFeelFunctionReturningTypes.has(left) &&
+ (right instanceof ParametersPositionalContext ||
+ right instanceof ParametersEmptyContext ||
+ right instanceof ParametersNamedContext)
+ ) {
+ this._semanticTokens.push(
+ new SemanticToken({
+ startIndex: right.LPAREN().symbol.start,
+ endIndex: right.RPAREN().symbol.start,
+ startLine: right.LPAREN().symbol.line,
+ endLine: right.RPAREN().symbol.line,
+ symbolNature: FeelSyntacticSymbolNature.FunctionCall,
+ dataTypeReturn:
this._normalizedFeelFunctionReturningTypes.get(left)!,
+ text: "", // Empty string. It doesn't have a text.
+ })
+ );
+
+ return new VisitorResult({ text: ctx.getText(), dataType:
this._normalizedFeelFunctionReturningTypes.get(left) });
+ } else {
+ return this.visit(right);
+ }
+ };
+
+ private getBuiltInTypeFromNodeType(nodeType: number) {
+ switch (nodeType) {
+ case FEEL_1_1Lexer.BooleanLiteral:
+ return BuiltInTypes.Boolean;
+ case FEEL_1_1Lexer.IntegerLiteral:
+ case FEEL_1_1Lexer.FloatingPointLiteral:
+ return BuiltInTypes.Number;
+ case FEEL_1_1Lexer.StringLiteral:
+ return BuiltInTypes.String;
+
+ // The other types we just don't care
+ default:
+ return BuiltInTypes.Any;
+ }
+ }
+}
diff --git
a/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/SemanticToken.ts
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/SemanticToken.ts
new file mode 100644
index 00000000000..5641be0b6cb
--- /dev/null
+++
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/SemanticToken.ts
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { FeelSyntacticSymbolNature } from "../../FeelSyntacticSymbolNature";
+import { DataType } from "../../DataType";
+
+/**
+ * Define a Semantic Token identified by {@link FeelVisitorImpl}.
+ */
+export class SemanticToken {
+ private readonly _startIndex: number;
+ private readonly _endIndex: number;
+ private readonly _startLine: number;
+ private readonly _endLine: number;
+ private readonly _symbolNature: FeelSyntacticSymbolNature;
+ private readonly _dataTypeReturn: DataType;
+ private readonly _text: string;
+
+ constructor(args: {
+ startIndex: number;
+ endIndex: number;
+ startLine: number;
+ endLine: number;
+ symbolNature: FeelSyntacticSymbolNature;
+ dataTypeReturn: DataType;
+ text: string;
+ }) {
+ this._startIndex = args.startIndex;
+ this._endIndex = args.endIndex;
+ this._symbolNature = args.symbolNature;
+ this._dataTypeReturn = args.dataTypeReturn;
+ this._startLine = args.startLine;
+ this._endLine = args.endLine;
+ this._text = args.text;
+ }
+
+ get startLine(): number {
+ return this._startLine;
+ }
+
+ get endLine(): number {
+ return this._endLine;
+ }
+
+ get text(): string {
+ return this._text;
+ }
+
+ get startIndex(): number {
+ return this._startIndex;
+ }
+
+ get endIndex(): number {
+ return this._endIndex;
+ }
+
+ get symbolNature(): FeelSyntacticSymbolNature {
+ return this._symbolNature;
+ }
+
+ get dataTypeReturn(): DataType {
+ return this._dataTypeReturn;
+ }
+}
diff --git a/packages/feel-input-component/src/themes/Element.ts
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/VisitorResult.ts
similarity index 56%
copy from packages/feel-input-component/src/themes/Element.ts
copy to
packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/VisitorResult.ts
index 1543ab821f9..c814031d488 100644
--- a/packages/feel-input-component/src/themes/Element.ts
+++
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/VisitorResult.ts
@@ -17,15 +17,29 @@
* under the License.
*/
-export enum Element {
- FeelKeyword,
- FeelNumeric,
- FeelBoolean,
- FeelString,
- FeelFunction,
- Variable,
- FunctionCall,
- UnknownVariable,
- FunctionParameterVariable,
- DynamicVariable,
+import { DataType } from "../../DataType";
+import { BuiltInTypes } from "../../BuiltInTypes";
+
+export class VisitorResult {
+ private readonly _dataType?: DataType;
+ private readonly _isTerminalNode: boolean;
+ private readonly _text: string;
+
+ constructor(args: { text: string; dataType?: DataType }) {
+ this._text = args.text;
+ this._isTerminalNode = !args.dataType;
+ this._dataType = args.dataType;
+ }
+
+ get dataType(): DataType {
+ return this._dataType ?? BuiltInTypes.Any;
+ }
+
+ get isTerminalNode(): boolean {
+ return this._isTerminalNode;
+ }
+
+ get text(): string {
+ return this._text;
+ }
}
diff --git a/packages/feel-input-component/src/FeelConfigs.ts
b/packages/feel-input-component/src/FeelConfigs.ts
index 9215e98b654..0d34c732911 100644
--- a/packages/feel-input-component/src/FeelConfigs.ts
+++ b/packages/feel-input-component/src/FeelConfigs.ts
@@ -42,6 +42,7 @@ export const feelTheme = ():
Monaco.editor.IStandaloneThemeData => {
{ token: Element[Element.UnknownVariable], foreground: "#ff0000",
fontStyle: "underline bold" },
{ token: Element[Element.FunctionParameterVariable], foreground:
"#036e9b", fontStyle: "italic" },
{ token: Element[Element.DynamicVariable], foreground: "#8b97a2",
fontStyle: "underline" },
+ { token: Element[Element.NonColorizedElement], fontStyle: "italic" },
],
colors: {
"editorLineNumber.foreground": "#000000",
diff --git a/packages/feel-input-component/src/semanticTokensProvider.ts
b/packages/feel-input-component/src/semanticTokensProvider.ts
index d05b6727e5b..2f07eb82d11 100644
--- a/packages/feel-input-component/src/semanticTokensProvider.ts
+++ b/packages/feel-input-component/src/semanticTokensProvider.ts
@@ -19,7 +19,7 @@
import * as Monaco from "@kie-tools-core/monaco-editor";
import { Element } from "./themes/Element";
-import { FeelSyntacticSymbolNature, FeelIdentifiers, ParsedExpression } from
"@kie-tools/dmn-feel-antlr4-parser";
+import { FeelIdentifiers, FeelSyntacticSymbolNature, ParsedExpression } from
"@kie-tools/dmn-feel-antlr4-parser";
export class SemanticTokensProvider implements
Monaco.languages.DocumentSemanticTokensProvider {
constructor(
@@ -91,16 +91,20 @@ export class SemanticTokensProvider implements
Monaco.languages.DocumentSemantic
// It is a variable that it is NOT split in multiple-lines
if (feelIdentifiedSymbol.startLine === feelIdentifiedSymbol.endLine) {
- tokenTypes.push(
- feelIdentifiedSymbol.startLine - previousLine, // lineIndex =
relative to the PREVIOUS line
- feelIdentifiedSymbol.startIndex - startOfPreviousVariable, //
columnIndex = relative to the start of the PREVIOUS token NOT to the start of
the line
- feelIdentifiedSymbol.length,
- this.getTokenTypeIndex(feelIdentifiedSymbol.feelSymbolNature),
- 0 // token modifier = not used so we keep it 0
- );
-
- previousLine = feelIdentifiedSymbol.startLine;
- startOfPreviousVariable = feelIdentifiedSymbol.startIndex;
+ const tokenType =
this.getTokenTypeIndex(feelIdentifiedSymbol.feelSymbolNature);
+
+ // Non-colorized elements can not be in multiple lines, that's why we
only handle it here.
+ if (tokenType !== Element.NonColorizedElement) {
+ tokenTypes.push(
+ feelIdentifiedSymbol.startLine - previousLine, // lineIndex =
relative to the PREVIOUS line
+ feelIdentifiedSymbol.startIndex - startOfPreviousVariable, //
columnIndex = relative to the start of the PREVIOUS token NOT to the start of
the line
+ feelIdentifiedSymbol.length,
+ tokenType,
+ 0 // token modifier = not used so we keep it 0
+ );
+ previousLine = feelIdentifiedSymbol.startLine;
+ startOfPreviousVariable = feelIdentifiedSymbol.startIndex;
+ }
} else {
// It is a MULTILINE variable.
// We colorize the first line of the variable and then other lines.
@@ -168,6 +172,8 @@ export class SemanticTokensProvider implements
Monaco.languages.DocumentSemantic
return Element.FunctionCall;
case FeelSyntacticSymbolNature.Parameter:
return Element.FunctionParameterVariable;
+ case FeelSyntacticSymbolNature.FunctionCall:
+ return Element.NonColorizedElement;
}
}
}
diff --git a/packages/feel-input-component/src/themes/Element.ts
b/packages/feel-input-component/src/themes/Element.ts
index 1543ab821f9..e98c993e36d 100644
--- a/packages/feel-input-component/src/themes/Element.ts
+++ b/packages/feel-input-component/src/themes/Element.ts
@@ -28,4 +28,14 @@ export enum Element {
UnknownVariable,
FunctionParameterVariable,
DynamicVariable,
+
+ /**
+ * NonColorizedElement is an element that have semantic value, but it
doesn't have custom colors.
+ * For example: date("2025-12-30").day
+ * date = FeelFunction
+ * ("2025-12-30") = NonColorizedElement
+ * . = dot
+ * day = FeelKeyword, in this case, a property of the result of the
date("2025-12-30")
+ */
+ NonColorizedElement,
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]