From 39629a1adcbcc822508acc3983f444328f90dd85 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sat, 27 Jul 2024 02:45:52 +0800 Subject: fixes JS semicolon omissions (#23896) --- lib/system/comparisons.nim | 2 +- lib/system/reprjs.nim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/system') 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) = -- cgit 1.4.1-2-gfad0