diff options
author | murphy <murphy@rubychan.de> | 2005-11-05 03:09:21 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2005-11-05 03:09:21 +0000 |
commit | ee9c870bfbb4032ca08c1f1760716b5472b64293 (patch) | |
tree | 694a7b3deddcfdcf0c1122ed7b640aebbc9bbb10 /lib/coderay/scanners | |
parent | c3dfbc335b14012df9968c6d64221cced3d444b6 (diff) | |
download | coderay-ee9c870bfbb4032ca08c1f1760716b5472b64293.tar.gz |
helpers/word_list.rb:
new CaseIgnoringWordList class
simplified implementation
Performance gain should be small.
Adjusted scanner.rb and scanners/delphi.rb
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r-- | lib/coderay/scanners/c.rb | 2 | ||||
-rw-r--r-- | lib/coderay/scanners/delphi.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/c.rb b/lib/coderay/scanners/c.rb index 3420822..8fae829 100644 --- a/lib/coderay/scanners/c.rb +++ b/lib/coderay/scanners/c.rb @@ -25,7 +25,7 @@ module CodeRay module Scanners 'true', 'false', # C99
]
- IDENT_KIND = Scanner::WordList.new(:ident).
+ IDENT_KIND = WordList.new(:ident).
add(RESERVED_WORDS, :reserved).
add(PREDEFINED_TYPES, :pre_type).
add(PREDEFINED_CONSTANTS, :pre_constant)
diff --git a/lib/coderay/scanners/delphi.rb b/lib/coderay/scanners/delphi.rb index 4c03147..77c3839 100644 --- a/lib/coderay/scanners/delphi.rb +++ b/lib/coderay/scanners/delphi.rb @@ -28,7 +28,7 @@ module CodeRay module Scanners 'virtual', 'write', 'writeonly'
]
- IDENT_KIND = Scanner::WordList.new(:ident, :case_ignore).
+ IDENT_KIND = CaseIgnoringWordList.new(:ident).
add(RESERVED_WORDS, :reserved).
add(DIRECTIVES, :directive)
|