// 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: ['.bb', '.bbappend', '.bbclass'], names: ['bitbake'], patterns: [ {include: '#escaped-single-quote'}, {include: '#escaped-double-quote'}, {include: '#string'}, {include: '#numeric'}, {include: '#keywords'}, {include: '#comment'}, {include: '#inline-python'}, {include: '#variable-expansion'}, {include: '#functions'}, {include: '#bitbake-operator'}, {include: '#variable-name'}, {include: '#operator'} ], repository: { 'bitbake-operator': { match: '(?<=:)(append|prepend|remove)', name: 'keyword.control.bb' }, comment: { captures: { 1: {name: 'punctuation.whitespace.comment.leading.bb'}, 2: {name: 'comment.line.bb'}, 3: {name: 'comment.line.number-sign.bb'}, 4: {name: 'comment.line.text.bb'} }, match: '(\\s*)((#)(.*))\\n' }, 'escaped-double-quote': { match: '\\\\"', name: 'constant.character.escape.bb' }, 'escaped-single-quote': { match: "\\\\'", name: 'constant.character.escape.bb' }, functions: { captures: { 1: {name: 'entity.name.function.python.bb'}, 2: {name: 'keyword.operator.bb'}, 3: {name: 'keyword.other.bitbake-operator.bb'} }, match: '([a-zA-Z_][\\w_]*)(:([a-zA-Z_][\\w_]*))?(?=\\s*\\()' }, 'inline-python': { begin: '(\\$\\{(@))', beginCaptures: { 1: {name: 'punctuation.definition.template-expression.end.bb'}, 2: {name: 'entity.name.function.decorator.python.bb'} }, end: '(\\})', endCaptures: { 1: {name: 'punctuation.definition.template-expression.end.bb'} }, patterns: [ {include: '#operator'}, {include: '#keywords'}, {match: '(\\[)', name: 'meta.embedded.brackets.begin.bb'}, {match: '(\\])', name: 'meta.embedded.brackets.end.bb'}, {include: '#numeric'}, {include: '#functions'}, {include: '#parenthesis-open'}, {include: '#parenthesis-close'}, {include: '#variable-name'}, {include: '#string'} ] }, keywords: { patterns: [ { captures: {1: {name: 'keyword.control.bb'}}, match: '(?