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
The phrase is not parsed as one str_item but a list of str_items. This makes it impossible to use <:str_item< .. >> as a constructor/pattern for one single str_item.
Original bug ID: 5387
Reporter: furuse
Assigned to: @diml
Status: closed (set by @xavierleroy on 2013-08-31T10:44:07Z)
Resolution: fixed
Priority: normal
Severity: tweak
Version: 3.12.1
Fixed in version: 3.12.1+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Bug description
<:str_item< let x = 1 >> currently represents the following data structure:
Ast.StSem (_loc,
(Ast.StVal (_loc, Ast.ReNil,
(Ast.BiEq (_loc, (Ast.PaId (_loc, (Ast.IdLid (_loc, "x")))),
(Ast.ExInt (_loc, "1")))))),
(Ast.StNil _loc))
The phrase is not parsed as one str_item but a list of str_items. This makes it impossible to use <:str_item< .. >> as a constructor/pattern for one single str_item.
I do not know what is the best solution, but Jake Donham has seen the same issue and written a nice blog entry. It contains a workaround: http://ambassadortothecomputers.blogspot.com/2010/03/reading-camlp4-part-5-filters.html
The text was updated successfully, but these errors were encountered: