lib/gisele/language/ast/bool_expr.rb in gisele-0.4.0 vs lib/gisele/language/ast/bool_expr.rb in gisele-0.5.0

- old
+ new

@@ -3,10 +3,18 @@ module AST module BoolExpr include Node def label - markers[:match] ? markers[:match].to_s : last.label + (citrus_match && citrus_match.to_s) || last.label + end + + def negate + if last.first == :bool_not + Language.sexpr [:bool_expr, last.last] + else + Language.sexpr [ :bool_expr, [:bool_not, last] ] + end end end # module BoolExpr end # module AST end # module Language \ No newline at end of file