The Front End of a compiler is the first stage of the compilation process, responsible for reading the source code and creating direct representations of it.
In the Go compiler, this stage involves:
- Lexical Analysis: Scanning source code and tokenizing it.
- Parsing: Using a Recursive Descent Parser to convert tokens into a Concrete Syntax Tree (CST).
- Type Checking (Compiler): Verifying types and performing name resolution.
- IR Construction: Converting the Concrete Syntax Tree into an Abstract Syntax Tree (AST).
