I'm trying to parse PHP code and I'm bumping into issues with heredocs. I'm wondering how can I parse them. I need a way to match a string that has been previously matched.Is this possible with PEG.js?
Note that if you use the parser actions in node.js with "use strict" then you must also add a ```{ var bodyTerminal; }``` initializer at the start of the grammar so that the global bodyTerminal variable is exposed between parser action blocks.