Skip to content

Commit 1e2007e

Browse files
jmdevinchrisbra
authored andcommitted
runtime(awk): Highlight more awk comments in syntax script
closes: #15944 Signed-off-by: John M Devin <john.m.devin@gmail.com> Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent d69ffbe commit 1e2007e

3 files changed

Lines changed: 31 additions & 2 deletions

File tree

runtime/syntax/awk.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Language: awk, nawk, gawk, mawk
33
" Maintainer: Doug Kearns <dougkearns@gmail.com>
44
" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
5-
" Last Change: 2020 Aug 18
5+
" Last Change: 2024 Oct 28
66

77
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
88
" The AWK Programming Language, Addison-Wesley, 1988
@@ -92,7 +92,7 @@ syn match awkSpecialCharacter display contained "\\x[0-9A-Fa-f]\+"
9292
syn match awkFieldVars "\$\d\+"
9393

9494
" catch errors caused by wrong parenthesis
95-
syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass,awkComment
95+
syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass
9696
syn match awkParenError display ")"
9797
"syn match awkInParen display contained "[{}]"
9898

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
>{+0&#ffffff0| |#+0#0000e05&| |C|o|m@1|e|n|t| |1| +0#0000000&@61
2+
@4|f+0#af5f00255&|o|r| +0#0000000&|(|i| |=+0#e000e06&| +0#0000000&|0+0#e000002&|;+0#e000e06&| +0#0000000&|#+0#0000e05&| |C|o|m@1|e|n|t| |2| +0#0000000&@47
3+
@9|i| |<| |1+0#e000002&|;+0#e000e06&| +0#0000000&|#+0#0000e05&| |C|o|m@1|e|n|t| |3| +0#0000000&@47
4+
@9|i|++0#e000e06&@1|)+0#0000000&| |#+0#0000e05&| |C|o|m@1|e|n|t| |4| +0#0000000&@49
5+
@4|{| |#+0#0000e05&| |C|o|m@1|e|n|t| |5| +0#0000000&@57
6+
@8|p+0#af5f00255&|r|i|n|t| +0#0000000&|#+0#0000e05&| |C|o|m@1|e|n|t| |6| +0#0000000&@49
7+
@4|}| |#+0#0000e05&| |C|o|m@1|e|n|t| |7| +0#0000000&@57
8+
|}| |#+0#0000e05&| |C|o|m@1|e|n|t| |8| +0#0000000&@61
9+
@75
10+
|~+0#4040ff13&| @73
11+
|~| @73
12+
|~| @73
13+
|~| @73
14+
|~| @73
15+
|~| @73
16+
|~| @73
17+
|~| @73
18+
|~| @73
19+
|~| @73
20+
| +0#0000000&@56|1|,|1| @10|A|l@1|
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{ # Comment 1
2+
for (i = 0; # Comment 2
3+
i < 1; # Comment 3
4+
i++) # Comment 4
5+
{ # Comment 5
6+
print # Comment 6
7+
} # Comment 7
8+
} # Comment 8
9+

0 commit comments

Comments
 (0)