This is an automated email from the ASF dual-hosted git repository.

thiagoelg pushed a commit to branch 10.2.x
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/10.2.x by this push:
     new f3f8d28e899 [10.2.x] kie-issues#2310 [DMN-Editor] Backport fix to 
10.2.x branch (#3688)
f3f8d28e899 is described below

commit f3f8d28e899b91ded9a5ffa7e73aa32a9ce376c9
Author: Dietrich Schulten <[email protected]>
AuthorDate: Mon Aug 3 15:56:07 2026 +0200

    [10.2.x] kie-issues#2310 [DMN-Editor] Backport fix to 10.2.x branch (#3688)
    
    Co-authored-by: Thiago Lugli <[email protected]>
---
 .../src/parser/grammar/visitor/FeelVisitorImpl.ts          | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

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
index c9efb61092f..d9fb1d6a9c5 100644
--- 
a/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/FeelVisitorImpl.ts
+++ 
b/packages/dmn-feel-antlr4-parser/src/parser/grammar/visitor/FeelVisitorImpl.ts
@@ -135,7 +135,7 @@ export class FeelVisitorImpl extends 
FEEL_1_1Visitor<VisitorResult | undefined>
     const afterDot = this.resolveNames(ctx.qualifiedName());
 
     // Here, we care about the first result after dot
-    if (beforeDot && beforeDot.dataType.properties.has(afterDot[0].text)) {
+    if (afterDot?.length > 0 && 
beforeDot?.dataType.properties.has(afterDot[0].text)) {
       const startIndex = ctx.qualifiedName().start.start - 1;
       this._semanticTokens.push(
         new SemanticToken({
@@ -179,7 +179,10 @@ export class FeelVisitorImpl extends 
FEEL_1_1Visitor<VisitorResult | undefined>
       }
     }
 
-    return new VisitorResult({ text: ctx.getText(), dataType: 
beforeDot?.dataType.properties.get(afterDot[0].text) });
+    return new VisitorResult({
+      text: ctx.getText(),
+      dataType: afterDot?.length > 0 ? 
beforeDot?.dataType.properties.get(afterDot[0].text) : undefined,
+    });
   };
 
   public override visitPrimaryParens = (ctx: PrimaryParensContext) => {
@@ -233,7 +236,7 @@ export class FeelVisitorImpl extends 
FEEL_1_1Visitor<VisitorResult | undefined>
     const afterDot = this.resolveNames(ctx.qualifiedName());
 
     // Here, we care about the first result after dot
-    if (beforeDot?.dataType.properties.has(afterDot[0].text)) {
+    if (afterDot?.length > 0 && 
beforeDot?.dataType.properties.has(afterDot[0].text)) {
       const startIndex = ctx.qualifiedName().start.start - 1;
       this._semanticTokens.push(
         new SemanticToken({
@@ -248,7 +251,10 @@ export class FeelVisitorImpl extends 
FEEL_1_1Visitor<VisitorResult | undefined>
       );
     }
 
-    return new VisitorResult({ text: ctx.getText(), dataType: 
beforeDot?.dataType.properties.get(afterDot[0].text) });
+    return new VisitorResult({
+      text: ctx.getText(),
+      dataType: afterDot?.length > 0 ? 
beforeDot?.dataType.properties.get(afterDot[0].text) : undefined,
+    });
   };
 
   public override visitFnInvocation = (ctx: FnInvocationContext) => {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to