Hi guys,
I have a problem with pegjs and I don't realize how to solve it.
I would like that my parser receives a boolean params (configuration property) to know if it should ignore the "ends of lines".
Depending of this param it should parse the input using one pegjs rule or another.
For example, suppose that I have my param, ignoreEOL, so
if ignoreEOL I want that my buffer rule be this
buffer "buffer"
= b:(!tag !comment c:. {return c})+
{ return ["buffer", b.join('')] }
but if the ignoreEOL is false the buffer rule should be this:
buffer "buffer"
= b:(!tag !comment !eol c:. {return c})+
{ return ["buffer", b.join('')] }
could you help me to fix this problem.
thanks,Jairo