<
branch and then treat the remaining && x < 5
as remaining input :/
Hi, I'm having a bit of trouble with reporting back the precise cause of parsing failures. I've got something like this:
val expr = ifExpr | letExpr | ... | identifier | literal
If my ifExpr
or letExpr
parser successfully parses the 'if' or 'let' token but fails later, I'd like to report this as the reason of the failure. Is there a way to achieve this?
Stream[F, Expr]
out, i.e. parse expression by expression
Expr
maybe has sub-exprs that I want to get later
trait Expr
case class FunctionF[F[_]](name: String, subExprs: Stream[F, Expr])
case class Function(name: String, subExprs: Vector[Expr]) extends Expr
I'm wondering how feasible something like this is? I'm recalling your ProfF example from memory and changing it to Stream and Vector, but I may have gotten something else wrong