Skip to content

pp_ser data directive IF condition ignored #202

Open
@phmarti

Description

@phmarti

The data directive processed by pp_ser allows an IF condition to enable/disable the serialization. The regex pattern matches IF . This behaviour leads to hard to fine bugs/errors as for example:

Example 1 (wrong):
!$ser data arr=arr IF(ASSOCIATED(arr))
In this the case the condition is ignored and pp_ser doesn't generate the expected IF condition.

Example 2(correct):
!$ser data arr=arr IF (ASSOCIATED(arr))
In this case the expected code is generated including the IF condition.

There should at least be a warning when the condition is ignored!

Changing the regex to IF is most likely a bad idea as it will match too many things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions