Class: Minjs::ECMA262::SourceElements
- Inherits:
-
StatementList
- Object
- Base
- StatementList
- Minjs::ECMA262::SourceElements
- Defined in:
- lib/minjs/ecma262/base.rb
Overview
Class of ECMA262 Source Elements
Instance Attribute Summary
Attributes inherited from StatementList
Attributes inherited from Base
Instance Method Summary collapse
-
#==(obj) ⇒ Object
compare object.
-
#initialize(source_elements) ⇒ SourceElements
constructor
source_elements: [statement, statement, …].
-
#source_elements=(source_elements) ⇒ Object
alias of statement_list=.
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 |