-- //     [8] space ::= char_space+


-- //     [9] space(n) ::= char_space*n, where n is the equivalent number of spaces.

-- indentWhiteSpace
--   = do i <- liftM indentChar getState
--        maybe (do sc <- indentSpaceChar
--                  modifyState (\x -> x { indentChar = Just sc } ) ) only i
--        optional indentWhiteSpace
--        optional (comment >> optional lineBreak >> whiteSpace)
--     where
--     only p = do { s <- indentSpaceChar ;
--                 when (p /= s) (fail "mixing spaces and tabs is not permitted")
--                 return ()
--

indentation = do cc <- liftM sourceColumn getPosition
                 unless (cc==1) (fail "indetation can only occur at the beginning of a line.")
                 m <- getIndentChar
                 ic <- case m of
                            Nothing -> lookAhead indentSpaceChar >>= setIndentChar
                            Just c -> return c
                 only ic
                 return ()
                 where only p = many ( do s <- indentSpaceChar
                                          when (p /= s) (unexpected "mixing of space and tabs")
                                          return () )
indentation = do cc <- liftM sourceColumn getPosition
                 unless (cc==1) (fail "indetation can only occur at the beginning of a line.")
                 m <- getIndentChar
                 ic <- case m of
                            Nothing -> lookAhead indentSpaceChar >>= setIndentChar
                            Just c -> return c
                 only ic
                 return ()
                 where only p = many ( do s <- indentSpaceChar
                                          when (p /= s) (unexpected "mixing of space and tabs")
                                          return () )
indentation = do cc <- liftM sourceColumn getPosition
                 unless (cc==1) (fail "indetation can only occur at the beginning of a line.")
                 m <- getIndentChar
                 ic <- case m of
                            Nothing -> lookAhead indentSpaceChar >>= setIndentChar
                            Just c -> return c
                 only ic
                 return ()
                 where only p = many ( do s <- indentSpaceChar
                                          when (p /= s) (unexpected "mixing of space and tabs")
                                          return () )