// 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: ['.lol'], names: ['lolcode'], patterns: [ {include: '#comments'}, {include: '#keywords'}, {include: '#strings'}, {include: '#numbers'}, {include: '#variables'}, {include: '#operators'}, {include: '#parentheses'} ], repository: { comments: { patterns: [ {match: '(?|<|=|!|\\?|:', name: 'keyword.operator.lolcode' }, {include: '#parentheses'} ] }, parentheses: { patterns: [{match: '\\(|\\)', name: 'punctuation.parenthesis.lolcode'}] }, strings: { patterns: [ { captures: { 1: {name: 'string.quoted.double.lolcode'}, 2: {name: 'string.quoted.single.lolcode'} }, match: '("(?:\\\\.|[^"\\\\])*")|(\'(?:\\\\.|[^\'\\\\])*\')' } ] }, variables: { patterns: [ { match: '(?<=\\b)([A-Za-z][A-Za-z0-9_]*)\\b', name: 'variable.other.lolcode' }, {match: '(?<=CAN HAS )(\\w*)(?=\\?)', name: 'variable.other.lolcode'} ] } }, scopeName: 'source.lolcode' } export default grammar