Skip to content

OPL parser does not recognize line comments after OR operator #1116

Closed
@fishstamp82

Description

@fishstamp82

Preflight checklist

Describe the bug

Importing namespaces from OPL fails if line comments // are declared immediately after the OR operator ||. I expect the comment operator to work despite what preceding token it follows.

Reproducing the bug

The setup is based on rewrites example, but where I added a docker-compose to launch it.

git clone https://github.com/fishstamp82/opl-bug && cd opl-bug

run

docker-compose up

Notice the error message complaining about non-defined namespaces, it is quite hard to pin it to the comment.

Relevant log output

msg=Failed to parse OPL config files at target file://./namespaces.keto.ts. audience=application error=map[me
ssage:error from 41:69 to 41:141: expected "this", got "// Will not parse this file due to the comment following the OR operator"

Relevant configuration

No response

Version

0.10.0-alpha.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker Compose

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions