Add intro inside of src/ directory
This commit is contained in:
parent
7763c74563
commit
07e3d9a8df
27
src/README.md
Normal file
27
src/README.md
Normal file
@ -0,0 +1,27 @@
|
||||
## Welcome to the Babel Codebase
|
||||
|
||||
Babel is broken down into three parts:
|
||||
|
||||
- Parsing
|
||||
- Transformation
|
||||
- Generation
|
||||
|
||||
**Parsing** is the process of turning a piece of code into an AST (Abstract
|
||||
Syntax Tree) which is a tree-like object of nodes that _describes_ the code.
|
||||
This makes it easier to transform the code over direct string manpulation.
|
||||
|
||||
**Transformation** is the process of taking an AST and manipulating it into
|
||||
a new one. For example, Babel might take an ES2015 ArrowFunction and transform
|
||||
it into a normal Function which will work in ES5 environments.
|
||||
|
||||
**Generation** is the process of turning an AST back into code. After Babel is
|
||||
done transforming the AST, the generation takes over to return normal code.
|
||||
|
||||
---
|
||||
|
||||
Babel's parsing step is done by Acorn. However, because Babel is implementing
|
||||
future standards it maintains a fork of Acorn in order to do it's job. You can
|
||||
see that fork in the "acorn" folder.
|
||||
|
||||
The transformation and generation steps are both handled inside of the Babel
|
||||
codebase itself, which is in the "babel" folder here.
|
||||
Loading…
x
Reference in New Issue
Block a user