Sha256: dc567394b844007d4a3e45d6eb923419b2ce3ec3a5c3b027451030153a93f53d

Contents?: true

Size: 1.97 KB

Versions: 116

Compression:

Stored size: 1.97 KB

Contents

require_relative '../../version2_0'
require_relative '../../function'
require_relative '../../signature'
require_relative '../../semantics'

module BELParser
  module Language
    module Version2_0
      module Functions
        # Reactants: Denotes the reactants of a reaction
        class Reactants
          extend Function

          SHORT       = :reactants
          LONG        = :reactants
          RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::Reactants
          DESCRIPTION = 'Denotes the reactants of a reaction'.freeze

          def self.short
            SHORT
          end

          def self.long
            LONG
          end

          def self.return_type
            RETURN_TYPE
          end

          def self.description
            DESCRIPTION
          end

          def self.signatures
            SIGNATURES
          end

          module Signatures
            # ReactantsSignature
            class ReactantsSignature
              extend BELParser::Language::Signature

              private_class_method :new

              AST = BELParser::Language::Semantics::Builder.build do
                term(
                  function(
                    identifier(
                      function_of(Reactants))),
                  variadic_arguments(
                    term(
                      function(
                        identifier(
                          return_type_of(BELParser::Language::Version2_0::ReturnTypes::Abundance))))))
              end
              private_constant :AST

              STRING_FORM = 'reactants(F:abundance...)reactants'.freeze
              private_constant :STRING_FORM

              def self.semantic_ast
                AST
              end

              def self.string_form
                STRING_FORM
              end
            end
          end

          SIGNATURES = Signatures.constants.map do |const|
            Signatures.const_get(const)
          end.freeze
        end
      end
    end
  end
end

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
bel_parser-1.1.6-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.6 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.5 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.4-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.4 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.3-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.3 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.2-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.2 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.1-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.1.1 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.8-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.8 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.7-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.7 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.6-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.6 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.5-java lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.5 lib/bel_parser/language/version2_0/functions/reactants.rb
bel_parser-1.0.4-java lib/bel_parser/language/version2_0/functions/reactants.rb