We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7b1ed0 commit 3c98b0fCopy full SHA for 3c98b0f
src/the-parser.md
@@ -1 +1,14 @@
1
-# The parser
+# The Parser
2
+
3
+The parser is responsible for converting raw Rust source code into a structured
4
+form which is easier for the compiler to work with, usually called an *Abstract
5
+Syntax Tree*. The bulk of the parser lives in the [libsyntax] crate.
6
7
+The parsing process is made up of roughly 3 stages,
8
9
+- lexical analysis - turn a stream of characters into a stream of token trees
10
+- macro expansion - run `proc-macros` and expand `macro_rules` macros
11
+- parsing - turn the token trees into an AST
12
13
14
+[libsyntax]: https://github.com/rust-lang/rust/tree/master/src/libsyntax
0 commit comments