diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-07-27 02:45:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 20:45:52 +0200 |
commit | 39629a1adcbcc822508acc3983f444328f90dd85 (patch) | |
tree | d60cad7a004aee263a9e3dfd6b1e183ca95f0ad9 /lib/system | |
parent | bd063113ec3c00d80fc32a5581ac9552682f6b43 (diff) | |
download | Nim-39629a1adcbcc822508acc3983f444328f90dd85.tar.gz |
fixes JS semicolon omissions (#23896)
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/comparisons.nim | 2 | ||||
-rw-r--r-- | lib/system/reprjs.nim | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/system/comparisons.nim b/lib/system/comparisons.nim index ce5e486f7..a8d78bb93 100644 --- a/lib/system/comparisons.nim +++ b/lib/system/comparisons.nim @@ -324,7 +324,7 @@ proc `==`*[T](x, y: seq[T]): bool {.noSideEffect.} = return true else: var sameObject = false - {.emit: """`sameObject` = `x` === `y`""".} + {.emit: """`sameObject` = `x` === `y`;""".} if sameObject: return true if x.len != y.len: diff --git a/lib/system/reprjs.nim b/lib/system/reprjs.nim index 30e84ebee..761d66aec 100644 --- a/lib/system/reprjs.nim +++ b/lib/system/reprjs.nim @@ -29,7 +29,7 @@ proc reprBool(x: bool): string {.compilerRtl.} = proc reprEnum(e: int, typ: PNimType): string {.compilerRtl.} = var tmp: bool let item = typ.node.sons[e] - {.emit: "`tmp` = `item` !== undefined".} + {.emit: "`tmp` = `item` !== undefined;".} if tmp: result = makeNimstrLit(item.name) else: @@ -136,7 +136,7 @@ proc reprArray(a: pointer, typ: PNimType, add(result, "]") proc isPointedToNil(p: pointer): bool = - {. emit: "if (`p` === null) {`result` = true};\n" .} + {. emit: "if (`p` === null) {`result` = true;}\n" .} proc reprRef(result: var string, p: pointer, typ: PNimType, cl: var ReprClosure) = |