catcode :: Monad m => LexerT m [Token]
catcode = do
  chCode <- number
  equals
  ccNew <- number -- Note: @toEnum@ will fail if not in range 0-15.
  modifyState (addCatcode (toEnum chCode, toEnum ccNew))
  return []

---------- Builtin macros: TeX macro definitions

-- Parse a macro definition, execute it (by updating the list of
-- active macros) and remove the @def@ command from the token stream.
catcode :: Monad m => LexerT m [Token]
catcode = do
  chCode <- number
  equals
  ccNew <- number -- Note: @toEnum@ will fail if not in range 0-15.
  modifyState (addCatcode (toEnum chCode, toEnum ccNew))
  return []

---------- Builtin macros: TeX macro definitions

-- Parse a macro definition, execute it (by updating the list of
-- active macros) and remove the @def@ command from the token stream.
catcode = do
  chCode <- number
  equals
  ccNew <- number -- Note: @toEnum@ will fail if not in range 0-15.
  modifyState (addCatcode (toEnum chCode, toEnum ccNew))
  return []

---------- Builtin macros: TeX macro definitions

-- Parse a macro definition, execute it (by updating the list of
-- active macros) and remove the @def@ command from the token stream.