Module: Jaina::Parser::Expression Private

Includes:
Registry::AccessInterfaceMixin
Defined in:
lib/jaina/parser/expression.rb,
lib/jaina/parser/expression/registry/access_interface_mixin.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: Operator Classes: Registry

Class Method Summary collapse

Methods included from Registry::AccessInterfaceMixin

included

Class Method Details

.acts_as_binary_term?(expression_token) ⇒ 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.

Returns:

  • (Boolean)

Since:

  • 0.1.0



75
76
77
# File 'lib/jaina/parser/expression.rb', line 75

def acts_as_binary_term?(expression_token)
  fetch(expression_token).acts_as_binary_term?
end

.acts_as_unary_term?(expression_token) ⇒ 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.

Returns:

  • (Boolean)

Since:

  • 0.1.0



83
84
85
# File 'lib/jaina/parser/expression.rb', line 83

def acts_as_unary_term?(expression_token)
  fetch(expression_token).acts_as_unary_term?
end

.build(expression_token, *expression_arguments) ⇒ Jaina::Parser::Expression::Operator::Abstract

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.

Parameters:

Returns:

Since:

  • 0.1.0



30
31
32
33
# File 'lib/jaina/parser/expression.rb', line 30

def build(expression_token, *expression_arguments)
  expression = fetch(expression_token.token)
  expression.new(arguments: expression_token.arguments, expressions: expression_arguments)
end

.group_closener?(expression_token) ⇒ 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.

Parameters:

  • expression_token (String)

Returns:

  • (Boolean)

Since:

  • 0.1.0



67
68
69
# File 'lib/jaina/parser/expression.rb', line 67

def group_closener?(expression_token)
  fetch(expression_token).acts_as_group_closener?
end

.group_opener?(expression_token) ⇒ 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.

Parameters:

  • expression_token (String)

Returns:

  • (Boolean)

Since:

  • 0.1.0



58
59
60
# File 'lib/jaina/parser/expression.rb', line 58

def group_opener?(expression_token)
  fetch(expression_token).acts_as_group_opener?
end

.non_terminal?(expression_token) ⇒ 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.

Parameters:

  • expression_token (String)

Returns:

  • (Boolean)

Since:

  • 0.1.0



49
50
51
# File 'lib/jaina/parser/expression.rb', line 49

def non_terminal?(expression_token)
  fetch(expression_token).non_terminal?
end

.terminal?(expression_token) ⇒ 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.

Parameters:

  • expression_token (String)

Returns:

  • (Boolean)

Since:

  • 0.1.0



40
41
42
# File 'lib/jaina/parser/expression.rb', line 40

def terminal?(expression_token)
  fetch(expression_token).terminal?
end