131
}
132
}
134
>
135
>
// start with token colors from custom token themes
136
>
for (const color of customTokenColors) {
137
colorMap.getId(color);
138
}
140
>
141
>
const foregroundColorId = colorMap.getId(defaultForeground);
142
>
const backgroundColorId = colorMap.getId(defaultBackground);
143
>
144
>
const defaults = new ThemeTrieElementRule(defaultFontStyle, foregroundColorId, backgroundColorId);
145
>
const root = new ThemeTrieElement(defaults);
146
>
for (let i = 0, len = parsedThemeRules.length; i < len; i++) {
147
const rule = parsedThemeRules[i];
148
root.insert(rule.token, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));
149
}
151
>
return new TokenTheme(colorMap, root);
152
>
}
153
154
const colorRegExp = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;