class RedParse::ListInNode::NotMatchNode
Public Class Methods
new(left,op,right=nil)
click to toggle source
# File lib/redparse/node.rb, line 1464 def initialize(left,op,right=nil) op,right=nil,op unless right replace [left,right] end
Public Instance Methods
op()
click to toggle source
# File lib/redparse/node.rb, line 1481 def op; "!~"; end
parsetree(o)
click to toggle source
# File lib/redparse/node.rb, line 1469 def parsetree(o) if StringNode===left and left.char=="/" [:not, [:match2, left.parsetree(o), right.parsetree(o)]] elsif StringNode===right and right.char=="/" [:not, [:match3, right.parsetree(o), left.parsetree(o)]] else result=opnode_parsetree(o) result[2]="=#{op[1..1]}".to_sym result=[:not, result] end end