Skip to content

Commit

Permalink
Auto merge of rust-lang#16313 - Urhengulas:tidy-syntax-docs, r=lnicola
Browse files Browse the repository at this point in the history
minor: Remove newline and add dot in syntax docs

While reading through the docs I came across these two small typos.
  • Loading branch information
bors committed Jan 8, 2024
2 parents 598511b + d94f572 commit 12e7aa3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/dev/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Syntax trees are a semi-transient data structure.
In general, frontend does not keep syntax trees for all files in memory.
Instead, it *lowers* syntax trees to more compact and rigid representation, which is not full-fidelity, but which can be mapped back to a syntax tree if so desired.


### GreenNode

GreenNode is a purely-functional tree with arbitrary arity. Conceptually, it is equivalent to the following run of the mill struct:
Expand Down Expand Up @@ -500,7 +499,7 @@ Specifically, `TreeSink` constructs the tree in lockstep with draining the origi
In the process, it records which tokens of the tree correspond to which tokens of the input, by using text ranges to identify syntax tokens.
The end result is that parsing an expanded code yields a syntax tree and a mapping of text-ranges of the tree to original tokens.

To deal with precedence in cases like `$expr * 1`, we use special invisible parenthesis, which are explicitly handled by the parser
To deal with precedence in cases like `$expr * 1`, we use special invisible parenthesis, which are explicitly handled by the parser.

### Whitespace & Comments

Expand Down

0 comments on commit 12e7aa3

Please sign in to comment.