Skip to content

aspeddro/rescript-camelCase-to-snake_case

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReScript: camelCase to snake_case

  1. First, create a branch on rescript-compiler folder

  2. Install deps:

npm i
  1. Run script
node main.js /path/to/rescript-compiler
  1. Run dune build -w on rescript-compiler folder. Dune will report two erros on file jscomp/frontend/ppx_entry.ml
File "jscomp/frontend/ppx_entry.ml", line 34, characters 10-24:
34 |       let open Js_config in
               ^^^^^^^^^^^^^^
Warning 44 [open-shadow-identifier]: this open statement shadows the value identifier jsx_version (which is later used)
File "jscomp/frontend/ppx_entry.ml", line 35, characters 43-54:
35 |       let jsx_version = int_of_jsx_version jsx_version in
                                                ^^^^^^^^^^^
Error: This expression has type jsx_version option ref
       but an expression was expected of type jsx_version
Had 2 errors, waiting for filesystem changes...    

Rename jsx_version to jsx_version_

-   | Some jsx_version ->
+   | Some jsx_version_ ->
      let open Js_config in
-     let jsx_version = int_of_jsx_version jsx_version in
+     let jsx_version = int_of_jsx_version jsx_version_ in
  1. Commit changes.

  2. Run dune fmt dune build @fmt --auto-promote

  3. Some renames were not good, they are few and can be done by the editor manually.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published