Skip to content

Be more relaxed about ppx attributes. #15

@jordwalke

Description

@jordwalke

In Reason, we preserve the original string content in the AST and attach them to parsed strings (which are manipulated to some extent by the parsing process).

When you write:

let%test "literal" = ..

You effectively end up with:

let%test ("literal" [@@reason.literal_value "literal"]) = ...

And the ppx_inline_test ppx reports: "Error: Attributes not allowed here"

If we'd like to use ppx_inline_test with Reason, then we will need ppx_inline_test to be a little more relaxed about allowing attributes on the string literal. Is this possible?

reasonml/reason#2134

Metadata

Metadata

Assignees

No one assigned

    Labels

    forwarded-to-js-devsThis report has been forwarded to Jane Street's internal review system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions