Parse trait alias as a distinct AST type

This commit is contained in:
Ryo Yoshida 2023-03-04 00:23:56 +09:00
parent 9b441b9c67
commit 2e7d2c2d04
No known key found for this signature in database
GPG key ID: E25698A930586171
11 changed files with 103 additions and 10 deletions

View file

@ -20,7 +20,7 @@ pub(super) fn trait_(p: &mut Parser<'_>, m: Marker) {
// trait Z<U> = where Self: T<U>;
generic_params::opt_where_clause(p);
p.expect(T![;]);
m.complete(p, TRAIT);
m.complete(p, TRAIT_ALIAS);
return;
}

View file

@ -135,6 +135,7 @@ pub enum SyntaxKind {
STATIC,
CONST,
TRAIT,
TRAIT_ALIAS,
IMPL,
TYPE_ALIAS,
MACRO_CALL,