Class: Rlex::Token
- Inherits:
-
Struct
- Object
- Struct
- Rlex::Token
- Defined in:
- lib/rlex/token.rb
Overview
Simple class to represent tokens matched from the input.
Instance Attribute Summary collapse
-
#type ⇒ Symbol
readonly
Type of the token, such as the name of the rule used to match it.
-
#value ⇒ String
readonly
Text matched from the input.
Instance Attribute Details
#type ⇒ Symbol (readonly)
Type of the token, such as the name of the rule used to match it
10 11 12 |
# File 'lib/rlex/token.rb', line 10 def type @type end |
#value ⇒ String (readonly)
Text matched from the input
10 11 12 |
# File 'lib/rlex/token.rb', line 10 def value @value end |