summary refs log tree commit diff stats
path: root/nimdoc
diff options
context:
space:
mode:
authorRidho Pratama <p.ridho@yahoo.co.id>2019-10-08 16:12:24 +0700
committerAndreas Rumpf <rumpf_a@web.de>2019-10-08 11:12:24 +0200
commit7ef4bffa797623c608c15329717f0a9ee06a5d38 (patch)
tree7f15164d5f4ab3709dcdd064d3c8238c719e6913 /nimdoc
parentdbcffcfccb39a35f2f8e2447a22776e5e761ce72 (diff)
downloadNim-7ef4bffa797623c608c15329717f0a9ee06a5d38.tar.gz
renderer letAux fix only for octal literal (#12343)
* renderer letAux fix only for octal literal

* Handle when it's octal -1 for i64

* Added testcases
Diffstat (limited to 'nimdoc')
-rw-r--r--nimdoc/testproject/expected/testproject.html47
-rw-r--r--nimdoc/testproject/expected/theindex.html16
-rw-r--r--nimdoc/testproject/testproject.nim7
3 files changed, 69 insertions, 1 deletions
diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html
index 273defbbf..8c9082d7a 100644
--- a/nimdoc/testproject/expected/testproject.html
+++ b/nimdoc/testproject/expected/testproject.html
@@ -850,6 +850,20 @@ function main() {
   </ul>
 </li>
 <li>
+  <a class="reference reference-toplevel" href="#10" id="60">Consts</a>
+  <ul class="simple simple-toc-section">
+      <li><a class="reference" href="#C_A"
+    title="C_A = 0x7FF0000000000000&apos;f64"><wbr />C_<wbr />A<span class="attachedType"></span></a></li>
+  <li><a class="reference" href="#C_B"
+    title="C_B = 0o377&apos;i8"><wbr />C_<wbr />B<span class="attachedType"></span></a></li>
+  <li><a class="reference" href="#C_C"
+    title="C_C = 0o277&apos;i8"><wbr />C_<wbr />C<span class="attachedType"></span></a></li>
+  <li><a class="reference" href="#C_D"
+    title="C_D = 0o177777&apos;i16"><wbr />C_<wbr />D<span class="attachedType"></span></a></li>
+
+  </ul>
+</li>
+<li>
   <a class="reference reference-toplevel" href="#12" id="62">Procs</a>
   <ul class="simple simple-toc-section">
       <li><a class="reference" href="#bar%2CT%2CT"
@@ -941,6 +955,39 @@ The enum B.
 </dd>
 
 </dl></div>
+<div class="section" id="10">
+<h1><a class="toc-backref" href="#10">Consts</a></h1>
+<dl class="item">
+<a id="C_A"></a>
+<dt><pre><a href="testproject.html#C_A"><span class="Identifier">C_A</span></a> <span class="Other">=</span> <span class="FloatNumber">0x7FF0000000000000'f64</span></pre></dt>
+<dd>
+
+
+
+</dd>
+<a id="C_B"></a>
+<dt><pre><a href="testproject.html#C_B"><span class="Identifier">C_B</span></a> <span class="Other">=</span> <span class="DecNumber">0o377'i8</span></pre></dt>
+<dd>
+
+
+
+</dd>
+<a id="C_C"></a>
+<dt><pre><a href="testproject.html#C_C"><span class="Identifier">C_C</span></a> <span class="Other">=</span> <span class="DecNumber">0o277'i8</span></pre></dt>
+<dd>
+
+
+
+</dd>
+<a id="C_D"></a>
+<dt><pre><a href="testproject.html#C_D"><span class="Identifier">C_D</span></a> <span class="Other">=</span> <span class="DecNumber">0o177777'i16</span></pre></dt>
+<dd>
+
+
+
+</dd>
+
+</dl></div>
 <div class="section" id="12">
 <h1><a class="toc-backref" href="#12">Procs</a></h1>
 <dl class="item">
diff --git a/nimdoc/testproject/expected/theindex.html b/nimdoc/testproject/expected/theindex.html
index f97ea54b9..5b7cefced 100644
--- a/nimdoc/testproject/expected/theindex.html
+++ b/nimdoc/testproject/expected/theindex.html
@@ -840,6 +840,22 @@ function main() {
 <li><a class="reference external"
           data-doc-search-tag="testproject: buzz[T](a, b: T): T" href="testproject.html#buzz%2CT%2CT">testproject: buzz[T](a, b: T): T</a></li>
           </ul></dd>
+<dt><a name="C_A" href="#C_A"><span>C_A:</span></a></dt><dd><ul class="simple">
+<li><a class="reference external"
+          data-doc-search-tag="testproject: C_A" href="testproject.html#C_A">testproject: C_A</a></li>
+          </ul></dd>
+<dt><a name="C_B" href="#C_B"><span>C_B:</span></a></dt><dd><ul class="simple">
+<li><a class="reference external"
+          data-doc-search-tag="testproject: C_B" href="testproject.html#C_B">testproject: C_B</a></li>
+          </ul></dd>
+<dt><a name="C_C" href="#C_C"><span>C_C:</span></a></dt><dd><ul class="simple">
+<li><a class="reference external"
+          data-doc-search-tag="testproject: C_C" href="testproject.html#C_C">testproject: C_C</a></li>
+          </ul></dd>
+<dt><a name="C_D" href="#C_D"><span>C_D:</span></a></dt><dd><ul class="simple">
+<li><a class="reference external"
+          data-doc-search-tag="testproject: C_D" href="testproject.html#C_D">testproject: C_D</a></li>
+          </ul></dd>
 <dt><a name="enumValueA" href="#enumValueA"><span>enumValueA:</span></a></dt><dd><ul class="simple">
 <li><a class="reference external"
           data-doc-search-tag="SomeType.enumValueA" href="subdir/subdir_b/utils.html#enumValueA">SomeType.enumValueA</a></li>
diff --git a/nimdoc/testproject/testproject.nim b/nimdoc/testproject/testproject.nim
index c3ab6a153..d1fcf58cd 100644
--- a/nimdoc/testproject/testproject.nim
+++ b/nimdoc/testproject/testproject.nim
@@ -9,6 +9,11 @@ runnableExamples:
   # bug #11078
   for x in "xx": discard
 
+const
+  C_A* = 0x7FF0000000000000'f64
+  C_B* = 0o377'i8
+  C_C* = 0o277'i8
+  C_D* = 0o177777'i16
 
 template foo*(a, b: SomeType) =
   ## This does nothing
@@ -31,7 +36,7 @@ import std/macros
 macro bar*(): untyped =
   result = newStmtList()
 
-var aVariable*: array[1,int]
+var aVariable*: array[1, int]
 
 aEnum()
 bEnum()