Skip to content

Commit aeaed92

Browse files
Andrey KuzinKuzinAndrey
authored andcommitted
editor: update php.syntax for missed reserved words
Helper script: ```sh RESERVED=$( wget -q -O- https://www.php.net/manual/en/reserved.keywords.php | \ grep -Eo " class=\"link\">.*</a>$" | grep -v __ | \ sed 's/ class="link">\(.*\)<\/a>/\1/g' ) for K in $RESERVED ; do grep -q "keyword whole $K " php.syntax || echo $K done ``` Output: ``` abstract callable clone const enddeclare endfor endforeach endswitch final goto implements instanceof insteadof interface namespace trait use xor yield yield from ``` Adding missing words and sorting lines alphabetically. Signed-off-by: Andrey Kuzin <akuzin@eyevox.ru>
1 parent 7ed4144 commit aeaed92

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

misc/syntax/php.syntax

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ context default
1212
######################
1313
# Control structures
1414

15+
keyword whole abstract brightmagenta
1516
keyword whole break brightmagenta
17+
keyword whole callable brightmagenta
1618
keyword whole case brightmagenta
19+
keyword whole catch brightmagenta
1720
keyword whole class brightmagenta
21+
keyword whole clone brightmagenta
22+
keyword whole const brightmagenta
1823
keyword whole continue brightmagenta
1924
keyword whole declare brightmagenta
2025
keyword whole default brightmagenta
@@ -23,17 +28,29 @@ context default
2328
keyword whole echo brightmagenta
2429
keyword whole else brightmagenta
2530
keyword whole elseif brightmagenta
31+
keyword whole enddeclare brightmagenta
32+
keyword whole endfor brightmagenta
33+
keyword whole endforeach brightmagenta
2634
keyword whole endif brightmagenta
35+
keyword whole endswitch brightmagenta
2736
keyword whole endwhile brightmagenta
2837
keyword whole extends brightmagenta
2938
keyword whole false brightmagenta
39+
keyword whole final brightmagenta
40+
keyword whole finally brightmagenta
3041
keyword whole for brightmagenta
3142
keyword whole foreach brightmagenta
3243
keyword whole function brightmagenta
3344
keyword whole global brightmagenta
45+
keyword whole goto brightmagenta
3446
keyword whole if brightmagenta
47+
keyword whole implements brightmagenta
3548
keyword whole include brightmagenta
3649
keyword whole include_once brightmagenta
50+
keyword whole instanceof brightmagenta
51+
keyword whole insteadof brightmagenta
52+
keyword whole interface brightmagenta
53+
keyword whole namespace brightmagenta
3754
keyword whole new brightmagenta
3855
keyword whole null brightmagenta
3956
keyword whole private brightmagenta
@@ -44,12 +61,13 @@ context default
4461
keyword whole return brightmagenta
4562
keyword whole static brightmagenta
4663
keyword whole switch brightmagenta
47-
keyword whole true brightmagenta
48-
keyword whole while brightmagenta
4964
keyword whole throw brightmagenta
65+
keyword whole trait brightmagenta
66+
keyword whole true brightmagenta
5067
keyword whole try brightmagenta
51-
keyword whole catch brightmagenta
52-
keyword whole finally brightmagenta
68+
keyword whole use brightmagenta
69+
keyword whole while brightmagenta
70+
keyword whole yield brightmagenta
5371

5472

5573
# .NET Functions
@@ -3639,6 +3657,7 @@ context default
36393657
keyword whole as white
36403658
keyword whole and white
36413659
keyword whole or white
3660+
keyword whole xor white
36423661

36433662
# Magic constants (https://www.php.net/manual/en/language.constants.magic.php)
36443663
keyword whole __LINE__ brightred

0 commit comments

Comments
 (0)