Skip to content

Commit dbb92cc

Browse files
committed
Attempt 5 at fixing build break
1 parent 899fe9a commit dbb92cc

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/org/opensolaris/opengrok/analysis/Ctags.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -241,23 +241,25 @@ private void initialize() throws IOException {
241241
// PowerShell
242242
command.add("--langdef=Posh");
243243
command.add("--langmap=Posh:+.ps1,Posh:+.psm1");
244-
245-
if (env.isUniversalCtags()) {
244+
command.add("--regex-Posh=/\\$(\\{[^}]+\\})/\\1/v,variable/");
245+
command.add("--regex-Posh=/\\$([[:alnum:]_]+([:.][[:alnum:]_]+)*)/\\1/v,variable/");
246+
command.add("--regex-Posh=/^[[:space:]]*(:[^[:space:]]+)/\\1/l,label/");
247+
248+
if (!env.isUniversalCtags()) {
249+
command.add("--regex-Posh=/^[[:space:]]*([Ff]unction|[Ff]ilter)[[:space:]]+([^({[:space:]]+)[[:space:]]*(\\(([^)]+)\\))?/\\2/f,function,functions/");
250+
} else {
246251
command.add("--_fielddef-Posh=signature,signatures");
247252
command.add("--fields-Posh=+{signature}");
248-
}
249253

250-
// escaped variable markers
251-
command.add("--regex-Posh=/`\\$([[:alnum:]_]+([:.][[:alnum:]_]+)*)/\\1//{exclusive}");
252-
command.add("--regex-Posh=/`\\$(\\{[^}]+\\})/\\1//{exclusive}");
253-
command.add("--regex-Posh=/#.*\\$([[:alnum:]_]+([:.][[:alnum:]_]+)*)/\\1//{exclusive}");
254-
command.add("--regex-Posh=/#.*\\$(\\{[^}]+\\})/\\1//{exclusive}");
254+
// escaped variable markers
255+
command.add("--regex-Posh=/`\\$([[:alnum:]_]+([:.][[:alnum:]_]+)*)/\\1//{exclusive}");
256+
command.add("--regex-Posh=/`\\$(\\{[^}]+\\})/\\1//{exclusive}");
257+
command.add("--regex-Posh=/#.*\\$([[:alnum:]_]+([:.][[:alnum:]_]+)*)/\\1//{exclusive}");
258+
command.add("--regex-Posh=/#.*\\$(\\{[^}]+\\})/\\1//{exclusive}");
259+
command.add("--regex-Posh=/^[[:space:]]*(function|filter)[[:space:]]+([^({[:space:]]+)[[:space:]]*(\\(([^)]+)\\))?/\\2/f,function,functions/{icase}{exclusive}{_field=signature:(\\4)}");
260+
261+
}
255262

256-
command.add("--regex-Posh=/\\$(\\{[^}]+\\})/\\1/v,variable/");
257-
command.add("--regex-Posh=/\\$([[:alnum:]_]+([:.][[:alnum:]_]+)*)/\\1/v,variable/");
258-
command.add("--regex-Posh=/^[[:space:]]*(function|filter)[[:space:]]+([^({[:space:]]+)[[:space:]]*(\\(([^)]+)\\))?/\\2/f,function,functions/{icase}{exclusive}{_field=signature:(\\4)}");
259-
command.add("--regex-Posh=/^[[:space:]]*(:[^[:space:]]+)/\\1/l,label/");
260-
261263
//PLEASE add new languages ONLY with POSIX syntax (see above wiki link)
262264

263265
/* Add extra command line options for ctags. */

0 commit comments

Comments
 (0)