Class: Pdfrb::Source::Token
- Inherits:
-
Struct
- Object
- Struct
- Pdfrb::Source::Token
- Defined in:
- lib/pdfrb/source/token.rb
Overview
One lexed token. type is a Symbol; value is the literal
bytes/string/number as parsed from source; position is the
byte offset in the IO where the token started (used for
diagnostics and xref).
Instance Attribute Summary collapse
-
#position ⇒ Object
Returns the value of attribute position.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#position ⇒ Object
Returns the value of attribute position
9 10 11 |
# File 'lib/pdfrb/source/token.rb', line 9 def position @position end |
#type ⇒ Object
Returns the value of attribute type
9 10 11 |
# File 'lib/pdfrb/source/token.rb', line 9 def type @type end |
#value ⇒ Object
Returns the value of attribute value
9 10 11 |
# File 'lib/pdfrb/source/token.rb', line 9 def value @value end |
Instance Method Details
#inspect ⇒ Object
10 11 12 |
# File 'lib/pdfrb/source/token.rb', line 10 def inspect "#<Pdfrb::Source::Token #{type} value=#{value.inspect} pos=#{position}>" end |