Class: Minjs::ECMA262::SourceElements

Inherits:
StatementList show all
Defined in:
lib/minjs/ecma262/base.rb

Overview

Class of ECMA262 Source Elements

See Also:

Instance Attribute Summary

Attributes inherited from StatementList

#statement_list

Attributes inherited from Base

#parent

Instance Method Summary collapse

Methods inherited from StatementList

#[], #[]=, #deep_dup, #each, #grouping, #index, #length, #remove, #remove_empty_statement, #replace, #to_exp, #to_exp?, #to_js, #traverse

Methods inherited from Base

#add_remove_paren, #concat, #deep_dup, #replace, #to_js, #traverse

Constructor Details

#initialize(source_elements) ⇒ SourceElements

source_elements: [statement, statement, …]



294
295
296
# File 'lib/minjs/ecma262/base.rb', line 294

def initialize(source_elements)
  @statement_list = source_elements
end

Instance Method Details

#==(obj) ⇒ Object

compare object



311
312
313
# File 'lib/minjs/ecma262/base.rb', line 311

def ==(obj)
  statement_list == obj.statement_list
end

#source_elements=(source_elements) ⇒ Object

alias of statement_list=



304
305
306
# File 'lib/minjs/ecma262/base.rb', line 304

def source_elements=(source_elements)
  @statement_list = source_elements
end