free_mutant/spec/support/fake_ast.rb
Markus Schirp d50ecc483d Cleanup missing whitespace after comma
* There must be a code metric tool helping me in converting my style.
2012-07-31 04:10:37 +02:00

48 lines
913 B
Ruby

unless defined?(Rubinius)
module Rubinius
# Dummy AST namespace
module AST
# Dummy node
class Node
attr_reader :line, :name
attr_accessor :body
def initialize(line, name, body=[])
@line, @name, @body = line, name, body
end
end
class ConstantScope < Node
end
class ClassScope < ConstantScope
end
class ModuleScope < ConstantScope
end
class Script < Node
end
# Dummy class node
class Class < Node
def initialize(line, name, superclass, body)
super(line, name)
@superclass, @body = superclass, body
end
end
# Dummy module node
class Module < Node
def initialize(line, name, body)
super(line, name)
@body = body
end
end
class ConstantAccess < Node
end
end
end
end