diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 4d6d311c98..52eb46bf42 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -448,6 +448,9 @@ proc semAsmOrEmit*(con: PContext, n: PNode, marker: char): PNode = addSon(result, newSymNode(e)) else: addSon(result, newStrNode(nkStrLit, sub)) + else: + # an empty '``' produces a single '`' + addSon(result, newStrNode(nkStrLit, $marker)) if c < 0: break a = c + 1 else: illFormedAst(n) diff --git a/doc/nimc.txt b/doc/nimc.txt index 8af045e2e6..3b7390d780 100644 --- a/doc/nimc.txt +++ b/doc/nimc.txt @@ -382,7 +382,10 @@ Example: {.pop.} embedsC() - + +As can be seen from the example, to Nim symbols can be referred via backticks. +Use two backticks to produce a single verbatim backtick. + ImportCpp pragma ---------------- diff --git a/web/news.txt b/web/news.txt index 7038e82341..c9374558af 100644 --- a/web/news.txt +++ b/web/news.txt @@ -49,6 +49,9 @@ News os.getEnv, os.existsEnv, os.dirExists, os.fileExists, system.writeFile + - Two backticks now produce a single backtick within an ``emit`` or ``asm`` + statement. + 2014-10-19 Nimrod version 0.9.6 released ========================================