From 763902e8176ecb0339ebdda4d5a57c64c69ca62e Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Mon, 4 Feb 2019 13:15:42 +0300 Subject: [PATCH] Bibop syntax fix --- bibop-recipe.sublime-syntax | 184 ++++++++++++++++++------------------ 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/bibop-recipe.sublime-syntax b/bibop-recipe.sublime-syntax index 17a373d..912072f 100644 --- a/bibop-recipe.sublime-syntax +++ b/bibop-recipe.sublime-syntax @@ -1,92 +1,92 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: Bibop Recipe -file_extensions: - - recipe -scope: source.bibop - -contexts: - main: - - include: comments - - include: strings - - include: keywords - - 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 - - pop-on-line-end: - - match: $ - pop: true - - 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: string-placeholder - - include: string-escaped-char - - 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: string-placeholder - - include: string-escaped-char - - string-placeholder: - - match: |- - (?x)% - [#0\- +']* # flags - (\[\d+\])? # field (argument #) - [,;:_]? # separator character (AltiVec) - ((-?\d+)|(\[\d+\])?\*)? # minimum field width - (\.((-?\d+)|(\[\d+\])?\*)?)? # precision - [diouxXDOUeEfFgGaAcCsSpqnvtTbyYhHmMzZ%] # conversion type - scope: constant.other.placeholder.bibop - - keywords: - - match: '^(dir|require-root|unsafe-actions)' - scope: keyword.other - - match: '^action' - scope: support.function - - 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 - - variables: - - match: '^(var) +([\d\w\S]+)' - captures: - 0: spec.definition - 1: storage.type - 2: entity.name.type - - match: '\{([a-zA-Z0-9_-]{1,})\}' - captures: - 0: variable.other.bibop - 1: variable.other.name.bibop +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +name: Bibop Recipe +file_extensions: + - recipe +scope: source.bibop + +contexts: + main: + - include: comments + - include: strings + - include: keywords + - 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 + + pop-on-line-end: + - match: $ + pop: true + + 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: string-placeholder + - include: string-escaped-char + - 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: string-placeholder + - include: string-escaped-char + + string-placeholder: + - match: |- + (?x)% + [#0\- +']* # flags + (\[\d+\])? # field (argument #) + [,;:_]? # separator character (AltiVec) + ((-?\d+)|(\[\d+\])?\*)? # minimum field width + (\.((-?\d+)|(\[\d+\])?\*)?)? # precision + [diouxXDOUeEfFgGaAcCsSpqnvtTbyYhHmMzZ%] # conversion type + scope: constant.other.placeholder.bibop + + keywords: + - match: '^(dir|require-root|unsafe-actions)' + scope: keyword.other + - match: '^action' + scope: support.function + - 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 + + variables: + - match: '^(var) +([\d\w\S]+)' + captures: + 0: spec.definition + 1: storage.type + 2: entity.name.type + - match: '\{([a-zA-Z0-9_-]{1,})\}' + captures: + 0: variable.other.bibop + 1: variable.other.name.bibop