Class: Furnace::AVM2::Tokens::ConstructorToken

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

Instance Method Summary collapse

Methods inherited from CalleeToken

#declaration, #text_after

Constructor Details

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

Returns a new instance of ConstructorToken.



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

def initialize(origin, options={})
  super(origin, [
    ConstructorSpecifiersToken.new(origin, options),
    FunctionNameToken.new(origin, [
      MultinameToken.new(origin, options[:instance].name, options.merge(omit_ns: true))
    ], options),
  ], origin.initializer, origin.initializer_body,
     options.merge({ index: origin.initializer_idx }))
end