summary refs log tree commit diff stats
path: root/nim/docgen.pas
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2009-06-24 17:13:22 +0200
committerAndreas Rumpf <rumpf_a@web.de>2009-06-24 17:13:22 +0200
commit300430fbba28b408f7ac86ca46b03d9d50839399 (patch)
treeb8a84f8efdccda7bfa909b3db911d9e2b9a4b39b /nim/docgen.pas
parent36818817bd61594ea6d106328bb8df0f5a25cfc4 (diff)
downloadNim-300430fbba28b408f7ac86ca46b03d9d50839399.tar.gz
overload resolution for proc vars
Diffstat (limited to 'nim/docgen.pas')
-rw-r--r--nim/docgen.pas18
1 files changed, 11 insertions, 7 deletions
diff --git a/nim/docgen.pas b/nim/docgen.pas
index 5e8ecf7a3..a72f64908 100644
--- a/nim/docgen.pas
+++ b/nim/docgen.pas
@@ -139,16 +139,22 @@ function ropeFormatNamedVars(const frmt: TFormatStr;
                              const varnames: array of string;
                              const varvalues: array of PRope): PRope;
 var
-  i, j, L, start, idx: int;
+  i, j, L, start, idx, num: int;
   id: string;
 begin
   i := strStart;
   L := length(frmt);
   result := nil;
+  num := 0;
   while i <= L + StrStart - 1 do begin
     if frmt[i] = '$' then begin
       inc(i);                 // skip '$'
       case frmt[i] of
+        '#': begin
+          app(result, varvalues[num]);
+          inc(num);
+          inc(i);
+        end;
         '$': begin
           app(result, '$'+'');
           inc(i)
@@ -162,6 +168,7 @@ begin
           end;
           if j > high(varvalues) + 1 then
             internalError('ropeFormatNamedVars');
+          num := j;
           app(result, varvalues[j - 1])
         end;
         'A'..'Z', 'a'..'z', #128..#255: begin
@@ -515,17 +522,17 @@ begin
       result := renderRstSons(d, n);
       L := ropeLen(result);
       result := ropef('$n$1$2$n$1$3', [ind, result,
-                           toRope(repeatChar(L, lvlToChar[n.level]))]);
+                      toRope(repeatChar(L, lvlToChar[n.level]))]);
     end;
     rnOverline: begin
       result := renderRstSons(d, n);
       L := ropeLen(result);
       result := ropef('$n$1$3$n$1$2$n$1$3', [ind, result,
-                           toRope(repeatChar(L, lvlToChar[n.level]))]);
+                      toRope(repeatChar(L, lvlToChar[n.level]))]);
     end;
     rnTransition:
       result := ropef('$n$n$1$2$n$n',
-                          [ind, toRope(repeatChar(78-d.indent, '-'))]);
+                     [ind, toRope(repeatChar(78-d.indent, '-'))]);
     rnParagraph: begin
       result := renderRstSons(d, n);
       result := ropef('$n$n$1$2', [ind, result]);
@@ -1003,7 +1010,4 @@ begin
   generateIndex(d);
 end;
 
-// #FFD700
-// #9f9b75
-
 end.