Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Editorial: Remove unused steps from definitions of Contains #1519
... specifically, steps of the form:
As @allenwb points out, the intended use case for such steps does not occur in the spec.
And as I point out, these steps are semantically problematic.
If the intended use case ever does occur, I suspect we'll find a different way to handle it.
... specifically, steps of the form: If _symbol_ is an |Identifier| and StringValue of _symbol_ is the same value as the StringValue of |IdentifierName|, return *true*. Resolves issue #831. As @allenwb points out, the intended use case for such steps does not occur in the spec. And as I point out, these steps are semantically problematic. If the intended use case ever *does* occur, I'm guessing we'll find a different way to handle it.
Or we might try to introduce a form that abstracts over this kind of ContainsFoo operation, so that defining a new one isn't too burdensome.
Is Contains ever used with identifiers?
If not, then it might be better to do the following:
It's currently unclear where Contains stops. Does it jump from the syntactic grammar to the lexical grammar? I hope it doesn't, but the spec is ambiguous. While doing the above it would be good to clarify how Contains deals with that boundary (and on which side of that boundary reserved words and IdentifierName lie) in the definition of Contains.
The right-hand argument of
Here are all the right-hand args:
Yeah, I think that would work (assuming the syntactic/lexical boundary isn't a problem, see below).
What do you mean by "reserved words not in IdentifierName"? It seems to me that there's no such thing. (That is, any sequence of characters that matches
I believe it doesn't (currently) matter. That is, for the cases in which it is currently used,
It seems to me that the spec prefers to avoid talking about that boundary. Which might be one reason that these rules stop the recursion one step away from it.