On May 17, 2019, at 4:06 PM, Alex Buckley <alex.buck...@oracle.com> wrote:
> 
> the decision still has to be taken about whether "in a SwitchLabeledBlock" or 
> "in <something else>" is the proper context to recognize something new.

From Tagir's note it seems we want to use less
context than "in a SLB", because IDEs (and human
eyes) won't always have enough enclosing context
to classify the token.

It also seems like it would be workable to classify
"yield" as a keyword if it occurs at the beginning
of a statement.  This is almost exactly the same
place that "var" is classified as a conditional
keyword:  The place in a block where we might
be parsing either an expression-statement or
a declaration or a block-structured sub-statement.

So the rule for "yield" might be that it is classified
as a keyword exactly where "var" would be.  If
it were that easy, that would be nice, since we
have a precedent.

— John

Reply via email to