styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error
This commit is contained in:
parent
96523cdd3e
commit
c94647aeca
90 changed files with 680 additions and 652 deletions
|
|
@ -324,7 +324,7 @@ proc `%`*(b: bool): JsonNode =
|
|||
|
||||
proc `%`*(keyVals: openArray[tuple[key: string, val: JsonNode]]): JsonNode =
|
||||
## Generic constructor for JSON data. Creates a new `JObject JsonNode`
|
||||
if keyvals.len == 0: return newJArray()
|
||||
if keyVals.len == 0: return newJArray()
|
||||
result = newJObject()
|
||||
for key, val in items(keyVals): result.fields[key] = val
|
||||
|
||||
|
|
@ -380,7 +380,7 @@ proc `%`*(o: enum): JsonNode =
|
|||
## string. Creates a new ``JString JsonNode``.
|
||||
result = %($o)
|
||||
|
||||
proc toJson(x: NimNode): NimNode {.compiletime.} =
|
||||
proc toJson(x: NimNode): NimNode {.compileTime.} =
|
||||
case x.kind
|
||||
of nnkBracket: # array
|
||||
if x.len == 0: return newCall(bindSym"newJArray")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue