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.
108 109 110 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 108 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.
124 125 126 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 124 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.
116 117 118 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 116 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.
132 133 134 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 132 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.
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 92 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.
148 149 150 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 148 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.
78 79 80 81 82 83 84 85 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 78 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.
140 141 142 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 140 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.
64 65 66 67 68 69 70 71 |
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 64 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 |