Commit graph

8 commits

Author SHA1 Message Date
6b42f08fbc Change some if-the-exception blocks to assertions
This has only been done some parts of the code that are internal
to the parser at large.
2019-12-12 17:35:24 -05:00
bb2a7b5a95 Rewrite how parse errors are handled
Everything which can emit a parse error should have the error handler
and data stream as properties and use the ParseErrorEmitter trait to
avoid complicating the task of actually producing an error.

Normally the Parser would be expected to set the error handler before it
begins (this commit does not do this) and unset it after it's done.
Alternatively, the entire means of reporting errors can now be easily
replaced.
2019-12-12 15:23:15 -05:00
51ac79128b Multiple minor fixes 2019-12-11 23:28:32 -05:00
30003fce1f Fixed various issues with Data::consumeCharacterReference 2019-12-11 21:38:04 -06:00
ab507a177f Data::consumeCharacterReference checked for false instead of empty string 2019-12-11 19:44:45 -06:00
64d8a2ab2c Fixed infinite loop caused by Data::consumeWhile and consumeUntil 2019-12-10 22:48:02 -06:00
66ec4dab27 Fix character reference parsing 2018-08-31 13:25:05 -05:00
33363ab2d3 Fixed Data bug
• Fixed bug where Data::consumeWhile and Data::consumeUntil wouldn't move the pointer back one position if there were no matches.
• Changed DataStream to Data.
• Made each class have its own debug static property so each can print debug information separately.
2018-08-27 14:57:47 -05:00
Renamed from lib/DataStream.php (Browse further)