Return the original error if there's an unexpected trailing comma

This commit is contained in:
Joshua Warner 2021-12-18 12:25:35 -08:00
parent 7b9c8ed939
commit efa54287f1
3 changed files with 60 additions and 33 deletions

View file

@ -746,7 +746,10 @@ fn typed_ident<'a>() -> impl Parser<'a, Spaced<'a, TypedIdent<'a>>, ETypedIdent<
skip_first!(
word1(b':', ETypedIdent::HasType),
space0_before_e(
specialize(ETypedIdent::Type, type_annotation::located_help(min_indent)),
specialize(
ETypedIdent::Type,
type_annotation::located_help(min_indent, true)
),
min_indent,
ETypedIdent::Space,
ETypedIdent::IndentType,