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.

Since:

  • 0.1.0

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.

Since:

  • 0.1.0

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.

Since:

  • 0.1.0

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.

Since:

  • 0.1.0

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.

Since:

  • 0.1.0

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.

Returns:

  • (Symbol)

Since:

  • 0.1.0

: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.

Returns:

  • (Symbol)

Since:

  • 0.1.0

:right

Class Method Summary collapse

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.

Parameters:

  • base_klass (Class)

Since:

  • 0.1.0



33
34
35
36
37
38
39
40
41
42
43
# 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
  base_klass.singleton_class.prepend(ClassInheritance)
end