I was having fun updating my parser, which now parses ActionScript 3 and MXML, and futurely, maybe, the CSS3 subset of Apache Royale.
I've done the MXML parser pretty quickly and it's just an UTF-8 XML 1.0 parser, with full source location information. I've not used the xml
crate because the purpose is for the parser to be used by compiler and IDEs (but I've no plans of building a compiler or a language server). If there's anything important to do that I missed in respect to the XML version 1.0 specification, I appreciate any pointers.
Also, I've not been strict to the specification since it's too much to read. I've used the htmlentity
crate to unescape XML entities just as HTML entities.
parse_mxml_element()
parse_mxml_content()
process_mxml_attribute()
process_mxml_tag_name()
process_xml_pi()
Note that I may consider running cargo clippy
later.
Error recovery: the error recovery might not be that clever, but at least it does basic error recovery.