Method: SyntaxSuggest::CodeSearch#call

Defined in:
lib/syntax_suggest/code_search.rb

#callObject

Main search loop



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/syntax_suggest/code_search.rb', line 123

def call
  until frontier.holds_all_syntax_errors?
    @tick += 1

    if frontier.expand?
      expand_existing
    else
      create_blocks_from_untracked_lines
    end
  end

  @invalid_blocks.concat(frontier.detect_invalid_blocks)
  @invalid_blocks.sort_by! { |block| block.starts_at }
  self
end