Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifier "TEST" is not indented correctly #310

Open
wildptr opened this issue Oct 17, 2020 · 2 comments
Open

Identifier "TEST" is not indented correctly #310

wildptr opened this issue Oct 17, 2020 · 2 comments

Comments

@wildptr
Copy link

wildptr commented Oct 17, 2020

Running ocp-indent on the following piece of code

          let inst =
            match op with
            | OP_TEST ->
              TEST (r1, o2)
            | _ -> CMP (r1, o2)
          in

yields

          let inst =
            match op with
            | OP_TEST ->
        TEST (r1, o2)
           | _ -> CMP (r1, o2)
        in

which is totally messed up. However, constructor names other than TEST do not seem to trigger this weird behavior.

ocp-indent --version: 1.8.1

@wildptr
Copy link
Author

wildptr commented Oct 17, 2020

I see that ocp-indent recognizes "TEST" as a preprocessor directive here. It would be nice if we add a configuration option that allows the user to turn off recognition of preprocessor directives when no preprocessor is being used.

@yminsky
Copy link
Collaborator

yminsky commented Oct 18, 2020

I think the support of TEST should just be deleted. This is a hangover from the bad-old camlp4 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants