// This is a TextMate grammar distributed by `starry-night`. // This grammar is developed at // // and licensed `mit`. // See for more info. /** * @import {Grammar} from '@wooorm/starry-night' */ /** @type {Grammar} */ const grammar = { extensions: ['.tolk'], names: ['tolk'], patterns: [ {match: '//(.*)', name: 'comment.line.double-slash'}, {begin: '/\\*', end: '\\*/', name: 'comment.block'}, { begin: '"""', end: '"""', name: 'string.quoted.triple.tolk', patterns: [{match: '\\\\.', name: 'constant.character.escape.tolk'}] }, { begin: '"', end: '"', name: 'string.quoted.double.tolk', patterns: [ {match: '\\\\([nrt\\\\\'"])', name: 'constant.character.escape.tolk'} ] }, { match: '\\b(-?(0x[0-9a-fA-F_]*|0b[01_]*|[0-9][0-9_]*))\\b', name: 'constant.numeric' }, { match: '\\b(do|if|try|else|while|for|break|throw|catch|return|assert|repeat|continue|asm|builtin|match|lazy)\\b', name: 'keyword.control' }, { match: '\\+|-|\\*|/|%|\\?|:|,|;|\\(|\\)|\\[|\\]|{|}|=|<|>|!|&|\\||\\^|==|!=|<=|>=|<<|>>|&&|\\|\\||~/|\\^/|\\+=|-=|\\*=|/=|%=|&=|\\|=|\\^=|->|<=>|~>>|\\^>>|<<=|>>=|=>|\\?\\?', name: 'keyword.operator' }, { match: '\\b(import|export|namespace|true|false|null|mutate|tolk|as|is|private|readonly)\\b', name: 'keyword.other' }, {match: '\\bself\\b', name: 'keyword.other'}, {match: '(?)?\\s*\\()' }, { captures: { 1: {name: 'keyword.operator.accessor'}, 2: {name: 'variable.other.property'} }, match: '(\\.)(`[^`]+`|[a-zA-Z$_][a-zA-Z0-9$_]*)' }, {match: '(?