Class: MarshalParser::Parser::IntegerNode
- Inherits:
-
Node
- Object
- Node
- MarshalParser::Parser::IntegerNode
show all
- Defined in:
- lib/marshal-parser/parser.rb
Instance Method Summary
collapse
Methods inherited from Node
#always_leaf?, #children, #tokens
Methods included from Assertable
#assert
Constructor Details
#initialize(prefix, value) ⇒ IntegerNode
Returns a new instance of IntegerNode.
472
473
474
475
476
477
478
479
|
# File 'lib/marshal-parser/parser.rb', line 472
def initialize(prefix, value)
super()
assert_token_type prefix, Lexer::INTEGER_PREFIX
assert_token_type value, Lexer::INTEGER
@prefix = prefix
@value = value
end
|
Instance Method Details
#attributes ⇒ Object
493
494
495
496
497
|
# File 'lib/marshal-parser/parser.rb', line 493
def attributes
{
@value => { name: :value, value: @value.value }
}
end
|
#child_entities ⇒ Object
481
482
483
|
# File 'lib/marshal-parser/parser.rb', line 481
def child_entities
[@prefix, @value]
end
|
#decoded_value ⇒ Object
485
486
487
|
# File 'lib/marshal-parser/parser.rb', line 485
def decoded_value
@value.value
end
|
#literal_token ⇒ Object
489
490
491
|
# File 'lib/marshal-parser/parser.rb', line 489
def literal_token
@value
end
|