diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-10-06 19:38:05 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-10-07 06:47:30 +0200 |
commit | 9d000c519a5b21300e4896d9d9a79170ac281387 (patch) | |
tree | 42f95603c6f33ee8d27ebf8bd7eaf566cff38c26 /compiler | |
parent | 5be8e0b0883c5d88db8f24db36d114290dffcae3 (diff) | |
download | Nim-9d000c519a5b21300e4896d9d9a79170ac281387.tar.gz |
render typeof as typeof
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/renderer.nim | 4 |
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, ")") |