/**
 * Forth errors
 *
 * Created on 2021/11/13.
 */

#ifndef FORTH_FH_ERROR_H
#define FORTH_FH_ERROR_H

/** Error codes */
enum fh_error {
  FH_OK = 0,
  FH_ERR_CS_OVERFLOW,
  FH_ERR_DS_OVERFLOW,
  FH_ERR_RS_OVERFLOW,
  FH_ERR_CS_UNDERFLOW,
  FH_ERR_DS_UNDERFLOW,
  FH_ERR_RS_UNDERFLOW,
  FH_ERR_HEAP_FULL,
  FH_ERR_DICT_FULL,
  FH_ERR_COMPILE_FULL,
  FH_ERR_NAME_TOO_LONG,
  FH_ERR_INVALID_STATE,
  FH_ERR_INTERNAL,
  FH_ERR_UNKNOWN_WORD,
  FH_ERR_ILLEGAL_FETCH,
  FH_ERR_ILLEGAL_STORE,
  FH_ERR_ARITH,
  FH_ERR_SYNTAX,
  FH_ERR_NOT_APPLICABLE,
  FH_ERR_PICTNUM_FULL,
  FH_ERR_MAX,
};

const char *fherr_name(enum fh_error e);

#endif //FORTH_FH_ERROR_H