Fixes a bug introduced in https://github.com/guybedford/es-module-lexer/pull/171 where the of keyword is not a banned keyword so isn't enough to check on its own. Instead this updates the check to verify the paren context to see if we are in a for statement or not instead of having of handled in the isExpressionKeyword function. I also verified again all the keywords in the isExpressionKeyword function are valid failures otherwise so this does fix the root cause.
Fixes a bug introduced in https://github.com/guybedford/es-module-lexer/pull/171 where the
of
keyword is not a banned keyword so isn't enough to check on its own. Instead this updates the check to verify the paren context to see if we are in a for statement or not instead of havingof
handled in theisExpressionKeyword
function. I also verified again all the keywords in theisExpressionKeyword
function are valid failures otherwise so this does fix the root cause.