Skip to content
instance method

SyntaxSuggest::CodeLine#ignore_newline_not_beg?

ignore_newline_not_beg?
Not stable API

Lines that have a on_ignored_nl type token and NOT a BEG type seem to be a good proxy for the ability to join multiple lines into one.

This predicate method is used to determine when those two criteria have been met.

The one known case this doesn’t handle is:

Example
Ripper.lex <<~EOM
  a &&
   b ||
   c
EOM

For some reason this introduces on_ignore_newline but with BEG type

See also #hidden? #indent_index #empty? #is_end? also in 3.4 · 3.3 · 3.2