Sha256: 4412825c2b8a33bd98061929f46e977704da1317b772f5999d98fde7ca43f4bb

Contents?: true

Size: 579 Bytes

Versions: 20

Compression:

Stored size: 579 Bytes

Contents

module Mutant
  module AST
    # Mixin for node sexp syntax
    module Sexp

    private

      # Build node
      #
      # @param [Symbol] type
      #
      # @return [Parser::AST::Node]
      #
      # @api private
      #
      def s(type, *children)
        Parser::AST::Node.new(type, children)
      end

      # Build a negated boolean node
      #
      # @param [Parser::AST::Node] node
      #
      # @return [Parser::AST::Node]
      #
      # @api private
      #
      def n_not(node)
        s(:send, node, :!)
      end

    end # Sexp
  end # AST
end # Mutant

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mutant-0.8.0 lib/mutant/ast/sexp.rb
mutant-0.7.9 lib/mutant/ast/sexp.rb
mutant-0.7.8 lib/mutant/ast/sexp.rb
mutant-0.7.7 lib/mutant/ast/sexp.rb
mutant-0.7.6 lib/mutant/ast/sexp.rb
mutant-0.7.5 lib/mutant/ast/sexp.rb
mutant-0.7.4 lib/mutant/ast/sexp.rb
mutant-0.7.3 lib/mutant/ast/sexp.rb
mutant-0.7.2 lib/mutant/ast/sexp.rb
mutant-0.7.1 lib/mutant/ast/sexp.rb
mutant-0.6.7 lib/mutant/ast/sexp.rb
mutant-0.6.6 lib/mutant/ast/sexp.rb
mutant-0.6.5 lib/mutant/ast/sexp.rb
mutant-0.6.4 lib/mutant/ast/sexp.rb
mutant-0.6.3 lib/mutant/ast/sexp.rb
mutant-0.6.2 lib/mutant/ast/sexp.rb
mutant-0.6.0 lib/mutant/ast/sexp.rb
mutant-0.5.26 lib/mutant/ast/sexp.rb
mutant-0.5.25 lib/mutant/ast/sexp.rb
mutant-0.5.24 lib/mutant/ast/sexp.rb