Module: Musa::Neumalang::Neumalang::Parser::UseVariable 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 variable usage.

Transforms variable references like "@variable". Converts name to symbol with @ prefix.

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 variable reference structure.

Returns:

  • (Hash)

    variable reference with kind :use_variable and symbol name



440
441
442
443
# File 'lib/musa-dsl/neumalang/neumalang.rb', line 440

def value
  { kind: :use_variable,
    use_variable: "@#{capture(:name).value}".to_sym }.extend Musa::Neumas::Neuma
end