Module: Jaina::Parser::Expression::Operator::Abstract::DSL Private
- Included in:
- Jaina::Parser::Expression::Operator::Abstract
- Defined in:
- lib/jaina/parser/expression/operator/abstract/dsl.rb,
lib/jaina/parser/expression/operator/grouping/dsl.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Modules: ClassInheritance, ClassMethods, InstanceMethods
Constant Summary collapse
- Error =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Class.new(StandardError)
- IncorrectTokenError =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Class.new(Error)
- IncorrectPrecedenceLevelError =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Class.new(Error)
- IncorrectAssociativityDirectionError =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Class.new(Error)
- LEFT_ASSOC =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:left
- RIGHT_ASSOC =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:right
Class Method Summary collapse
- .included(base_klass) ⇒ void private
Class Method Details
.included(base_klass) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 33 def included(base_klass) base_klass.instance_variable_set(:@token, nil) base_klass.instance_variable_set(:@precedence_level, nil) base_klass.instance_variable_set(:@associativity_direction, nil) base_klass.instance_variable_set(:@acts_as_binary_term, false) base_klass.instance_variable_set(:@acts_as_unary_term, false) base_klass.extend(ClassMethods) base_klass.include(InstanceMethods) # NOTE: inheritance base_klass.singleton_class.prepend(Module.new do def inherited(child_klass) child_klass.instance_variable_set(:@token, @token) child_klass.instance_variable_set(:@precedence_level, @precedence_level) child_klass.instance_variable_set(:@associativity_direction, @associativity_direction) child_klass.instance_variable_set(:@acts_as_binary_term, @acts_as_binary_term) child_klass.instance_variable_set(:@acts_as_unary_term, @acts_as_unary_term) end end) end |