tree-sitter / tree-sitter-ruby

Ruby grammar for tree-sitter
MIT License
176 stars 58 forks source link

fix: rename reserved word “arguments” #229

Closed drwpow closed 1 year ago

drwpow commented 2 years ago

Fixes #228. arguments is a reserved word in JavaScript and throws errors in many parsers.

Checklist:

aibaars commented 1 year ago

Makes sense. I just looked up the relevant bits in the spec; arguments is not really a reserved word, but JS will still complain about it in strict mode.

https://tc39.es/ecma262/#sec-keywords-and-reserved-words

The names arguments and eval are not keywords, but they are subject to some restrictions in strict mode code. See 13.1.1, 8.6.4, 15.2.1, 15.5.1, 15.6.1, and 15.8.1.