Skip to content
This repository was archived by the owner on Jul 30, 2019. It is now read-only.

Commit 0d4d60a

Browse files
committed
break line after each high-lighting keyword (fix #10)
1 parent ac1957f commit 0d4d60a

File tree

2 files changed

+2150
-108
lines changed

2 files changed

+2150
-108
lines changed

Diff for: extract-upper-case.pl

+18-11
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
use warnings;
55
use POSIX qw(strftime);
66

7-
#my $cmake = "/home/pboettch/devel/upstream/cmake/build/bin/cmake";
8-
my $cmake = "cmake";
7+
my $cmake = "/home/pboettch/devel/upstream/cmake/build/bin/cmake";
8+
#my $cmake = "cmake";
99

1010
my @variables;
1111
my @commands;
@@ -103,25 +103,25 @@
103103
my @tmp = grep { ! exists $conditional{$_} and
104104
! exists $loop{$_} and
105105
! exists $deprecated{$_} } @commands;
106-
print OUT " " x 12 , "\\ ", join(" ", @tmp), "\n";
106+
print_list(\*OUT, @tmp);
107107
} elsif ($1 eq "VARIABLE_LIST") {
108-
print OUT " " x 12 , "\\ ", join(" ", sort keys %variables), "\n";
108+
print_list(\*OUT, keys %variables);
109109
} elsif ($1 eq "MODULES") {
110-
print OUT " " x 12 , "\\ ", join("\n", @modules), "\n";
110+
print_list(\*OUT, @modules);
111111
} elsif ($1 eq "GENERATOR_EXPRESSIONS") {
112-
print OUT " " x 12 , "\\ ", join(" ", @generator_expr), "\n";
112+
print_list(\*OUT, @generator_expr);
113113
} elsif ($1 eq "CONDITIONALS") {
114-
print OUT " " x 12 , "\\ ", join(" ", sort keys %conditional), "\n";
114+
print_list(\*OUT, keys %conditional);
115115
} elsif ($1 eq "LOOPS") {
116-
print OUT " " x 12 , "\\ ", join(" ", sort keys %loop), "\n";
116+
print_list(\*OUT, keys %loop);
117117
} elsif ($1 eq "DEPRECATED") {
118-
print OUT " " x 12 , "\\ ", join(" ", sort keys %deprecated), "\n";
118+
print_list(\*OUT, keys %deprecated);
119119
} elsif ($1 eq "PROPERTIES") {
120-
print OUT " " x 12 , "\\ ", join(" ", sort keys %properties), "\n";
120+
print_list(\*OUT, keys %properties);
121121
} elsif ($1 eq "KEYWORDS") {
122122
foreach my $k (sort keys %keywords) {
123123
print OUT "syn keyword cmakeKW$k contained\n";
124-
print OUT " " x 12, "\\ ", join(" ", @{$keywords{$k}}), "\n";
124+
print_list(\*OUT, @{$keywords{$k}});
125125
print OUT "\n";
126126
push @keyword_hi, "hi def link cmakeKW$k ModeMsg";
127127
}
@@ -164,3 +164,10 @@ sub extract_upper
164164

165165
return @word;
166166
}
167+
168+
sub print_list
169+
{
170+
my $O = shift;
171+
my $indent = " " x 12 . "\\ ";
172+
print $O $indent, join("\n" . $indent, sort @_), "\n";
173+
}

0 commit comments

Comments
 (0)