Class: Furnace::AVM2::Tokens::MethodToken

Inherits:
CalleeToken
  • Object
show all
Defined in:
lib/furnace-avm2/source/declaration_tokens/method_token.rb

Instance Method Summary collapse

Methods inherited from CalleeToken

#declaration, #text_after

Constructor Details

#initialize(origin, options = {}) ⇒ MethodToken

Returns a new instance of MethodToken.



5
6
7
8
9
10
11
12
13
14
# File 'lib/furnace-avm2/source/declaration_tokens/method_token.rb', line 5

def initialize(origin, options={})
  super(origin, [
    MetadataToken.new(origin, options),
    MethodSpecifiersToken.new(origin, options),
    FunctionNameToken.new(origin, [
      MultinameToken.new(origin, origin.name, options.merge(omit_ns: true))
    ], options),
  ], origin.data.method, origin.body,
     options.merge({ index: origin.data.method_idx }))
end