diff options
author | murphy <murphy@rubychan.de> | 2011-05-21 05:31:46 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2011-05-21 05:31:46 +0000 |
commit | 9dc849f57c6309c398403883a357a0003db4d91d (patch) | |
tree | 05de2812acba7f294ce3d1094c71fd13ee08192f /lib/coderay/scanners/cpp.rb | |
parent | 3cf824cb66b56914724a511fead2afdba9899fe1 (diff) | |
download | coderay-9dc849f57c6309c398403883a357a0003db4d91d.tar.gz |
issue #43: replacing :reserved with :keyword for C and C++
Diffstat (limited to 'lib/coderay/scanners/cpp.rb')
-rw-r--r-- | lib/coderay/scanners/cpp.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/coderay/scanners/cpp.rb b/lib/coderay/scanners/cpp.rb index 10b4c04..57eadd4 100644 --- a/lib/coderay/scanners/cpp.rb +++ b/lib/coderay/scanners/cpp.rb @@ -11,7 +11,7 @@ module Scanners title 'C++' #-- http://www.cppreference.com/wiki/keywords/start - RESERVED_WORDS = [ + KEYWORDS = [ 'and', 'and_eq', 'asm', 'bitand', 'bitor', 'break', 'case', 'catch', 'class', 'compl', 'const_cast', 'continue', 'default', 'delete', 'do', 'dynamic_cast', 'else', @@ -40,7 +40,7 @@ module Scanners ] # :nodoc: IDENT_KIND = WordList.new(:ident). - add(RESERVED_WORDS, :reserved). + add(KEYWORDS, :keyword). add(PREDEFINED_TYPES, :predefined_type). add(PREDEFINED_VARIABLES, :local_variable). add(DIRECTIVES, :directive). @@ -94,7 +94,7 @@ module Scanners match << matched else label_expected = false - if kind == :reserved + if kind == :keyword case match when 'class' state = :class_name_expected |