Skip to content

Commit

Permalink
fix: add for as a highlight keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdw committed Jan 5, 2024
1 parent 594b8ba commit f95eaa8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"extends" @keyword
"final" @keyword
"finally" @keyword
"for" @keyword
"foreach" @keyword
"function" @keyword
"global" @keyword
Expand Down
11 changes: 10 additions & 1 deletion test/highlight/keywords.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?php
// <- tag

if ($a) {}
if ($a) {} elseif ($b) {} else {}
// <- keyword
// ^ keyword
// ^ keyword

for ($i = 0; $i < 1; $i++) {}
// <- keyword

while ($b) {}
Expand All @@ -14,6 +19,10 @@
// <- keyword
// ^ keyword

foreach ($foos as $foo) {}
// <- keyword
// ^ keyword

try {} catch (Exception $e) {}
// <- keyword
// ^ keyword
Expand Down

0 comments on commit f95eaa8

Please sign in to comment.