Skip to content

Commit

Permalink
(java) add permits keyword (#3649)
Browse files Browse the repository at this point in the history
  • Loading branch information
MBoegers authored Oct 30, 2022
1 parent abcb53d commit f035aab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ Grammars:
- fix(bash) recognize the `((` keyword [Nick Chambers][]
- fix(nix) support escaped dollar signs in strings [h7x4][]
- enh(cmake) support bracket comments [Hirse][]
- enh(java) add permits keyword to java [MBoegers][]

[Josh Goebel]: https://github.com/joshgoebel
[Josh Temple]: https://github.com/joshtemple
[nathnolt]: https://github.com/nathnolt
[Nick Chambers]: https://github.com/uplime
[h7x4]: https://github.com/h7x4
[Hirse]: https://github.com/Hirse
[MBoegers]: https://github.com/MBoegers


## Version 11.6.0
Expand Down
3 changes: 2 additions & 1 deletion src/languages/java.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export default function(hljs) {
'requires',
'exports',
'do',
'sealed'
'sealed',
'permits'
];

const BUILT_INS = [
Expand Down
2 changes: 1 addition & 1 deletion test/markup/java/titles.expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
}

<span class="hljs-keyword">sealed</span> <span class="hljs-keyword">interface</span> <span class="hljs-title class_">Command</span> permits LoginCommand {
<span class="hljs-keyword">sealed</span> <span class="hljs-keyword">interface</span> <span class="hljs-title class_">Command</span> <span class="hljs-keyword">permits</span> LoginCommand {
<span class="hljs-keyword">void</span> <span class="hljs-title function_">run</span><span class="hljs-params">()</span>;
}

Expand Down

0 comments on commit f035aab

Please sign in to comment.