Class: Prism::LexCompat::Heredoc::PlainHeredoc
- Defined in:
- lib/prism/lex_compat.rb
Overview
Heredocs that are no dash or tilde heredocs are just a list of tokens. We need to keep them around so that we can insert them in the correct order back into the token stream and set the state of the last token to the state that the heredoc was opened in.
Instance Attribute Summary collapse
-
#tokens ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
- #<<(token) ⇒ Object
-
#initialize ⇒ PlainHeredoc
constructor
A new instance of PlainHeredoc.
- #to_a ⇒ Object
Constructor Details
#initialize ⇒ PlainHeredoc
Returns a new instance of PlainHeredoc.
279 280 281 |
# File 'lib/prism/lex_compat.rb', line 279 def initialize @tokens = [] end |
Instance Attribute Details
#tokens ⇒ Object (readonly)
:nodoc:
277 278 279 |
# File 'lib/prism/lex_compat.rb', line 277 def tokens @tokens end |