consume trivias for type/const def

This commit is contained in:
csmoe 2019-01-04 12:22:57 +08:00
parent df591a1e48
commit 58139c558a

View File

@ -248,9 +248,8 @@ fn n_attached_trivias<'a>(
kind: SyntaxKind,
trivias: impl Iterator<Item = (SyntaxKind, &'a str)>,
) -> usize {
// FIXME: parse attached trivias of CONST_DEF/TYPE_DEF
match kind {
STRUCT_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | MODULE => {
CONST_DEF | TYPE_DEF | STRUCT_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | MODULE => {
let mut res = 0;
for (i, (kind, text)) in trivias.enumerate() {
match kind {