 
 
   parseLines: (lines) ->
-    # bracketStack is an array of columns indicating the location
+    # openBracketStack is an array of [row, col] indicating the location
     # of the opening bracket (square, curly, or parentheses)
-    bracketStack = []
+    openBracketStack = []
+    # closeBracketStack is an array of [rowOpen, rowClose] describing the
+    # row where the bracket was opened, and the row where the bracket was closed.
+    # The top of the stack is the last bracket-pair to be closed.
+    closeBracketStack = []
     # if we are in a string, this tells us what character introduced the string
     # i.e., did this string start with ' or with "?
     stringDelimiter = []

            c = line[col]

            # if stringDelimiter is set, then we are in a string
            if stringDelimiter.length
                if isEscaped
                    isEscaped = false

                if c == '#'
                    break
                else if c in '[({'
                    openBracketStack.push([row, col])
                else if c in '})]'
                    closeBracketStack.push([openBracketStack.pop()[0], row])
                else if c in '\'"'
                    stringDelimiter = c

    return [openBracketStack, closeBracketStack]

  indentHanging: (editor, row, previousLine) ->
    # Indent at the current block level plus the setting amount (1 or 2)
