-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
75 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
src/test/resources/documentation/function/Doc.expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo</span>() </pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo1</span>(<span style="color:#000000;">a</span> <span style="color:#000080;font-weight:bold;">int</span>) </pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">pub</span> <span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo2</span>( | ||
<span style="">a</span> <span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="">b</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="color:#000000;">a</span> <span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="color:#000000;">b</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
) </pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo3</span>( | ||
<span style="">a</span> <span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="">b</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="">c</span> <span style="color:#000080;font-weight:bold;">f64</span>, | ||
<span style="color:#000000;">a</span> <span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="color:#000000;">b</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="color:#000000;">c</span> <span style="color:#000080;font-weight:bold;">f64</span>, | ||
) <span style="color:#000080;font-weight:bold;">string</span></pre></div><div class='content'><p><a href="psi_element://foo3">foo3</a> is a function with a return value</p> | ||
</div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">parameter</span> <span style="color:#000000;">c</span> <span style="color:#000080;font-weight:bold;">f64</span></pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo4</span>[<span style="color:#20999d;">T</span>](<span style="color:#000000;">a</span> <span style="color:#20999d;">T</span>) <span style="color:#20999d;">T</span></pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo5</span>(<span style="color:#000080;font-weight:bold;">mut</span> <span style="color:#000000;">a</span> <span style="color:#000080;font-weight:bold;">string</span>) <span style="color:#000080;font-weight:bold;">string</span></pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">pub</span> <span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo6</span>( | ||
<span style="color:#000080;font-weight:bold;">mut</span> <span style="">a</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="color:#000080;font-weight:bold;">shared</span> <span style="">b</span> <span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="color:#000080;font-weight:bold;">mut</span> <span style="color:#000080;font-weight:bold;">shared</span> <span style="">c</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="color:#000080;font-weight:bold;">mut</span> <span style="color:#000000;">a</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="color:#000080;font-weight:bold;">shared</span> <span style="color:#000000;">b</span> <span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="color:#000080;font-weight:bold;">mut</span> <span style="color:#000080;font-weight:bold;">shared</span> <span style="color:#000000;">c</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
) !<span style="color:#000080;font-weight:bold;">string</span></pre></div><div class='content'><p><a href="psi_element://foo6">foo6</a> is a function with a return value | ||
and some | ||
long documentation</p> | ||
</div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">mut</span> <span style="color:#000080;font-weight:bold;">parameter</span> <span style="color:#000000;">a</span> <span style="color:#000080;font-weight:bold;">string</span></pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo7</span>( | ||
<span style="color:#000080;font-weight:bold;">mut</span> <span style="">a</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="">b</span> <span style="color:#000080;font-weight:bold;">shared </span><span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="color:#000080;font-weight:bold;">mut</span> <span style="color:#000000;">a</span> <span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="color:#000000;">b</span> <span style="color:#000080;font-weight:bold;">shared </span><span style="color:#000080;font-weight:bold;">int</span>, | ||
) !<span style="color:#000080;font-weight:bold;">string</span></pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">parameter</span> <span style="color:#000000;">b</span> <span style="color:#000080;font-weight:bold;">shared </span><span style="color:#000080;font-weight:bold;">int</span></pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo8</span>() !</pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo9</span>() (<span style="color:#000080;font-weight:bold;">int</span>, <span style="color:#000080;font-weight:bold;">string</span>)</pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo10</span>(<span style="color:#000080;font-weight:bold;">mut</span> <span style="color:#000000;">a</span> ...<span style="color:#000080;font-weight:bold;">string</span>) </pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">mut</span> <span style="color:#000080;font-weight:bold;">parameter</span> <span style="color:#000000;">a</span> ...<span style="color:#000080;font-weight:bold;">string</span></pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">fn</span> <span style="color:#000000;">foo11</span>( | ||
<span style="">s</span> <span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="">a</span> ...<span style="color:#000080;font-weight:bold;">string</span>, | ||
<span style="color:#000000;">s</span> <span style="color:#000080;font-weight:bold;">int</span>, | ||
<span style="color:#000000;">a</span> ...<span style="color:#000080;font-weight:bold;">string</span>, | ||
) </pre></div><br><br><br><div class='content'><span class='grayed'>Module: </span><a href="psi_element://#function">function</a></div><div class='definition'><pre><span style="color:#000080;font-weight:bold;">parameter</span> <span style="color:#000000;">a</span> ...<span style="color:#000080;font-weight:bold;">string</span></pre></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,100 @@ | ||
module hints | ||
|
||
enum Simple { | ||
read<# = 0 #> | ||
write<# = 1 #> | ||
unknown<# = 2 #> | ||
read/*<# = 0 #>*/ | ||
write/*<# = 1 #>*/ | ||
unknown/*<# = 2 #>*/ | ||
} | ||
|
||
enum WithCustomValue { | ||
read<# = 0 #> | ||
read/*<# = 0 #>*/ | ||
write = 100 | ||
unknown<# = 101 #> | ||
unknown/*<# = 101 #>*/ | ||
} | ||
|
||
enum WithCustomValue2 { | ||
read = 100 | ||
write<# = 101 #> | ||
unknown<# = 102 #> | ||
write/*<# = 101 #>*/ | ||
unknown/*<# = 102 #>*/ | ||
} | ||
|
||
enum WithCustomValue3 { | ||
read = 100 | ||
write<# = 101 #> | ||
write/*<# = 101 #>*/ | ||
other= 105 | ||
unknown<# = 106 #> | ||
unknown/*<# = 106 #>*/ | ||
} | ||
|
||
enum WithComplexValue { | ||
read = 1 << 5 | ||
write<# = 33 #> | ||
other<# = 34 #> | ||
unknown<# = 35 #> | ||
write/*<# = 33 #>*/ | ||
other/*<# = 34 #>*/ | ||
unknown/*<# = 35 #>*/ | ||
} | ||
|
||
enum WithComplexValue { | ||
read = 1 << 5 | ||
write<# = 33 #> | ||
other<# = 34 #> | ||
unknown<# = 35 #> | ||
write/*<# = 33 #>*/ | ||
other/*<# = 34 #>*/ | ||
unknown/*<# = 35 #>*/ | ||
} | ||
|
||
enum WithNegativeValue { | ||
read = -5 | ||
write<# = -4 #> | ||
other<# = -3 #> | ||
unknown<# = -2 #> | ||
write/*<# = -4 #>*/ | ||
other/*<# = -3 #>*/ | ||
unknown/*<# = -2 #>*/ | ||
} | ||
|
||
enum WithNegativeComplexValue { | ||
read = -5 << 3 | ||
write<# = -39 #> | ||
other<# = -38 #> | ||
unknown<# = -37 #> | ||
write/*<# = -39 #>*/ | ||
other/*<# = -38 #>*/ | ||
unknown/*<# = -37 #>*/ | ||
} | ||
|
||
enum WithBinValue { | ||
read = 0b0010 | ||
write<# = 3 #> | ||
other<# = 4 #> | ||
unknown<# = 5 #> | ||
write/*<# = 3 #>*/ | ||
other/*<# = 4 #>*/ | ||
unknown/*<# = 5 #>*/ | ||
} | ||
|
||
enum WithOctValue { | ||
read = 0o0010 | ||
write<# = 9 #> | ||
other<# = 10 #> | ||
unknown<# = 11 #> | ||
write/*<# = 9 #>*/ | ||
other/*<# = 10 #>*/ | ||
unknown/*<# = 11 #>*/ | ||
} | ||
|
||
enum WithHexValue { | ||
read = 0xFFF | ||
write<# = 4096 #> | ||
other<# = 4097 #> | ||
unknown<# = 4098 #> | ||
write/*<# = 4096 #>*/ | ||
other/*<# = 4097 #>*/ | ||
unknown/*<# = 4098 #>*/ | ||
} | ||
|
||
enum WithSeveralCustomValue { | ||
file = 0 | ||
folder<# = 1 #> | ||
folder/*<# = 1 #>*/ | ||
// archive format | ||
zip = 16 | ||
archive_file<# = 17 #> | ||
archive_file/*<# = 17 #>*/ | ||
// graphic format, MUST stay after the other types!! | ||
bmp = 32 | ||
jpg<# = 33 #> | ||
png<# = 34 #> | ||
gif<# = 35 #> | ||
tga<# = 36 #> | ||
ppm<# = 37 #> | ||
pgm<# = 38 #> | ||
pic<# = 39 #> | ||
hdr<# = 40 #> | ||
jpg/*<# = 33 #>*/ | ||
png/*<# = 34 #>*/ | ||
gif/*<# = 35 #>*/ | ||
tga/*<# = 36 #>*/ | ||
ppm/*<# = 37 #>*/ | ||
pgm/*<# = 38 #>*/ | ||
pic/*<# = 39 #>*/ | ||
hdr/*<# = 40 #>*/ | ||
} | ||
|
||
[flag] | ||
enum FlagEnum as u8 { | ||
red<# = 0b1 (1) #> | ||
other<# = 0b10 (2) #> | ||
blue<# = 0b100 (4) #> | ||
red/*<# = 0b1 (1) #>*/ | ||
other/*<# = 0b10 (2) #>*/ | ||
blue/*<# = 0b100 (4) #>*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters