Class: Pione::Lang::RuleConditionContext

Inherits:
StructuralContext show all
Defined in:
lib/pione/lang/context.rb

Overview

RuleConditionContext is a context for rule conditions.

Instance Method Summary collapse

Methods inherited from StructuralContext

#+, accept, acceptances, inherited, #initialize, #pos, #try_to_eval, #validate

Methods inherited from Context

#eval!

Constructor Details

This class inherits a constructor from Pione::Lang::StructuralContext

Instance Method Details

#eval(env) ⇒ Object

Evaluate the rule condition context. Return a new definition of rule condition.



171
172
173
174
175
# File 'lib/pione/lang/context.rb', line 171

def eval(env)
  create_condition.tap do |condition|
    env.temp(current_definition: condition) {|_env| super(_env)}
  end
end