You'll detect this during parsing. It's not that you have a "wrong keyword", it's that you have an identifier (i.e. a variable name) appearing in a place where you don't expect. So, if your source code looks like:
reeeturn 3;
From the compiler's perspective, you're just using some variable named reeeturn
. That could be an error because a variable with that name isn't defined. Or, in this case, it's probably a syntax error to have a number follow an identifier.
But there's no lexical error here. It's a totally valid sequence of tokens: identifier, number, semicolon.