Class: MrbParser::IrepSection
- Defined in:
- lib/mrb_parser/irep_section.rb
Constant Summary
Constants inherited from Section
Section::BINARY_EOF, Section::DEBUG_IDENTIFIER, Section::IREP_IDENTIFIER, Section::LINENO_IDENTIFIER
Instance Attribute Summary collapse
-
#rec ⇒ Object
readonly
Returns the value of attribute rec.
Attributes inherited from Section
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize ⇒ IrepSection
constructor
A new instance of IrepSection.
- #parse_body(parser) ⇒ Object
- #parse_record(parser) ⇒ Object
Methods inherited from Section
Constructor Details
#initialize ⇒ IrepSection
Returns a new instance of IrepSection.
7 8 9 |
# File 'lib/mrb_parser/irep_section.rb', line 7 def initialize(*) super end |
Instance Attribute Details
#rec ⇒ Object (readonly)
Returns the value of attribute rec.
5 6 7 |
# File 'lib/mrb_parser/irep_section.rb', line 5 def rec @rec end |
Instance Method Details
#dump ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/mrb_parser/irep_section.rb', line 24 def dump printf "*** IREP SECTION ***\n" printf "secID : %s\n", @signature printf "size : %s\n", @size printf "vm ver: %s\n", @vm_version @rec.dump printf "*** ***\n" end |
#parse_body(parser) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/mrb_parser/irep_section.rb', line 11 def parse_body(parser) @vm_version = parser.read_chars(4) @rec = parse_record(parser) parser.irep_section = self self end |
#parse_record(parser) ⇒ Object
18 19 20 21 22 |
# File 'lib/mrb_parser/irep_section.rb', line 18 def parse_record(parser) rec = MrbParser::IrepRecord.new rec.parse_record(parser) rec end |