#include "ruby_ts_table.h"

void symbol_colorify(int symbol, const Color **fg, uint8_t *flags) {
  *flags = 0;
  if (SYM_IS_RED(symbol)) {
    *fg = colors + RED;
  } else if (SYM_IS_GREEN(symbol)) {
    *fg = colors + GREEN;
  } else if (SYM_IS_YELLOW(symbol)) {
    *fg = colors + YELLOW;
  } else if (SYM_IS_BLUE(symbol)) {
    *fg = colors + BLUE;
  } else if (SYM_IS_CYAN(symbol)) {
    *fg = colors + CYAN;
  } else if (SYM_IS_ORANGE(symbol)) {
    *fg = colors + ORANGE;
  } else if (SYM_IS_PURPLE(symbol)) {
    *fg = colors + PURPLE;
  } else if (SYM_IS_ITALIC(symbol)) {
    *flags |= 0b001;
  } else if (SYM_IS_DARK_ITALIC(symbol)) {
    *fg = colors + DARK;
    *flags |= 0b001;
  }
}
