Module: Musa::Neumalang::Neumalang::Parser::Parameter Private

Defined in:
lib/musa-dsl/neumalang/neumalang.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.

Semantic action for individual parameter.

Transforms either key-value parameter or positional parameter.

Instance Method Summary collapse

Instance Method Details

#valueHash

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.

Builds parameter structure.

Returns:

  • (Hash)

    parameter as :key_value or :value



379
380
381
382
383
384
385
# File 'lib/musa-dsl/neumalang/neumalang.rb', line 379

def value
  if capture(:key_value_parameter)
    { key_value: capture(:key_value_parameter).value }
  else
    { value: capture(:expression).value }
  end
end