{"name":"Nunjucks Templates","scopeName":"source.nunjucks","patterns":[{"name":"comment.block.nunjucks.raw","begin":"({%-?)\\s*(raw)\\s*(-?%})","end":"({%-?)\\s*(endraw)\\s*(-?%})","captures":{"1":{"name":"entity.other.nunjucks.delimiter.tag"},"2":{"name":"keyword.control.nunjucks"},"3":{"name":"entity.other.nunjucks.delimiter.tag"}}},{"name":"comment.block.nunjucks","begin":"{#-?","end":"-?#}","captures":{"0":{"name":"entity.other.nunjucks.delimiter.comment"}}},{"name":"meta.scope.nunjucks.variable","begin":"{{-?","end":"-?}}","patterns":[{"include":"#expression"}],"captures":{"0":{"name":"entity.other.nunjucks.delimiter.variable"}}},{"name":"meta.scope.nunjucks.tag","begin":"{%-?","end":"-?%}","patterns":[{"include":"#expression"}],"captures":{"0":{"name":"entity.other.nunjucks.delimiter.tag"}}}],"repository":{"escaped_char":{"name":"constant.character.escape.hex.nunjucks","match":"\\\\x[0-9A-F]{2}"},"escaped_unicode_char":{"match":"(\\\\U[0-9A-Fa-f]{8})|(\\\\u[0-9A-Fa-f]{4})|(\\\\N\\{[a-zA-Z ]+\\})","captures":{"1":{"name":"constant.character.escape.unicode.16-bit-hex.nunjucks"},"2":{"name":"constant.character.escape.unicode.32-bit-hex.nunjucks"},"3":{"name":"constant.character.escape.unicode.name.nunjucks"}}},"expression":{"patterns":[{"match":"\\s*\\b(block)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b","captures":{"1":{"name":"keyword.control.nunjucks"},"2":{"name":"variable.other.nunjucks.block"}}},{"match":"\\s*\\b(filter)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b","captures":{"1":{"name":"keyword.control.nunjucks"},"2":{"name":"variable.other.nunjucks.filter"}}},{"match":"\\s*\\b(is)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b","captures":{"1":{"name":"keyword.control.nunjucks"},"2":{"name":"variable.other.nunjucks.test"}}},{"match":"(?\u003c=\\{\\%-|\\{\\%)\\s*\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*[,=])","captures":{"1":{"name":"keyword.control.nunjucks"}}},{"name":"keyword.control.nunjucks","match":"\\b(and|else|if|in|import|not|or|recursive|with(out)?\\s+context)\\b"},{"name":"constant.language.nunjucks","match":"\\b(true|false|none)\\b"},{"name":"variable.language.nunjucks","match":"\\b(loop|super|self|varargs|kwargs)\\b"},{"name":"variable.other.nunjucks","match":"[a-zA-Z_][a-zA-Z0-9_]*"},{"name":"keyword.operator.arithmetic.nunjucks","match":"(\\+|\\-|\\*\\*|\\*|//|/|%)"},{"match":"(\\|)([a-zA-Z_][a-zA-Z0-9_]*)","captures":{"1":{"name":"punctuation.other.nunjucks"},"2":{"name":"variable.other.nunjucks.filter"}}},{"match":"(\\.)([a-zA-Z_][a-zA-Z0-9_]*)","captures":{"1":{"name":"punctuation.other.nunjucks"},"2":{"name":"variable.other.nunjucks.attribute"}}},{"begin":"\\[","end":"\\]","patterns":[{"include":"#expression"}],"captures":{"0":{"name":"punctuation.other.nunjucks"}}},{"begin":"\\(","end":"\\)","patterns":[{"include":"#expression"}],"captures":{"0":{"name":"punctuation.other.nunjucks"}}},{"begin":"\\{","end":"\\}","patterns":[{"include":"#expression"}],"captures":{"0":{"name":"punctuation.other.nunjucks"}}},{"name":"punctuation.other.nunjucks","match":"(\\.|:|\\||,)"},{"name":"keyword.operator.comparison.nunjucks","match":"(==|\u003c=|=\u003e|\u003c|\u003e|!=)"},{"name":"keyword.operator.assignment.nunjucks","match":"="},{"name":"string.quoted.double.nunjucks","begin":"\"","end":"\"","patterns":[{"include":"#string"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nunjucks"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nunjucks"}}},{"name":"string.quoted.single.nunjucks","begin":"'","end":"'","patterns":[{"include":"#string"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nunjucks"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nunjucks"}}},{"name":"string.regexp.nunjucks","begin":"@/","end":"/","patterns":[{"include":"#simple_escapes"}],"beginCaptures":{"0":{"name":"punctuation.definition.regexp.begin.nunjucks"}},"endCaptures":{"0":{"name":"punctuation.definition.regexp.end.nunjucks"}}}]},"simple_escapes":{"match":"(\\\\\\n)|(\\\\\\\\)|(\\\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)","captures":{"1":{"name":"constant.character.escape.newline.nunjucks"},"10":{"name":"constant.character.escape.tab.nunjucks"},"11":{"name":"constant.character.escape.vertical-tab.nunjucks"},"2":{"name":"constant.character.escape.backlash.nunjucks"},"3":{"name":"constant.character.escape.double-quote.nunjucks"},"4":{"name":"constant.character.escape.single-quote.nunjucks"},"5":{"name":"constant.character.escape.bell.nunjucks"},"6":{"name":"constant.character.escape.backspace.nunjucks"},"7":{"name":"constant.character.escape.formfeed.nunjucks"},"8":{"name":"constant.character.escape.linefeed.nunjucks"},"9":{"name":"constant.character.escape.return.nunjucks"}}},"string":{"patterns":[{"include":"#simple_escapes"},{"include":"#escaped_char"},{"include":"#escaped_unicode_char"}]}}}
