summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-10-06 19:38:05 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-10-07 06:47:30 +0200
commit9d000c519a5b21300e4896d9d9a79170ac281387 (patch)
tree42f95603c6f33ee8d27ebf8bd7eaf566cff38c26
parent5be8e0b0883c5d88db8f24db36d114290dffcae3 (diff)
downloadNim-9d000c519a5b21300e4896d9d9a79170ac281387.tar.gz
render typeof as typeof
-rw-r--r--compiler/renderer.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index cdd0357ee..a92ce999f 100644
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -474,7 +474,7 @@ proc lsub(g: TSrcGen; n: PNode): int =
         len("if_:_")
   of nkElifExpr: result = lsons(g, n) + len("_elif_:_")
   of nkElseExpr: result = lsub(g, n.sons[0]) + len("_else:_") # type descriptions
-  of nkTypeOfExpr: result = (if n.len > 0: lsub(g, n.sons[0]) else: 0)+len("type()")
+  of nkTypeOfExpr: result = (if n.len > 0: lsub(g, n.sons[0]) else: 0)+len("typeof()")
   of nkRefTy: result = (if n.len > 0: lsub(g, n.sons[0])+1 else: 0) + len("ref")
   of nkPtrTy: result = (if n.len > 0: lsub(g, n.sons[0])+1 else: 0) + len("ptr")
   of nkVarTy: result = (if n.len > 0: lsub(g, n.sons[0])+1 else: 0) + len("var")
@@ -1195,7 +1195,7 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
     putWithSpace(g, tkColon, ":")
     gsub(g, n, 0)
   of nkTypeOfExpr:
-    put(g, tkType, "type")
+    put(g, tkType, "typeof")
     put(g, tkParLe, "(")
     if n.len > 0: gsub(g, n.sons[0])
     put(g, tkParRi, ")")