How to use the vscode-textmate.StandardTokenType.Comment function in vscode-textmate

To help you get started, we’ve selected a few vscode-textmate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / plugin-ext / src / main / browser / plugin-contribution-handler.ts View on Github external
// tslint:disable-next-line:no-null-keyword
        const result = Object.create(null);
        const scopes = Object.keys(tokenTypes);
        const len = scopes.length;
        for (let i = 0; i < len; i++) {
            const scope = scopes[i];
            const tokenType = tokenTypes[scope];
            switch (tokenType) {
                case 'string':
                    result[scope] = StandardTokenType.String;
                case 'other':
                    result[scope] = StandardTokenType.Other;
                case 'comment':
                    result[scope] = StandardTokenType.Comment;
        return result;