4 ms·
Yep: https://searchfox.org/mozilla-central/source/parser/html/java/README.txt https://searchfox.org/mozilla-central/source/parser/html/jav... And more info: ht
by reubenmorais 2y ago
Yep: https://searchfox.org/mozilla-central/source/parser/html/java/README.txt https://searchfox.org/mozilla-central/source/parser/html/jav...
And more info: https://about.validator.nu/htmlparser/ https://about.validator.nu/htmlparser/
- Almondsetat 2y agoDoesn't GWT transpile to Javascript?
- esprehn 2y agoYes, that sentence is stating two different things: > The parser core compiles on Google Web Toolkit *and* can be automatically translated into C++
- Almondsetat 2y agoThen I don't understand why GWT was mentioned. Does compiling on GWT have anything to do with the finished C++ code?
- supergarfield 2y agoHuh, I was curious about how that was done, and it looks like it's a specialized Java to C++ converter: https://github.com/validator/htmlparser/blob/master/translator-src/nu/validator/htmlparser/cpptranslate/CppVisitor.java https://github.com/validator/htmlparser/blob/master/translat.... Looking at the source, it seems pretty easy to find Java programs that wouldn't compile correctly, but of course a fully general Java to C++ converter would be a huge undertaking. I guess with OK test coverage of the generated C++ code (which Firefox certainly has), editing the Java code remains doable.