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

regression: end locations wrong in camlp4 ast #5692

Closed
vicuna opened this issue Jul 20, 2012 · 1 comment
Closed

regression: end locations wrong in camlp4 ast #5692

vicuna opened this issue Jul 20, 2012 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jul 20, 2012

Original bug ID: 5692
Reporter: Hendrik Tews
Assigned to: @diml
Status: closed (set by @xavierleroy on 2015-12-11T18:07:23Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 4.00.0+beta2/+rc1
Fixed in version: 4.00.0+beta2/+rc1
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

Somewhere inside the camlp4 machinery, end locations are not
propagated any more. The result is that for many nodes in the camlp4
ast the end location is identical to the start location.

Severity major, because this will very likely break otags. Because of
missing or wrong location info, otags reparses fragments of the source.
In some cases it has to take the last or second last word. This can of
course only work with correct end locations.

For example, for "exception A of int" I see for the top StExc node

start_line 1, start_offset 0, end_line 1, end_offset 0

for "type t = int" I see for the top StTyp node

start_line 1, start_offset 0, end_line 1, end_offset 0

and there are many more cases...

@vicuna
Copy link
Author

vicuna commented Jul 20, 2012

Comment author: @diml

Fixed. Commits 12751 and 12752.

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added the camlp4 label Mar 14, 2019
@vicuna vicuna assigned ghost Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 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