News for hackers. Stuff that matters.
Re:Pratt Parsers: Expression Parsing Made Easy (2011) by danybittel on Sunday January 21, 2024 @03:52AM (#39076787)
I do have an error node, and it helps but it's still difficult. If I only typed

  if (cond &
It creates error nodes for if and &.. but none of them should show yet. (squiggly lines)

  if (cond & *
Now it should error on the multiply, except if multiply could also be a pointer.
Re:Pratt Parsers: Expression Parsing Made Easy (2011) by ww520 on Sunday January 21, 2024 @04:55PM (#39083485)
I would say both cases are errors in their current form. When more code is typed in, it can be parsed to validate again.