Permalink
Browse files

removing nonfunctional special case handling for review, moved to branch

  • Loading branch information...
1 parent dbfb3d1 commit 5d828af41c50879526274c1625d6fcb3b18a209f bglusman committed Jan 27, 2012
Showing with 1 addition and 4 deletions.
  1. +0 −1 lib/outlaw.rb
  2. +1 −3 lib/outlaw/law_dsl.rb
View
@@ -17,7 +17,6 @@ def self.enforce(dir=".")
PARAM_TYPES = [:on_const, :on_ident, :on_ivar, :on_cvar]
IGNORE_TYPES = [:on_sp, :on_nl, :on_ignored_nl, :on_rparen, :on_lparen]
#these come from ripper's Lexer
- SPECIAL_CASES = [:disjoint_code_seperator, :whitespace_sensitive] #need to work on naming here
CORE_CLASSES_FILE = File.expand_path("../../data/core_classes.txt", __FILE__)
CORE_CLASS = File.readlines(CORE_CLASSES_FILE).map &:chomp
end
View
@@ -6,9 +6,7 @@ def parse(restriction, message="")
parsed_restriction = []
tokens.each do |token|
case
- when special_case?(token) # notional plan for handling flexibly
- parsed_restriction << string_to_sym(token).to_proc
- when multipart?(token) #this handles multi-token literals, Const.new etc
+ when multipart?(token) #this handles multi-token literals, Const.new etc
parsed_restriction += Ripper.lex(token)
.reduce([]){|array, tkn|
array << token_type_regex(tkn) }

0 comments on commit 5d828af

Please sign in to comment.