Skip to content

Commit

Permalink
revert changes that unrelated to the main issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cometkim committed May 25, 2024
1 parent 06ec128 commit 80a9fea
Show file tree
Hide file tree
Showing 19 changed files with 397 additions and 434 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Copy exes to platform bin dirs
run: node ./scripts/copyExes.js
Expand Down Expand Up @@ -171,7 +170,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Install npm packages
run: npm ci --ignore-scripts
Expand Down Expand Up @@ -282,7 +280,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: NPM install
run: npm ci --ignore-scripts
Expand Down Expand Up @@ -346,7 +343,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -380,7 +376,6 @@ jobs:
with:
node-version: 18
registry-url: https://registry.npmjs.org # Needed to make auth work for publishing
cache: npm

- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
- Turn off transformation for closures inside loops when capturing loop variables, now that `let` is emitted instead of `var`. https://github.com/rescript-lang/rescript-compiler/pull/6480
- Fix formatter eats comments on the first argument of a uncurried function. https://github.com/rescript-lang/rescript-compiler/pull/6763
- Fix formatter removes parens in pipe operator with anonymous uncurried function. https://github.com/rescript-lang/rescript-compiler/pull/6766
- Allow [future reserved words in older standards](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#future_reserved_words_in_older_standards) as identifiers. https://github.com/rescript-lang/rescript-compiler/pull/6658

# 11.1.0

Expand Down
14 changes: 5 additions & 9 deletions jscomp/ext/ext_ident.ml
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,15 @@ let name_mangle name =
Ext_ident.convert "^";;
- : string = "$caret"
]}
[convert name] if [name] is a js keyword, and also is not explicitly used as exotic identifier, add "$$"
[convert name] if [name] is a js keyword,add "$$"
otherwise do the name mangling to make sure ocaml identifier it is
a valid js identifier
*)
let convert (name : string) =
if is_exotic name then
let name = unwrap_exotic name in
if Js_reserved_map.is_js_keyword name then "$$" ^ name
else name_mangle name
else
if Js_reserved_map.is_js_keyword name || Js_reserved_map.is_js_special_word name || Js_reserved_map.is_reserved name then
"$$" ^ name
else name_mangle name
let name = unwrap_exotic name in
if Js_reserved_map.is_reserved name then
"$$" ^ name
else name_mangle name

(** keyword could be used in property *)

Expand Down
Loading

0 comments on commit 80a9fea

Please sign in to comment.