Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added record, moved enum, added var for Groovy #1984

Merged
merged 2 commits into from
Aug 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/rouge/lexers/groovy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ def self.keywords

def self.declarations
@declarations ||= Set.new %w(
abstract const enum extends final implements native private
abstract const extends final implements native private
protected public static strictfp super synchronized throws
transient volatile
)
end

def self.types
@types ||= Set.new %w(
def boolean byte char double float int long short void
def var boolean byte char double float int long short void
)
end

Expand All @@ -56,7 +56,7 @@ def self.constants
rule %r(//.*?$), Comment::Single
rule %r(/[*].*?[*]/)m, Comment::Multiline
rule %r/@\w[\w.]*/, Name::Decorator
rule %r/(class|interface|trait)\b/, Keyword::Declaration, :class
rule %r/(class|interface|trait|enum|record)\b/, Keyword::Declaration, :class
rule %r/package\b/, Keyword::Namespace, :import
rule %r/import\b/, Keyword::Namespace, :import

Expand Down