Skip to content

Commit

Permalink
MIN Better error for vmode error
Browse files Browse the repository at this point in the history
  • Loading branch information
luispedro committed Mar 27, 2013
1 parent 3350e24 commit 6c45826
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hex/Modes.lhs
Expand Up @@ -139,7 +139,7 @@ vMode1' (OutputfontCommand fontinfo) =

If nothing matches, make the parser fail:
\begin{code}
vMode1' _ = unexpected "not a vmode command"
vMode1' c = unexpected (concat ["Expected a vmode command, got ", show c])
\end{code}

Now that we have dealt with vertical mode, we must deal with the horizontal.
Expand Down
6 changes: 3 additions & 3 deletions hex/Tokens.lhs
Expand Up @@ -197,10 +197,10 @@ emptyTokenStream TokenStream{charsource=st, state=s, queue=q} = null q && (isNot
Convert a sequence of \code{CharToken} into a \code{String}
\begin{code}
toksToStr :: [Token] -> [Char]
toksToStr = map charof
toksToStr = concatMap tos
where
charof (CharToken (TypedChar c _)) = c
charof _ = error "hex.Tokens.toksToStr.charof: Unexpected token"
tos (CharToken (TypedChar c _)) = [c]
tos (ControlSequence s) = "\\" ++ s
\end{code}


Expand Down

0 comments on commit 6c45826

Please sign in to comment.