Module: DeepCover::Node::Mixin::IsStatement

Defined in:
lib/deep_cover/node/mixin/is_statement.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/deep_cover/node/mixin/is_statement.rb', line 6

def self.included(base)
  base.has_child_handler('is_%{name}_statement')
end

Instance Method Details

#is_child_statement(child, name = nil) ⇒ Object

Default child rewriting rule



15
16
17
# File 'lib/deep_cover/node/mixin/is_statement.rb', line 15

def is_child_statement(child, name = nil)
  :if_incompatible
end

#is_statementObject



10
11
12
# File 'lib/deep_cover/node/mixin/is_statement.rb', line 10

def is_statement
  parent.is_child_statement(self)
end