Trying to parse a single line conditional where code tries to test the left hand is equal to the right hand.
{
user = {id: 'abc123'}
function_name() {...}
}
if (user.id === 'abc123...') { function_name() }
I've so far looked at these posts PEG-php parsing if statement and How to describe conditional statement (if-then-else) using PEG
PEG syntax is very alien to me, and I'm sure if it's even the right methodology for my needs. Might be overkill.
Currently using peg.js/peggy.js