Saturday, December 17, 2022

ReservedWord

ReservedWord

IdentifierName can be devided into ReservedWord and Identifier.

A keyword is a token that matches IdentifierName, but also has a syntactic use.

Many keywords are reserved words, but some are reserved only in certain contexts. contextual keywords(await and yield) belong to ReservedWord but sometimes can be used as identifiers.

Followings belong to Identifier but not intepreted as so under certain syntactic productions:

  • let, static
  • implements, interface, package, private, protected, public; but in future, they will become reserved.
  • as, async, from, get, meta, of, set

No comments:

Post a Comment