Class: PryCoolline::ParenMatch::Token
- Inherits:
-
Struct
- Object
- Struct
- PryCoolline::ParenMatch::Token
- Defined in:
- lib/pry-coolline/paren_match.rb
Overview
A Token is a short chunk of code. This tokenizer only distinguishes three kinds of token:
- Tokens that open a pair (OpenToken)
- Tokens that close a pair (CloseToken)
- The rest of the code (StrToken)
Instance Attribute Summary collapse
-
#code_pos ⇒ Integer
Position in the initial code, character-wise, including ANSI codes.
-
#pos ⇒ Integer
Position in the initial code, character-wise, disregarding ANSI codes.
-
#str ⇒ String
String covered by the token.
Instance Attribute Details
#code_pos ⇒ Integer
Position in the initial code, character-wise, including ANSI codes.
24 25 26 |
# File 'lib/pry-coolline/paren_match.rb', line 24 def code_pos @code_pos end |
#pos ⇒ Integer
Position in the initial code, character-wise, disregarding ANSI codes.
24 25 26 |
# File 'lib/pry-coolline/paren_match.rb', line 24 def pos @pos end |
#str ⇒ String
String covered by the token
24 25 26 |
# File 'lib/pry-coolline/paren_match.rb', line 24 def str @str end |