Class: Stretto::Tokens::ModifierToken

Inherits:
HashToken
  • Object
show all
Defined in:
lib/stretto/grammar/tokens/modifier_token.rb

Overview

Token result from parsing a modifier token. This encloses all elements that are constructed by a single character and a value. Refer to individual class to see the MusicElement generated from this token

Examples:

"I40". "T", "@2000"

Instance Method Summary (collapse)

Methods inherited from HashToken

#[]

Instance Method Details

- (MusicElements::MusicElement) to_stretto(pattern = nil)

This method is abstract.

Returns an element of class KLASS

See Also:

  • ModifierToken::KLASS


24
25
26
# File 'lib/stretto/grammar/tokens/modifier_token.rb', line 24

def to_stretto(pattern = nil)
  self.class::KLASS.new(self, pattern)
end

- (Value) value



29
30
31
# File 'lib/stretto/grammar/tokens/modifier_token.rb', line 29

def value
  Value.new(__value.wrap)
end