// 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: [], names: ['tact'], patterns: [ {include: '#comment'}, {include: '#annotation'}, {include: '#literal'}, {include: '#invalid'}, {include: '#constant'}, {include: '#type'}, {include: '#expression'}, {include: '#punctuation'}, {include: '#keyword'}, {include: '#function'}, {include: '#variable'} ], repository: { annotation: { patterns: [ { begin: '^\\s*(@name)\\s*(\\()', beginCaptures: { 1: {name: 'entity.other.attribute-name.tact'}, 2: {name: 'punctuation.brackets.round.tact'} }, end: '\\)', endCaptures: {0: {name: 'punctuation.brackets.round.tact'}}, patterns: [{match: '(.*?)', name: 'entity.name.function.func.tact'}] }, { begin: '(?', name: 'keyword.operator.mapsto.tact'}, {match: '\\b(0[0-9]*)\\b', name: 'constant.numeric.decimal.tact'}, { match: '\\b([1-9](?:_?[0-9])*)\\b', name: 'constant.numeric.decimal.tact' } ] }, { match: '(?>)(?!=)', name: 'keyword.operator.bitwise.tact' }, { match: '(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|\\|\\|=|&&=|<<=|>>=)', name: 'keyword.operator.assignment.tact' }, { match: '(?])=(?!=)', name: 'keyword.operator.assignment.equal.tact' }, {match: '([!=]=|<=?|>=?)', name: 'keyword.operator.comparison.tact'}, { match: '([+%*\\-])|(/(?!/))', name: 'keyword.operator.arithmetic.tact' }, {match: '\\b(initOf)\\b', name: 'keyword.operator.new.tact'}, {match: '\\b(codeOf)\\b', name: 'keyword.operator.new.tact'}, { begin: '(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)', beginCaptures: {1: {name: 'keyword.operator.ternary.tact'}}, end: '\\s*(:)', endCaptures: {1: {name: 'keyword.operator.ternary.tact'}}, patterns: [{include: '$self'}] } ] }, function: { captures: { 1: {name: 'entity.name.function.tact'}, 2: {name: 'punctuation.brackets.round.tact'} }, match: '\\b((?:[a-zA-Z_][a-zA-Z0-9_]*))\\s*(\\()' }, invalid: { patterns: [ { match: '\\b__(?:gen|tact)[a-zA-Z0-9_]*\\b', name: 'invalid.illegal.identifier.tact' } ] }, keyword: { patterns: [ {match: '(?', endCaptures: {0: {name: 'punctuation.brackets.angle.tact'}}, patterns: [{include: '#simple-type'}] }, { begin: '(?', endCaptures: {0: {name: 'punctuation.brackets.angle.tact'}}, patterns: [ {include: '#simple-type'}, {match: ',', name: 'punctuation.comma.tact'}, {include: '#as-tlb'} ] }, {include: '#as-tlb'} ] }, variable: { patterns: [ {match: '(?