File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ HIR and MIR, allowing for more informative error reporting.
11
11
12
12
[ span ] : https://doc.rust-lang.org/nightly/nightly-rustc/syntax/source_map/struct.Span.html
13
13
14
- A ` Span ` can be looked up in a [ ` SourceMap ` ] [ sourcemap ] to get a "snippet" useful
15
- for displaying errors with [ ` span_to_snippet ` ] [ sptosnip ] and other similar
16
- methods on the ` SourceMap ` .
14
+ A ` Span ` can be looked up in a [ ` SourceMap ` ] [ sourcemap ] to get a "snippet"
15
+ useful for displaying errors with [ ` span_to_snippet ` ] [ sptosnip ] and other
16
+ similar methods on the ` SourceMap ` .
17
17
18
18
[ sourcemap ] : https://doc.rust-lang.org/nightly/nightly-rustc/syntax/source_map/struct.SourceMap.html
19
19
[ sptosnip ] : https://doc.rust-lang.org/nightly/nightly-rustc/syntax/source_map/struct.SourceMap.html#method.span_to_snippet
Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ The `syntax` crate contains several main players,
23
23
nodes.
24
24
25
25
The main entrypoint to the parser is via the various ` parse_* ` functions in the
26
- [ parser module] . They let you do things like turn a [ ` SourceFile ` ] [ sourcefile ] (e.g.
27
- the source in a single file) into a token stream, create a parser from the
28
- token stream, and then execute the parser to get a ` Crate ` (the root AST node).
26
+ [ parser module] . They let you do things like turn a [ ` SourceFile ` ] [ sourcefile ]
27
+ (e.g. the source in a single file) into a token stream, create a parser from
28
+ the token stream, and then execute the parser to get a ` Crate ` (the root AST
29
+ node).
29
30
30
31
To minimise the amount of copying that is done, both the ` StringReader ` and
31
32
` Parser ` have lifetimes which bind them to the parent ` ParseSess ` . This contains
You can’t perform that action at this time.
0 commit comments