Searches code for a syntax error

There are three main phases in the algorithm:

  1. Sanitize/format input source

  2. Search for invalid blocks

  3. Format invalid blocks into something meaninful

This class handles the part.

The bulk of the heavy lifting is done in:

- CodeFrontier (Holds information for generating blocks and determining if we can stop searching)
- ParseBlocksFromLine (Creates blocks into the frontier)
- BlockExpand (Expands existing blocks to search more code)

## Syntax error detection

When the frontier holds the syntax error, we can stop searching

search = CodeSearch.new(<<~EOM)
  def dog
    def lol
  end
EOM

search.call

search.invalid_blocks.map(&:to_s) # =>
# => ["def lol\n"]
Attributes
Read
No documentation available
No documentation available
Read
No documentation available
Read
No documentation available
Class Methods
No documentation available
Instance Methods

Main search loop

Parses the most indented lines into blocks that are marked and added to the frontier

Given an already existing block in the frontier, expand it to see if it contains our invalid syntax

No documentation available

Used for debugging