No subject

Mon Sep 7 16:40:22 PDT 2009

StringLiteral, I have to go through the following grammar chain:
    ExpressionStatement -> AssignmentExpression ->
ConditionalExpression -> (lots of operator precedence elided)
    -> LeftHandSideExpression -> NewExpression -> MemberExpression ->
PrimaryExpression -> Literal -> StringLiteral

One way to define "consists entirely" might be: an A that consists
entirely of B if it matches A and B and all tokens were consumed by
matching B.
That definition is consistent with
  "use strict"
but not
  "use strict";
since the ";" is actually part of the ExpressionStatement production.

Is there a definition of "consists entirely" that matches
  "use strict";
  "use strict"
but not
  ("use strict");

Or can the last be part of a directive prologue?

More information about the es-discuss mailing list