Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 809 Bytes

ARCHITECTURE.md

File metadata and controls

30 lines (23 loc) · 809 Bytes

In general scheme follows:

Parser -> ?Optimizer -> Transpiler -> Generator -> Bundler

Parser

Parser produces AST from source code. Additionally, it allocates all symbols. Symbol - is a mediator to bind Identifier to it's Ref . During parse stage we don't try to resolve identifiers because of all the ambiguities present when parsing javascript.

Instead, we reference all symbols after parse was complete. This is done w/o traversing over AST as all symbols stored separately in Module's SymbolsScope.

?Optimizer

Question stands for an optional step. Optimizations available: TODO

Transpiler

Transpiler will modify AST to conform target ES version.

Generator

Produces code from AST and generates source map.

Bundler

Bundles all modules into chunks.