camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 479 forks source link

Incorrect grammar error for nested `date and time` #4557

Open barmac opened 5 days ago

barmac commented 5 days ago

Describe the bug

This expression reports a syntax error when there's none:

date and time(date(date and time(test.parameterName)))

https://nikku.github.io/feel-playground/?e=%7E3YCAkIC2gICAgICAgICymMpua5WVQ%2BMV29FR1gmQe%2F5g6W1EADZitE1tzx1INNABIPzx2Ut2aWd%2Ff9DaAIA%3D&c=%7B%7D&t=expression&st=true

I could only reproduce it with date and time.

Steps to reproduce

  1. Use the expression above
  2. now this happens

Expected behavior

No syntax error report

Environment

Additional context

Reported via https://camunda.slack.com/archives/C0693F1NFK5/p1727344651587489

nikku commented 4 days ago

Related to https://github.com/nikku/lezer-feel/issues/8, reported and fixed earlier.

nikku commented 4 days ago

The bigger thing that bugs me here is the missing feedback (what exactly is not parseable):

image

While other errors properly indicate:

image

nikku commented 18 hours ago

I looked into this topic; a fix is not easy, and must be done on the language grammar level.