Class: RDocF95::Token
- Inherits:
-
Object
- Object
- RDocF95::Token
- Defined in:
- lib/rdoc-f95/parsers/parse_f95.rb
Constant Summary collapse
- NO_TEXT =
"??".freeze
Instance Attribute Summary collapse
-
#char_no ⇒ Object
readonly
Returns the value of attribute char_no.
-
#line_no ⇒ Object
readonly
Returns the value of attribute line_no.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(line_no, char_no) ⇒ Token
constructor
A new instance of Token.
-
#set_text(text) ⇒ Object
Because we’re used in contexts that expect to return a token, we set the text string and then return ourselves.
Constructor Details
Instance Attribute Details
#char_no ⇒ Object (readonly)
Returns the value of attribute char_no.
256 257 258 |
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 256 def char_no @char_no end |
#line_no ⇒ Object (readonly)
Returns the value of attribute line_no.
256 257 258 |
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 256 def line_no @line_no end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
256 257 258 |
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 256 def text @text end |
Instance Method Details
#set_text(text) ⇒ Object
Because we’re used in contexts that expect to return a token, we set the text string and then return ourselves
251 252 253 254 |
# File 'lib/rdoc-f95/parsers/parse_f95.rb', line 251 def set_text(text) @text = text self end |