NOTE: I'm not sharing compiler progress this time.
If you write a large codebase in ActionScript 3.0, you're currently relying on ASC 2.0 to compile it. Some ASC 2.0 forks are publicly available on GitHub (inside Flex SDK for example). I've various experiences related to ActionScript and web, but I currently like how the language is statically similiar to ECMAScript 3. In 2017 I begant to expend time in parsing and verifying it and creating a compiler (a bit before I just looked at luaparse and esprima repositories at GitHub, which parse (Lua, ECMAScript)). With one language project, I'd support
enum in ActionScript 3.0, but I couldn't implement it the very way I wanted (besides, the language's compiler sources ended up in Java).
One of the recent rewrites of my compiler (parsing, verifying) was in AS3, but ASC 2.0 generated ABC with bug (Control Flow Graph related).
I was already aware of Haxe in 2016, but it's not at all syntatically following ActionScript 3.0 (example:
const keyword?), generic instantiation syntax (A<B> rather than A.<B>), meta data annotation (
@:data rather than
[Data]) and regex literal) and on naming conventions it's similiar to Rust (
MyEnum.SomeConst rather than
"someConst"). And constant inference with
enum looks ugly (why not a string literal? It's
f(SomeConst) rather than
enum member inference part applying string literal to
enum, in ActionScript 3.0 it could be adapted as an implicit conversion (constant), resulting into a compile-time value symbol of the
var e:E = "member"). In my viewpoint
enum could consist of members that are internal (num, str) pairs, where data for each constant can be attached via a static Dictionary within the
I'm still willing to try to write a compiler in ActionScript 3.0, this time trying to not use isoteric features of ASC 2.0 (such as globbing all
.as sources recursively) I just discovered, but will this CFG (Control Flow Graph) issue still occur in ASC 2.0?