summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/coderay/helpers/word_list.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/coderay/helpers/word_list.rb b/lib/coderay/helpers/word_list.rb
index a74705d..1371446 100644
--- a/lib/coderay/helpers/word_list.rb
+++ b/lib/coderay/helpers/word_list.rb
@@ -9,6 +9,8 @@ module CodeRay
# WordList is highly optimized to be used in Scanners,
# typically to decide whether a given ident is a keyword.
#
+ # For case insensitive words use CaseIgnoringWordList.
+ #
# Example:
#
# # define word arrays
@@ -65,6 +67,12 @@ module CodeRay
end
+ # A WordList is a Hash with some additional features.
+ # It is intended to be used for keyword recognition.
+ #
+ # Keys are compared case-insensitively.
+ #
+ # See WordList.
class CaseIgnoringWordList < WordList
# Creates a new WordList with +default+ as default value.