Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): reserved words are not blocked (#3179)
Fixes #3110 This is list is pretty naive, I think we should eventually do some mangling/cleanup of the JS we emit to avoid so many reserved values. Since I believe there's more work to do, I didn't touch the spec yet (See #1964). This change will at least prevent strange runtime errors due to using reserved words. Added a special case for "constructor" as a method name, since it's not technically reserved elsewhere. Misc: - Changed the add_error in the parser to have a version that doesn't return anything. Sorry that this caused a bit of a noisy diff but I was so tired of that dumb `let _ = ...` thing ## Checklist - [x] Title matches [Winglang's style guide](https://docs.winglang.io/contributing/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
- Loading branch information