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

Camlp4 messes up comments within and after records. #4346

Closed
vicuna opened this issue Jul 18, 2007 · 2 comments
Closed

Camlp4 messes up comments within and after records. #4346

vicuna opened this issue Jul 18, 2007 · 2 comments
Milestone

Comments

@vicuna
Copy link

vicuna commented Jul 18, 2007

Original bug ID: 4346
Reporter: jm
Assigned to: @diml
Status: closed (set by @diml on 2013-12-24T08:48:53Z)
Resolution: reopened
Priority: low
Severity: minor
Version: 3.10+dev
Target version: 4.01.1+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Related to: #4545 #4713
Monitored by: @Chris00

Bug description

$ cat tst.ml
(** comment of t )
type t =
{
mutable a : int; (
* a )
mutable b : int; (
* b )
mutable c : int; (
* c )
mutable d : int; (
* d )
mutable e : int; (
* e )
}
(
* after )
$ camlp4o tst.ml
(
* comment of t )
type t =
{ (
* a ) (* b ) (* c ) mutable a : int; mutable b : int;
mutable c : int; mutable d : int; (
* d *) mutable e : int
}

cat tst_bis.ml
(** comment of t )
type t =
{
mutable a : int; (
* a )
mutable b : int; (
* b )
mutable c : int; (
* c )
mutable d : int; (
* d )
mutable e : int; (
* e )
}
(
* after )
()
$ camlp4o tst_bis.ml
(
* comment of t )
type t =
{ (
* a ) (* b ) (* c ) mutable a : int; mutable b : int;
mutable c : int; mutable d : int; (
* d ) mutable e : int
}
(
* e )
(
* after *)
let _ = ()

Additional information

This becomes extremely annoying when the output is intended to be used by ocamldoc.

@vicuna
Copy link
Author

vicuna commented Jul 18, 2007

Comment author: ertai

Dealing with comments while making structured program manipulation is still an open problem. I will try to improve it but not in the mean time.

@vicuna
Copy link
Author

vicuna commented Dec 22, 2013

Comment author: @ygrek

forwarded to camlp4/camlp4#6

@vicuna vicuna closed this as completed Dec 24, 2013
@vicuna vicuna added the camlp4 label Mar 14, 2019
@vicuna vicuna added this to the 4.01.1 milestone Mar 14, 2019
@vicuna vicuna assigned ghost Mar 14, 2019
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant