reword HIR intro. Fix #116
This commit is contained in:
parent
5544506249
commit
ae516b0cc7
13
src/hir.md
13
src/hir.md
|
|
@ -1,11 +1,12 @@
|
||||||
# The HIR
|
# The HIR
|
||||||
|
|
||||||
The HIR – "High-level IR" – is the primary IR used in most of rustc.
|
The HIR – "High-level IR" – is the primary IR used in most of rustc. It is a
|
||||||
It is a desugared version of the "abstract syntax tree" (AST) that is generated
|
compiler-friendly representation of the abstract syntax tree (AST) that is
|
||||||
after parsing, macro expansion, and name resolution have completed. Many parts
|
generated after parsing, macro expansion, and name resolution have completed.
|
||||||
of HIR resemble Rust surface syntax quite closely, with the exception that some
|
Many parts of HIR resemble Rust surface syntax quite closely, with the
|
||||||
of Rust's expression forms have been desugared away (as an example, `for` loops
|
exception that some of Rust's expression forms have been desugared away. For
|
||||||
are converted into a `loop` and do not appear in the HIR).
|
example, `for` loops are converted into a `loop` and do not appear in the HIR.
|
||||||
|
This makes HIR more amenable to analysis than a normal AST.
|
||||||
|
|
||||||
This chapter covers the main concepts of the HIR.
|
This chapter covers the main concepts of the HIR.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue