Skip to content

Commit b39b8d6

Browse files
committed
Fix argument to onCertainlyPublish()
1 parent 1972111 commit b39b8d6

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

src/org/opensolaris/opengrok/analysis/powershell/PowershellSymbolTokenizer.lex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ import java.util.regex.Matcher;
103103
Matcher m = PoshUtils.GOTO_LABEL.matcher(capture);
104104
if (m.find()) {
105105
String label = m.group(3);
106-
onCertainlyPublish(label, yychar + yylength() - label.length());
106+
onCertainlyPublish(label, m.start(3));
107107
return yystate();
108108
}
109109
}

test/org/opensolaris/opengrok/analysis/powershell/sample.psm1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,3 +474,7 @@ function Install-LabCAMachine
474474
Write-Debug `$`{`}
475475
Write-Debug $false.$true.$param
476476
$(Write-Debug $true)
477+
478+
:OuterLoop while ($true) {
479+
while ($true) { break OuterLoop }
480+
}

test/org/opensolaris/opengrok/analysis/powershell/sample_xref.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,5 +482,9 @@
482482
<a class="l" name="474" href="#474">474</a><span class='fold-space'>&nbsp;</span><b>Write-Debug</b> `$`{`}
483483
<a class="l" name="475" href="#475">475</a><span class='fold-space'>&nbsp;</span><b>Write-Debug</b> $<b>false</b>.$<b>true</b>.$<b>param</b>
484484
<a class="l" name="476" href="#476">476</a><span class='fold-space'>&nbsp;</span>$(<b>Write-Debug</b> $<b>true</b>)
485-
<a class="l" name="477" href="#477">477</a><span class='fold-space'>&nbsp;</span></body>
485+
<a class="l" name="477" href="#477">477</a><span class='fold-space'>&nbsp;</span>
486+
<a class="l" name="478" href="#478">478</a><span class='fold-space'>&nbsp;</span><a class="xlbl" name="OuterLoop">:OuterLoop</a> <b>while</b> ($<b>true</b>) &#123;
487+
<a class="l" name="479" href="#479">479</a><span class='fold-space'>&nbsp;</span> <b>while</b> ($<b>true</b>) &#123; <b>break</b> <a class="d intelliWindow-symbol" href="#OuterLoop" data-definition-place="defined-in-file">OuterLoop</a> &#125;
488+
<a class="hl" name="480" href="#480">480</a><span class='fold-space'>&nbsp;</span>&#125;
489+
<a class="l" name="481" href="#481">481</a><span class='fold-space'>&nbsp;</span></body>
486490
</html>

test/org/opensolaris/opengrok/analysis/powershell/samplesymbols.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,3 +562,5 @@ CRLOverlapUnitsHours
562562
CRLOverlapUnits
563563
CRLOverlapUnitsHours
564564
CRLOverlapUnits
565+
:OuterLoop
566+
OuterLoop

0 commit comments

Comments
 (0)