Syntax Error Handling
Oga should be capable of dealing with invalid XML/HTML up to a certain extend. To deal with this an input correction system would have to be implemented at the lowest level possible.
Initially I thought about implementing this between the lexer and the parser. The problem however is is that tokens from the lexer are emitted one by one instead as a whole. As a result of this you can not keep track of what context you're currently in without hindering performance. An alternative solution is to do this on parser (Racc) level.
Regardless of where it takes place this system should be capable of correcting most common mistakes. However, I don't want to sacrifice too much for the sake of forgiving invalid input. In other words, there has to be a balance between forgivingness and correctness.