summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/c.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2011-05-21 05:31:46 +0000
committermurphy <murphy@rubychan.de>2011-05-21 05:31:46 +0000
commit9dc849f57c6309c398403883a357a0003db4d91d (patch)
tree05de2812acba7f294ce3d1094c71fd13ee08192f /lib/coderay/scanners/c.rb
parent3cf824cb66b56914724a511fead2afdba9899fe1 (diff)
downloadcoderay-9dc849f57c6309c398403883a357a0003db4d91d.tar.gz
issue #43: replacing :reserved with :keyword for C and C++
Diffstat (limited to 'lib/coderay/scanners/c.rb')
-rw-r--r--lib/coderay/scanners/c.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/coderay/scanners/c.rb b/lib/coderay/scanners/c.rb
index 03bc1b9..3be7fc2 100644
--- a/lib/coderay/scanners/c.rb
+++ b/lib/coderay/scanners/c.rb
@@ -7,7 +7,7 @@ module Scanners
register_for :c
file_extension 'c'
- RESERVED_WORDS = [
+ KEYWORDS = [
'asm', 'break', 'case', 'continue', 'default', 'do',
'else', 'enum', 'for', 'goto', 'if', 'return',
'sizeof', 'struct', 'switch', 'typedef', 'union', 'while',
@@ -31,7 +31,7 @@ module Scanners
] # :nodoc:
IDENT_KIND = WordList.new(:ident).
- add(RESERVED_WORDS, :reserved).
+ add(KEYWORDS, :keyword).
add(PREDEFINED_TYPES, :predefined_type).
add(DIRECTIVES, :directive).
add(PREDEFINED_CONSTANTS, :predefined_constant) # :nodoc:
@@ -80,7 +80,7 @@ module Scanners
match << matched
else
label_expected = false
- if kind == :reserved
+ if kind == :keyword
case match
when 'case', 'default'
case_expected = true