%YAML 1.2 --- # https://www.sublimetext.com/docs/syntax.html name: Bibop Recipe file_extensions: - recipe scope: source.bibop contexts: main: - include: comments - include: strings - include: keywords - include: commands - include: actions - include: variables comments: - match: (?=^\s*#) push: - match: \# scope: punctuation.definition.comment.bibop set: - meta_scope: comment.line.number-sign.bibop - include: pop-on-line-end - match: \# scope: punctuation.definition.comment.bibop push: - meta_scope: comment.line.number-sign.bibop - include: pop-on-line-end strings: - match: '"' scope: punctuation.definition.string.begin.bibop push: - meta_scope: string.quoted.double.bibop - match: '"' scope: punctuation.definition.string.end.bibop pop: true - match: $ scope: punctuation.definition.string.end.bibop pop: true - include: variables - match: "'" scope: punctuation.definition.string.begin.bibop push: - meta_scope: string.quoted.single.bibop - match: "'" scope: punctuation.definition.string.end.bibop pop: true - match: $ scope: punctuation.definition.string.end.bibop pop: true - include: variables keywords: - match: '^(dir|require-root|unsafe-actions|fast-finish|lock-workdir|unbuffer|delay|https-skip-verify|pkg)' scope: keyword.other - match: '\b(true|false|yes|no)\b' scope: constant.language - match: '\b([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?\d+)?\b' scope: constant.numeric.float.decimal.bibop - match: '\b\d+\b' scope: constant.numeric.integer.decimal.bibop commands: - match: '^([+]?)(command):*([a-zA-Z_0-9_-]*)' captures: 0: support.function 1: bibop.command.group-sign 2: meta.function 3: meta.function.tag actions: - match: '^( |\t)[a-z0-9-]+' scope: bibop.action - match: '^(?: |\t)(\!)([a-z-]+)' captures: 1: bibop.action.negative-sign 2: bibop.action variables: - match: '^(var) +([\d\w\S]+)' captures: 0: spec.definition 1: storage.type 2: entity.name.type - match: '\{(?:ENV:|)([a-zA-Z0-9_-]+)\}' captures: 0: variable.other.bibop 1: variable.other.name.bibop pop-on-line-end: - match: $ pop: true