Class: Furnace::AVM2::Tokens::ClassImplementationsToken

Inherits:
Code::SeparatedToken
  • Object
show all
Defined in:
lib/furnace-avm2/source/declaration_tokens/class_implementations_token.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ClassImplementationsToken.



3
4
5
6
7
# File 'lib/furnace-avm2/source/declaration_tokens/class_implementations_token.rb', line 3

def initialize(origin, options={})
  super(origin, origin.interfaces.map { |iface|
    MultinameToken.new(origin, iface, options)
  }, options)
end

Instance Method Details

#text_afterObject



21
22
23
# File 'lib/furnace-avm2/source/declaration_tokens/class_implementations_token.rb', line 21

def text_after
  " "
end

#text_beforeObject



9
10
11
12
13
14
15
# File 'lib/furnace-avm2/source/declaration_tokens/class_implementations_token.rb', line 9

def text_before
  if @options[:environment] == :interface
    "extends "
  else
    "implements "
  end
end

#text_betweenObject



17
18
19
# File 'lib/furnace-avm2/source/declaration_tokens/class_implementations_token.rb', line 17

def text_between
  ", "
end