to read and write. Syntax sugar such as PostCSS, JSX, Async to Promise Write once, let Virtual Machine run it everywhere Data structure for communication, like protobuf, thrift, JSON
} Front end — Tokenizer Middle end — AST Back end — Code Generator function, add, (, a, b, ), {, return, a, +, b, }… function _a(arg1, arg2) { return arg1 + arg2; };
VISITOR to handle a node while traversing the AST Every node has a PATH representing position in AST You can DO WHATEVER when you enter the node by the visitor function
in visitor. Same way like in other languages. Such as parsing CSS and transforming it. const yashu = 'some string' var zzw = function() { console.log(zzw) } const Zhihu = 'some string'; var Zhihu = function () { Zhihu.Zhihu(Zhihu); };