How to temporarily prevent Rule1 from pushing value to stack?
23 views
Skip to first unread message
Cao Zhijun
unread,
Apr 11, 2016, 3:34:26 AM4/11/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to parboiled2.org User List
I have a Rule1 defined well, most of the times I need it to produce value to stack however sometimes I just want it to match and forget (no value pushed). How can I achieve this please? Must I copy code and define another Rule0 ?
Mathias Doenitz
unread,
Apr 11, 2016, 3:46:11 AM4/11/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to parboil...@googlegroups.com
Cao,
you can simply follow it with `~ drop[Int]` for example, if the value you want to drop is an `Int`.
If you want to drop more than one value you can say something like `~ drop[Int :: String :: Double :: HNil]`.
> On 10. 4 2016, at 17:10, Cao Zhijun <zhij...@gmail.com> wrote:
>
> I have a Rule1 defined well, most of the times I need it to produce value to stack however sometimes I just want it to match and forget (no value pushed). How can I achieve this please? Must I copy code and define another Rule0 ?
>