mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
minor: link my own pratt parsing article :-)
This commit is contained in:
parent
d653995be4
commit
f692be853b
1 changed files with 1 additions and 2 deletions
|
@ -161,7 +161,6 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi, prefer_expr: bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn expr_block_contents(p: &mut Parser) {
|
pub(super) fn expr_block_contents(p: &mut Parser) {
|
||||||
// This is checked by a validator
|
|
||||||
attributes::inner_attrs(p);
|
attributes::inner_attrs(p);
|
||||||
|
|
||||||
while !p.at(EOF) && !p.at(T!['}']) {
|
while !p.at(EOF) && !p.at(T!['}']) {
|
||||||
|
@ -197,7 +196,7 @@ struct Restrictions {
|
||||||
|
|
||||||
/// Binding powers of operators for a Pratt parser.
|
/// Binding powers of operators for a Pratt parser.
|
||||||
///
|
///
|
||||||
/// See <https://www.oilshell.org/blog/2016/11/03.html>
|
/// See <https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html>
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
fn current_op(p: &Parser) -> (u8, SyntaxKind) {
|
fn current_op(p: &Parser) -> (u8, SyntaxKind) {
|
||||||
const NOT_AN_OP: (u8, SyntaxKind) = (0, T![@]);
|
const NOT_AN_OP: (u8, SyntaxKind) = (0, T![@]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue