summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-10-26 13:36:42 +0100
committerAraq <rumpf_a@web.de>2014-10-26 13:36:42 +0100
commitfdf996925b6b23e3127ce699c976e9e07bdfe13f (patch)
treedd29749daa80cb9fc47bbee4ecaec44936386835
parenta639824e5e3ec2a6eca97f31f55623254144ca81 (diff)
downloadNim-fdf996925b6b23e3127ce699c976e9e07bdfe13f.tar.gz
implements #1588
-rw-r--r--compiler/pragmas.nim3
-rw-r--r--doc/nimc.txt5
-rw-r--r--web/news.txt3
3 files changed, 10 insertions, 1 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index 4d6d311c9..52eb46bf4 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 8af045e2e..3b7390d78 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 7038e8234..c9374558a 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
 ========================================