Skip to content

Commit 3c50ae1

Browse files
authored
Add record keyword declaration for Java 14+ (#2121)
1 parent bf007b7 commit 3c50ae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rouge/lexers/java.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Java < RegexLexer
5151
rule %r/(?:#{declarations.join('|')})\b/, Keyword::Declaration
5252
rule %r/(?:#{types.join('|')})\b/, Keyword::Type
5353
rule %r/(?:true|false|null)\b/, Keyword::Constant
54-
rule %r/(?:class|interface)\b/, Keyword::Declaration, :class
54+
rule %r/(?:class|interface|record)\b/, Keyword::Declaration, :class
5555
rule %r/(?:import|package)\b/, Keyword::Namespace, :import
5656
rule %r/"""\s*\n.*?(?<!\\)"""/m, Str::Heredoc
5757
rule %r/"(\\\\|\\"|[^"])*"/, Str

0 commit comments

Comments
 (0)