Skip to content
Browse files

Fix literal parsing which actually includes numbers, symbols and ranges.

  • Loading branch information...
1 parent a8fec16 commit 6fb855a45a7754c1748b3d4a1647e9652eafe6e7 @radar radar committed Sep 20, 2010
Showing with 12 additions and 2 deletions.
  1. +12 −2 processor.rb
View
14 processor.rb
@@ -129,9 +129,19 @@ def process_defined(exp)
mark(:defined) + super
end
- # 1..5
+ # Literal values are objects that are:
+ # Numeric
+ # Symbol
+ # Range
+ # And maybe more
def process_lit(exp)
- mark(:dot2) + super
+ case exp[0]
+ # A range
+ when /^.*?\.\.\.?.*?$/
+ mark(:range) + super
+ else
+ super
+ end
end
CALLS = [:require, :attr_accessor, :attr_reader, :attr_writer, :include, :extend]

0 comments on commit 6fb855a

Please sign in to comment.
Something went wrong with that request. Please try again.