diff options
author | murphy <murphy@rubychan.de> | 2006-07-10 00:32:57 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-07-10 00:32:57 +0000 |
commit | 9f4c7ab7553f9be7c9d14da0ba7462ad746c2f5d (patch) | |
tree | 686ee95cc9010314278846936476d1cf0bf04353 /lib/coderay/scanners/ruby/patterns.rb | |
parent | 42436798565c36a7d9582fcf587946d273083ab1 (diff) | |
download | coderay-9f4c7ab7553f9be7c9d14da0ba7462ad746c2f5d.tar.gz |
Big re-indenting - no more tabs!
Diffstat (limited to 'lib/coderay/scanners/ruby/patterns.rb')
-rw-r--r-- | lib/coderay/scanners/ruby/patterns.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb index c38739d..b1e0d1b 100644 --- a/lib/coderay/scanners/ruby/patterns.rb +++ b/lib/coderay/scanners/ruby/patterns.rb @@ -25,7 +25,7 @@ module Scanners ]
REGEXP_ALLOWED = WordList.new(false).
add(IDENTS_ALLOWING_REGEXP, :set)
-
+
PREDEFINED_CONSTANTS = %w[
nil true false self
DATA ARGV ARGF __FILE__ __LINE__
@@ -60,7 +60,7 @@ module Scanners '/'=> :regexp,
}
QUOTE_TO_TYPE.default = :string
-
+
REGEXP_MODIFIERS = /[mixounse]*/
REGEXP_SYMBOLS = /[|?*+?(){}\[\].^$]/
@@ -145,17 +145,17 @@ module Scanners }
FancyStringType['w'] = FancyStringType['q']
FancyStringType['W'] = FancyStringType[''] = FancyStringType['Q']
-
+
class StringState < Struct.new :type, :interpreted, :delim, :heredoc,
:paren, :paren_depth, :pattern, :next_state
-
+
CLOSING_PAREN = Hash[ *%w[
( )
[ ]
< >
{ }
] ]
-
+
CLOSING_PAREN.values.each { |o| o.freeze } # debug, if I try to change it with <<
OPENING_PAREN = CLOSING_PAREN.invert
@@ -166,8 +166,8 @@ module Scanners delim_pattern << Regexp.escape(closing_paren)
end
-
- special_escapes =
+
+ special_escapes =
case interpreted
when :regexp_symbols
'| ' + REGEXP_SYMBOLS.source
|