You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5685 Reporter:@bobzhang Status: closed (set by @damiendoligez on 2015-01-09T23:49:51Z) Resolution: suspended Priority: normal Severity: minor Target version: undecided Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues Tags: patch
Bug description
value f x = <:expr< $list:x$ >> ;
will be accepted and the type is weird
list Ast.ident -> Ast.expr (This absolutely not what I want)
The problem comes from that in the parser entry
expr accept TRY val_longident which accept ANTIQUOT, and the context is changed.
I guess there maybe other similar bugs in other places. The patch is attached, plz review the patch. Thanks
Another problem, I added some tracing functionality for the parser in my in-home camlp4 which helps me a lot to pinpoint the problem. How about the idea to add some tracing for the parser?
I think it's better to document this unexpected behavior. Since the parser expr fails it will try to use the parser ident, ident happens to support list antiquot which people in general may thought it's expr that parse the antiquot, actually not.
Original bug ID: 5685
Reporter: @bobzhang
Status: closed (set by @damiendoligez on 2015-01-09T23:49:51Z)
Resolution: suspended
Priority: normal
Severity: minor
Target version: undecided
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Tags: patch
Bug description
value f x = <:expr<$list:x$ >> ;
will be accepted and the type is weird
list Ast.ident -> Ast.expr (This absolutely not what I want)
The problem comes from that in the parser entry
expr accept TRY val_longident which accept ANTIQUOT, and the context is changed.
I guess there maybe other similar bugs in other places. The patch is attached, plz review the patch. Thanks
Another problem, I added some tracing functionality for the parser in my in-home camlp4 which helps me a lot to pinpoint the problem. How about the idea to add some tracing for the parser?
File attachments
The text was updated successfully, but these errors were encountered: