 ! Copyright (C) 2008, 2010 Slava Pestov, Joe Groff.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays combinators continuations io kernel
-math math.parser namespaces sequences source-files.errors
-strings vectors ;
+math math.parser namespaces sequences sequences.private
+source-files.errors strings vectors ;
 IN: lexer
 
 TUPLE: lexer
 { text array }
 { line fixnum }
-{ line-text maybe{ string } }
+{ line-text string }
 { line-length fixnum }
 { column fixnum }
 { parsing-words vector } ;

    ] change-lexer-column ;

: still-parsing? ( lexer -- ? )
    [ line>> ] [ text>> length ] bi <= ;

: still-parsing-line? ( lexer -- ? )
    [ column>> ] [ line-length>> ] bi < ;

: (parse-token) ( lexer -- str )
    {

    nth CHAR: " eq? ; inline

: shebang? ( column text -- ? )
    swap zero? [
        dup length 1 > [
            dup first-unsafe CHAR: # =
            [ second-unsafe CHAR: ! = ] [ drop f ] if
        ] [ drop f ] if
    ] [ drop f ] if ; inline

PRIVATE>

M: lexer skip-word
    [
        {
            { [ 2dup quote? ] [ drop 1 + ] }
