File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 4
4
//! The principal difference between HIR and syntax trees is that HIR is bound
5
5
//! to a particular crate instance. That is, it has cfg flags and features
6
6
//! applied. So, the relation between syntax and HIR is many-to-one.
7
+ //!
8
+ //! HIR is the public API of the all of the compiler logic above syntax trees.
9
+ //! It is written in "OO" style. Each type is self contained (as in, it knows it's
10
+ //! parents and full context). It should be "clean code".
11
+ //!
12
+ //! `ra_hir_*` crates are the implementation of the compiler logic.
13
+ //! They are written in "ECS" style, with relatively little abstractions.
14
+ //! Many types are not self-contained, and explicitly use local indexes, arenas, etc.
15
+ //!
16
+ //! `ra_hir` is what insulates the "we don't know how to actually write an incremental compiler"
17
+ //! from the ide with completions, hovers, etc. It is a (soft, internal) boundary:
18
+ //! https://www.tedinski.com/2018/02/06/system-boundaries.html.
7
19
8
20
#![ recursion_limit = "512" ]
9
21
You can’t perform that action at this time.
0 commit comments