     (+ col0 col1)))
 
 (defn &indent [column]
-  (fn [[in [top :as is] out :as σ]]
+  (fn [[in out [top :as is] ds :as σ]]
     (let [pos (in-position in)
           info [*file* pos pos]
           tok+ #(conj % [%2 nil info])]
       (if (> column top)
-        [nil [in (conj is column) (tok+ out :indent)]]
+        [nil [in (tok+ out :indent) (conj is column) ds]]
         (loop [[top & ris :as is] is
                out out]
           (cond
-           (= column top) [nil [in is out]]
+           (= column top) [nil [in out is ds]]
            (or (empty? ris) (> column top)) ((&error {:r "invalid dedentation"}) σ)
            :else (recur ris (tok+ out :dedent))))))))
-
-(def &comment-eol
-  (&do (&optional (&do (&char= \#) (&repeat (&char-if-not crlf)))) &eol))
 
 (defn char-range [first last]
   (map char (range (int first) (inc (int last)))))

;; See Python 2 Documentation: https://docs.python.org/2/reference/lexical_analysis.html

;; This lexer is written in monadic style.
;; type State = InputStream×IndentStack×OutputStream
;; monad PythonLexer α = State → α×State
;;
;; The output is a sequence of vector of the form: [type data info]

       (&char= \newline)
       &eof))

(def &comment-eol
  (&do (&optional (&do (&char= \#) (&repeat (&char-if-not crlf)))) &eol))

(def &backslash (&char= \\))

(def &leading-whitespace-raw
  (&do &whitespace &column))

(def &implicit-line-continuation
  (fn [[in out is ds :as σ]]
    ((if (empty? ds) &fail &comment-eol) σ)))

(def &line-continuation
  (&or
   &implicit-line-continuation
   (&do &backslash &eol)))

(def &whitespace
  (&repeat (&or (&char-if whitespace)
                &line-continuation)))

(def &leading-whitespace-continued
  (&let
