Closed darichey closed 2 years ago
This is a good catch! It's not totally correct however, as this allows or
by itself to be parsed as an expression. You shouldn't change expect_ident
. You can instead inline it into parse_attr
and add another case for TOKEN_OR
.
Oh right, oops! Fixed
Summary & Motivation
When expecting an identifier in
expect_ident
, allow eitherTOKEN_IDENT
ORTOKEN_OR
.Also adds a getter for the token in the typed Ident.
Further context
Fixes #127