After working with GameMaker, parsers, compilers, and web-based tools for years, I have grown increasingly curious as to just how hard it is to compile GML to JavaScript.
As it turned out, pretty hard - while GML does look akin to JS, it spots substantial differences both in what is considered valid syntax and in actual workings. As a bonus, the official implementation is a big black box, meaning that any assumptions about inner workings would have to be either based on examining output code or be pure guesswork as such.
Having written numerous syntax parsers in past, I was able to mimic how GameMaker itself works very accurately - down to little-known quirks and seemingly-illegal constructs.
Having written numerous custom code transpilers and generators, I was able to make the program perform sufficient compile-time analysis and generate equivalent and fairly clean JS code for input GML.
Having worked with GameMaker's HTML5 target since it's introduction, I was able to make the generated code "link up" with a running GMS-HTML5 game, allowing it to use the built-in functions directly. And not only that, but I actually made the tool "patch up" multiple built-in functions which were not working like their non-web counterparts (an issue that I was able to personally address few years later).
Having worked with JavaScript (/ECMAScript) itself for a while as well,
I was able to extend Ace editor to fully support GML and behave similarly to
GM itself (or, sometimes, better).
The result is a web-based piece of software which a allows the user to write and run practically any GameMaker code right in the browser. While there are, of course, some limitations, it is considered very impressive, and is something that wasn't previously thought as be possible at all.
In 2018 the tool had seen a major design update and is now also included with GMEdit.
Links:
blog post
web version