Class: Furnace::AVM2::Tokens::SupplementaryCommentToken

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

Instance Method Summary collapse

Constructor Details

#initialize(origin, content, children, options = {}) ⇒ SupplementaryCommentToken

Returns a new instance of SupplementaryCommentToken.



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

def initialize(origin, content, children, options={})
  super(origin, children, options)
  @content = content
end

Instance Method Details

#text_beforeObject



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

def text_before
  if @options[:commented]
    "* #{@content} * "
  else
    "/* #{@content} */ "
  end
end