diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index f1de6f757f..46a353dce0 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -1152,10 +1152,7 @@ proc isSimpleExpr(n: PNode): bool = if n[i].kind notin {nkCommentStmt, nkEmpty}: return false result = isSimpleExpr(n.lastSon) else: - if n.isAtom: - result = true - else: - result = false + result = n.isAtom proc genAndOr(p: BProc, e: PNode, d: var TLoc, m: TMagic) = # how to generate code? diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 1a31547534..8659d511bf 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -348,10 +348,7 @@ proc isSimpleExpr(p: PProc; n: PNode): bool = if n[i].kind notin {nkCommentStmt, nkEmpty}: return false result = isSimpleExpr(p, n.lastSon) else: - if n.isAtom: - result = true - else: - result = false + result = n.isAtom proc getTemp(p: PProc, defineInLocals: bool = true): Rope = inc(p.unique)