Merge branch 'upstream-vim-cmake-syntax' into update-vim-syntax

* upstream-vim-cmake-syntax:
  vim-cmake-syntax 2018-10-18 (64ff4bd7)
This commit is contained in:
Brad King
2018-10-18 07:46:16 -04:00
2 changed files with 2148 additions and 106 deletions

View File

@@ -103,25 +103,25 @@ while(<IN>)
my @tmp = grep { ! exists $conditional{$_} and
! exists $loop{$_} and
! exists $deprecated{$_} } @commands;
print OUT " " x 12 , "\\ ", join(" ", @tmp), "\n";
print_list(\*OUT, @tmp);
} elsif ($1 eq "VARIABLE_LIST") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %variables), "\n";
print_list(\*OUT, keys %variables);
} elsif ($1 eq "MODULES") {
print OUT " " x 12 , "\\ ", join("\n", @modules), "\n";
print_list(\*OUT, @modules);
} elsif ($1 eq "GENERATOR_EXPRESSIONS") {
print OUT " " x 12 , "\\ ", join(" ", @generator_expr), "\n";
print_list(\*OUT, @generator_expr);
} elsif ($1 eq "CONDITIONALS") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %conditional), "\n";
print_list(\*OUT, keys %conditional);
} elsif ($1 eq "LOOPS") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %loop), "\n";
print_list(\*OUT, keys %loop);
} elsif ($1 eq "DEPRECATED") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %deprecated), "\n";
print_list(\*OUT, keys %deprecated);
} elsif ($1 eq "PROPERTIES") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %properties), "\n";
print_list(\*OUT, keys %properties);
} elsif ($1 eq "KEYWORDS") {
foreach my $k (sort keys %keywords) {
print OUT "syn keyword cmakeKW$k contained\n";
print OUT " " x 12, "\\ ", join(" ", @{$keywords{$k}}), "\n";
print_list(\*OUT, @{$keywords{$k}});
print OUT "\n";
push @keyword_hi, "hi def link cmakeKW$k ModeMsg";
}
@@ -164,3 +164,10 @@ sub extract_upper
return @word;
}
sub print_list
{
my $O = shift;
my $indent = " " x 12 . "\\ ";
print $O $indent, join("\n" . $indent, sort @_), "\n";
}

File diff suppressed because one or more lines are too long