summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-12-23 01:23:16 +0100
committerAraq <rumpf_a@web.de>2013-12-23 01:23:16 +0100
commitb76729df1cd326a3230536d0f78276cfabe4dd2a (patch)
tree9a7cf9a40ef38a79513a0b4c850e68d53f215e91 /doc
parent9145bcfbb680d653f167a1a12f7830025aa951a5 (diff)
parent52a8226edda05f2d3baad791639a1c2fe7f103cc (diff)
downloadNim-b76729df1cd326a3230536d0f78276cfabe4dd2a.tar.gz
Merge branch 'master' of https://github.com/Araq/Nimrod into vm2
Conflicts:
	web/news.txt
Diffstat (limited to 'doc')
-rw-r--r--doc/idetools.txt20
-rw-r--r--doc/manual.txt18
-rw-r--r--doc/nimrodc.txt13
3 files changed, 35 insertions, 16 deletions
diff --git a/doc/idetools.txt b/doc/idetools.txt
index fdc4ebde6..c1eba9e5f 100644
--- a/doc/idetools.txt
+++ b/doc/idetools.txt
@@ -8,6 +8,11 @@
 .. contents::
 
 
+.. raw:: html
+  <blockquote><p>
+  "yes, I'm the creator" -- Araq, 2013-07-26 19:28:32.
+  </p></blockquote>
+
 Nimrod differs from many other compilers in that it is really fast,
 and being so fast makes it suited to provide external queries for
 text editors about the source code being written. Through the
@@ -522,21 +527,6 @@ At the moment idetools support is still in development so the test
 suite is not integrated with the main test suite and you have to
 run it manually. First you have to compile the tester::
 
-	$ cd my/nimrod/checkout
-	$ nimrod c tests/tester.nim
-
-Running the tester without parameters will display some options.
-To run the caas test suite (and other special tests) you need to
-use the `special` command. You need to run this command from the
-root of the checkout or it won't be able to open the required files::
-
-	$ ./tests/tester special
-
-However this is a roundabout way of running the test suite. You can
-also compile and run ``tests/caasdriver.nim`` manually. In fact,
-running it manually will allow you to specify special parameters
-too. Example::
-
 	$ cd my/nimrod/checkout/tests
 	$ nimrod c caasdriver.nim
 
diff --git a/doc/manual.txt b/doc/manual.txt
index dabff3d69..0a9aec8d0 100644
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -4708,7 +4708,11 @@ fatal pragma
 ------------
 The `fatal`:idx: pragma is used to make the compiler output an error message
 with the given content. In contrast to the ``error`` pragma, compilation
-is guaranteed to be aborted by this pragma.
+is guaranteed to be aborted by this pragma. Example:
+
+.. code-block:: nimrod
+  when not defined(objc):
+    {.fatal: "Compile this program with the objc command!".}
 
 warning pragma
 --------------
@@ -5053,6 +5057,18 @@ Note that this pragma is somewhat of a misnomer: Other backends will provide
 the same feature under the same name.
 
 
+Extern pragma
+-------------
+Like ``exportc`` or ``importc`` the `extern`:idx: pragma affects name
+mangling. The string literal passed to ``extern`` can be a format string:
+
+.. code-block:: Nimrod
+  proc p(s: string) {.extern: "prefix$1".} =
+    echo s
+
+In the example the external name of ``p`` is set to ``prefixp``.
+
+
 Bycopy pragma
 -------------
 
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt
index d494a0922..f5fbf3ebb 100644
--- a/doc/nimrodc.txt
+++ b/doc/nimrodc.txt
@@ -468,6 +468,19 @@ proc is declared in the generated code:
 
   proc myinterrupt() {.codegenDecl: "__interrupt $# $#$#".} =
     echo "realistic interrupt handler"
+
+
+InjectStmt pragma
+-----------------
+
+The `injectStmt`:idx: pragma can be used to inject a statement before every
+other statement in the current module. It is only supposed to be used for
+debugging:
+
+.. code-block:: nimrod
+  {.injectStmt: gcInvariants().}
+  
+  # ... complex code here that produces crashes ...
 

 

 LineDir option