Module: Jaina::Parser::Expression::Operator::Abstract::DSL::ClassMethods Private
- 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.
Instance Method Summary collapse
- #acts_as_binary_term ⇒ void private
- #acts_as_binary_term? ⇒ void private
- #acts_as_group_closener ⇒ void private
- #acts_as_group_closener? ⇒ void private
- #acts_as_group_opener ⇒ void private
- #acts_as_group_opener? ⇒ void private
- #acts_as_unary_term ⇒ void private
- #acts_as_unary_term? ⇒ void private
- #associativity_direction(assoc = nil) ⇒ String, NilClass private
- #non_terminal? ⇒ Boolean private
- #precedence_level(level = nil) ⇒ Integer, NilClass private
- #terminal? ⇒ Boolean private
- #token(term = nil) ⇒ String, NilClass private
Instance Method Details
#acts_as_binary_term ⇒ 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.
136 137 138 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 136 def acts_as_binary_term @acts_as_binary_term = true end |
#acts_as_binary_term? ⇒ 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.
152 153 154 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 152 def acts_as_binary_term? @acts_as_binary_term end |
#acts_as_group_closener ⇒ 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.
52 53 54 |
# File 'lib/jaina/parser/expression/operator/grouping/dsl.rb', line 52 def acts_as_group_closener @acts_as_group_closener = true end |
#acts_as_group_closener? ⇒ 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.
68 69 70 |
# File 'lib/jaina/parser/expression/operator/grouping/dsl.rb', line 68 def acts_as_group_closener? @acts_as_group_closener end |
#acts_as_group_opener ⇒ 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.
60 61 62 |
# File 'lib/jaina/parser/expression/operator/grouping/dsl.rb', line 60 def acts_as_group_opener @acts_as_group_opener = true end |
#acts_as_group_opener? ⇒ 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.
76 77 78 |
# File 'lib/jaina/parser/expression/operator/grouping/dsl.rb', line 76 def acts_as_group_opener? @acts_as_group_opener end |
#acts_as_unary_term ⇒ 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.
144 145 146 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 144 def acts_as_unary_term @acts_as_unary_term = true end |
#acts_as_unary_term? ⇒ 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.
160 161 162 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 160 def acts_as_unary_term? @acts_as_unary_term end |
#associativity_direction(assoc = nil) ⇒ String, NilClass
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.
120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 120 def associativity_direction(assoc = nil) unless assoc.is_a?(NilClass) || assoc == LEFT_ASSOC || assoc == RIGHT_ASSOC raise( IncorrectAssociativityDirectionError, "Associativity direction can be :#{LEFT_ASSOC} or :#{RIGHT_ASSOC}" ) end @associativity_direction = assoc unless assoc.nil? @associativity_direction end |
#non_terminal? ⇒ Boolean
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.
176 177 178 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 176 def non_terminal? false end |
#precedence_level(level = nil) ⇒ Integer, NilClass
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.
106 107 108 109 110 111 112 113 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 106 def precedence_level(level = nil) unless level.is_a?(Integer) || level.is_a?(NilClass) raise IncorrectPrecedenceLevelError, 'Precendence level should be a type of integer' end @precedence_level = level unless level.nil? @precedence_level end |
#terminal? ⇒ Boolean
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.
168 169 170 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 168 def terminal? false end |
#token(term = nil) ⇒ String, NilClass
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.
92 93 94 95 96 97 98 99 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 92 def token(term = nil) unless term.is_a?(String) || term.is_a?(NilClass) raise IncorrectTokenError, 'Token should be a type of string' end @token = term unless term.nil? @token end |