borela / naomi

Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Other
558 stars 18 forks source link

syntax highlighting issue that I think is linked to generator functions? #208

Open kufii opened 5 years ago

kufii commented 5 years ago

here's the snippet

const obj = [
    'Arguments',
    'Function',
    'String',
    'Number',
    'Date',
    'RegExp'
].reduce((obj, name) => {
    obj[`is${name}`] = a => toString.call(a) === `[object ${name}]`;
    return obj;
}, {
    isGenerator: a => a instanceof (function*() { yield; }).constructor
});
export const { isArguments, isFunction, isString, isNumber, isDate, isRegExp, isGenerator } = obj;

something about the isGenerator line causes the syntax highlighting to break

image