def parse(str)
      @document = AST::Document.new(file_path: file_path)
      @root = @document.root

      @dependency_paths = []

      if str.is_a?(Array)
        reset(str, [[@root]])
      else
        reset(str.split(/\r?\n/, -1), [[@root]]) # -1 is for not suppressing empty lines
      end

      parse_line while next_line

      reset

      @document
    end
def parse(str)
      @document = AST::Document.new(file_path: file_path)
      @root = @document.root

      @dependency_paths = []

      if str.is_a?(Array)
        reset(str, [[@root]])
      else
        reset(str.split(/\r?\n/, -1), [[@root]]) # -1 is for not suppressing empty lines
      end

      parse_line while next_line

      reset

      @document
    end
@param [Fixnum] tabsize
 @param [String] file_path

 @param [String, Array<String>] str
 @return [Bade::AST::Document] root node