Skip to content

Commit

Permalink
Removing unused type attribute on slate extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
trobrock committed Apr 14, 2013
1 parent b0cc187 commit 5f6651e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions lib/slate/parser/extensions.rb
Original file line number Diff line number Diff line change
@@ -1,56 +1,33 @@
module Slate
module SlateTree
class Target < Treetop::Runtime::SyntaxNode
def type
:target
end

def text_value
elements.detect{ |e| e.is_a? String }.text_value
end
end

class Function < Treetop::Runtime::SyntaxNode
def type
:function
end

def text_value
elements.detect{ |e| e.is_a? Token }.text_value
end
end

class Token < Treetop::Runtime::SyntaxNode
def type
:token
end
end

class Argument < Treetop::Runtime::SyntaxNode
def type
:argument
end

def text_value
elements.first.text_value
end
end

class String < Treetop::Runtime::SyntaxNode
def type
:string
end

def text_value
super.gsub(/"/,'')
end
end

class Integer < Treetop::Runtime::SyntaxNode
def type
:integer
end

def text_value
super.to_i
end
Expand Down

0 comments on commit 5f6651e

Please sign in to comment.