Skip to content

let and const are not keywords? #85

Answered by erights
dckc asked this question in Q&A
Discussion options

You must be logged in to vote

"const" is listed as a keyword at https://github.com/Agoric/TinySES/blob/92f6766a1a392b82f85f5d4dc89f53f73ce4dee9/src/tinyses.js#L58

On "let", I missed the note at
http://www.ecma-international.org/ecma-262/8.0/#sec-keywords
so I thought I could just start with the ES-grammar reserved words, except for the exceptions I knew about: "get" and "set". The other surprise mentioned in that note is "static", which should also be defined as reserved in TinySES.

Both "let" and "static" should be added to the RESERVED_WORD list at
https://github.com/Agoric/TinySES/blob/92f6766a1a392b82f85f5d4dc89f53f73ce4dee9/src/tinyses.js#L51

Thanks for catching this!

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

dckc
Jun 29, 2018
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by michaelfig
Comment options

dckc
Jun 30, 2018
Maintainer Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #7 on May 29, 2022 20:08.