Fix handling of literal patterns

Wrap them in a LiteralPat node so they can be distinguished from literal
expressions.
This commit is contained in:
Florian Diebold 2019-02-09 19:07:35 +01:00
parent 7ebde241c0
commit f1afc93353
10 changed files with 133 additions and 41 deletions

View file

@ -850,6 +850,7 @@ impl ExprCollector {
}
// TODO: implement
ast::PatKind::LiteralPat(_) => Pat::Missing,
ast::PatKind::SlicePat(_) | ast::PatKind::RangePat(_) => Pat::Missing,
};
let syntax_ptr = SyntaxNodePtr::new(pat.syntax());