export const buildHtmlTree = (tokens, styleSheet) => {
    return <pre>
    {tokens.map(token => {
            //check tokens first then types
            const colour = styleSheet.colorKeyWordMap.find(colorMap => colorMap.tokens?.includes(token.text)) ?? styleSheet.colorKeyWordMap.find(colorMap => colorMap.types?.includes(token.type));
            return colour ? <span style={{ color: colour.color }}>{token.text}</span> : token.text;
        })}
  </pre>;
};
