Class: Furnace::AVM2::Tokens::ControlTransferToken

Inherits:
Code::SurroundedToken
  • Object
show all
Defined in:
lib/furnace-avm2/source/implementation_tokens/control_transfer_token.rb

Direct Known Subclasses

BreakToken, ContinueToken

Instance Method Summary collapse

Instance Method Details

#keywordObject



4
5
6
# File 'lib/furnace-avm2/source/implementation_tokens/control_transfer_token.rb', line 4

def keyword
  raise "reimplement ControlTransferToken#keyword in a subclass"
end

#text_afterObject



16
17
18
# File 'lib/furnace-avm2/source/implementation_tokens/control_transfer_token.rb', line 16

def text_after
  ";\n"
end

#text_beforeObject



8
9
10
11
12
13
14
# File 'lib/furnace-avm2/source/implementation_tokens/control_transfer_token.rb', line 8

def text_before
  if @children.any?
    "#{keyword} "
  else
    "#{keyword}"
  end
end