summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2022-01-09 04:34:22 +0800
committerGitHub <noreply@github.com>2022-01-08 21:34:22 +0100
commitae92eac06031ed57a755c01efdbb9cc5b72e5dbf (patch)
tree9cd352e89ad847b8382b301b61ead88414b346de
parent58656aa5bba572672f093499280b69bb0f0d4c06 (diff)
downloadNim-ae92eac06031ed57a755c01efdbb9cc5b72e5dbf.tar.gz
stylecheck usages part two: stdlib cleanup (#19338)
* stylecheck usages part two: stdlib cleanup

typeinfo.nim: importCompilerProc => importcompilerproc

nre.nim: newLineFlags => newlineFlags

system.nim: JSRoot => JsRoot

ref #19319

* prefer importCompilerProc
-rw-r--r--compiler/wordrecg.nim2
-rw-r--r--lib/impure/nre.nim2
-rw-r--r--lib/pure/os.nim2
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/wordrecg.nim b/compiler/wordrecg.nim
index 22f6cc71d..c819f4306 100644
--- a/compiler/wordrecg.nim
+++ b/compiler/wordrecg.nim
@@ -41,7 +41,7 @@ type
     wImmediate = "immediate", wConstructor = "constructor", wDestructor = "destructor",
     wDelegator = "delegator", wOverride = "override", wImportCpp = "importcpp",
     wCppNonPod = "cppNonPod",
-    wImportObjC = "importobjc", wImportCompilerProc = "importcompilerproc",
+    wImportObjC = "importobjc", wImportCompilerProc = "importCompilerProc",
     wImportc = "importc", wImportJs = "importjs", wExportc = "exportc", wExportCpp = "exportcpp",
     wExportNims = "exportnims",
     wIncompleteStruct = "incompleteStruct", # deprecated
diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim
index f346d84cb..03cbf5220 100644
--- a/lib/impure/nre.nim
+++ b/lib/impure/nre.nim
@@ -281,7 +281,7 @@ proc matchesCrLf(pattern: Regex): bool =
   let newlineFlags = flags and (pcre.NEWLINE_CRLF or
                                 pcre.NEWLINE_ANY or
                                 pcre.NEWLINE_ANYCRLF)
-  if newLineFlags > 0u32:
+  if newlineFlags > 0u32:
     return true
 
   # get flags from build config
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 9b08fe2e1..81b432d7f 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -2888,7 +2888,7 @@ when defined(nimdoc):
 
 elif defined(nimscript): discard
 elif defined(nodejs):
-  type Argv = object of JSRoot
+  type Argv = object of JsRoot
   let argv {.importjs: "process.argv".} : Argv
   proc len(argv: Argv): int {.importjs: "#.length".}
   proc `[]`(argv: Argv, i: int): cstring {.importjs: "#[#]".}