Skip to content

Nested date and time parses PositionalParameters as NamedParameters and in turn throws a syntax error #80

@makepanic

Description

@makepanic

Describe the Bug

When using the following expression, foo.bar seems to be incorrectly parsed as NamedParameters. I'd expect it to be PositionalParameters instead.

date and time(date(time(foo.bar)));
Image Image

Steps to Reproduce

  1. Parse date and time(date(time(foo.bar)))
  2. Get error

As a expressions.txt test it should expect something like:

date and time(date(time(foo.bar)))


==>

Expressions(
  DateTimeLiteral(
    DateTimeConstructor(date, and, time), "(",PositionalParameters(
        DateTimeLiteral(
            DateTimeConstructor(date), "(", PositionalParameters(
                DateTimeLiteral(
                    DateTimeConstructor(time), "(", PositionalParameters(
                        PathExpression(VariableName(...),VariableName(...))
                     ),")"
                )
            ),")"
        )
    ),")"
  )
)

But it gets Error: Expected PositionalParameters in DateTimeLiteral, got NamedParameters at 31

FEEL playground link

Expected Behavior

The expression should be parsed without issues

Environment

  • Library version: 2.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions