archives

« Bugzilla Issues Index

#4124 — "is" -> "is an instance of (the production)"


In 13.1.{5 to 10} and 13.12.{10,11}, there are steps of the form:
If /Statement/ is /Statement/ : /LabelledStatement/, return ...

Using "is" here is a category error.
It would be better to say "is an instance of"
(or "is an instance of the production").

---

Similarly, in 15.2.1.{11,13,14}, there are steps that say:
If /ExportDeclaration/ is 'export' /VariableStatement/, return ...

It would be better to say:
If /ExportDeclaration/ is an instance of [the production]
/ExportDeclaration/ : 'export' /VariableStatement/, return ...


True, although I don't think anybody is actually confused by it.

How about "matches" or "matched"?


(In reply to Allen Wirfs-Brock from comment #1)
> True, although I don't think anybody is actually confused by it.

Probably not. The same could be said of many of the bugs I submit.

> How about "matches" or "matched"?

Currently, when the spec says "X matches production P", X is source text. (E.g. "Always throw a Syntax Error if code matches this production.") So a usage in which X is a node in the parse tree seems like a category error too. However, it's better than "is", so I'd live with it.


deferring to ES7 along with Bug 2985