Class: Furnace::AVM2::Tokens::UnaryOperatorToken

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

Instance Method Summary collapse

Methods included from IsSimple

#complex?

Constructor Details

#initialize(origin, child, operator, options = {}) ⇒ UnaryOperatorToken

Returns a new instance of UnaryOperatorToken.



5
6
7
8
# File 'lib/furnace-avm2/source/implementation_tokens/unary_operator_token.rb', line 5

def initialize(origin, child, operator, options={})
  super(origin, [ child ], options)
  @operator = operator
end

Instance Method Details

#text_beforeObject



10
11
12
# File 'lib/furnace-avm2/source/implementation_tokens/unary_operator_token.rb', line 10

def text_before
  @operator.to_s
end