Path: blob/main/extensions/latex/syntaxes/Bibtex.tmLanguage.json
3292 views
{1"information_for_contributors": [2"This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/Bibtex.tmLanguage.json",3"If you want to provide a fix or improvement, please create a pull request against the original repository.",4"Once accepted there, we are happy to receive an update request."5],6"version": "https://github.com/jlelong/vscode-latex-basics/commit/0fcf9283828cab2aa611072f54feb1e7d501c2b4",7"name": "BibTeX",8"scopeName": "text.bibtex",9"comment": "Grammar based on description from https://github.com/aclements/biblib",10"patterns": [11{12"match": "@(?i:comment)(?=[\\s{(])",13"captures": {14"0": {15"name": "punctuation.definition.comment.bibtex"16}17},18"name": "comment.block.at-sign.bibtex"19},20{21"include": "#preamble"22},23{24"include": "#string"25},26{27"include": "#entry"28},29{30"begin": "[^@\\n]",31"end": "(?=@)",32"name": "comment.block.bibtex"33}34],35"repository": {36"preamble": {37"patterns": [38{39"begin": "((@)(?i:preamble))\\s*(\\{)\\s*",40"beginCaptures": {41"1": {42"name": "keyword.other.preamble.bibtex"43},44"2": {45"name": "punctuation.definition.keyword.bibtex"46},47"3": {48"name": "punctuation.section.preamble.begin.bibtex"49}50},51"end": "\\}",52"endCaptures": {53"0": {54"name": "punctuation.section.preamble.end.bibtex"55}56},57"name": "meta.preamble.braces.bibtex",58"patterns": [59{60"include": "#field_value"61}62]63},64{65"begin": "((@)(?i:preamble))\\s*(\\()\\s*",66"beginCaptures": {67"1": {68"name": "keyword.other.preamble.bibtex"69},70"2": {71"name": "punctuation.definition.keyword.bibtex"72},73"3": {74"name": "punctuation.section.preamble.begin.bibtex"75}76},77"end": "\\)",78"endCaptures": {79"0": {80"name": "punctuation.section.preamble.end.bibtex"81}82},83"name": "meta.preamble.parenthesis.bibtex",84"patterns": [85{86"include": "#field_value"87}88]89}90]91},92"string": {93"patterns": [94{95"begin": "((@)(?i:string))\\s*(\\{)\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)",96"beginCaptures": {97"1": {98"name": "keyword.other.string-constant.bibtex"99},100"2": {101"name": "punctuation.definition.keyword.bibtex"102},103"3": {104"name": "punctuation.section.string-constant.begin.bibtex"105},106"4": {107"name": "variable.other.bibtex"108}109},110"end": "\\}",111"endCaptures": {112"0": {113"name": "punctuation.section.string-constant.end.bibtex"114}115},116"name": "meta.string-constant.braces.bibtex",117"patterns": [118{119"include": "#field_value"120}121]122},123{124"begin": "((@)(?i:string))\\s*(\\()\\s*([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)",125"beginCaptures": {126"1": {127"name": "keyword.other.string-constant.bibtex"128},129"2": {130"name": "punctuation.definition.keyword.bibtex"131},132"3": {133"name": "punctuation.section.string-constant.begin.bibtex"134},135"4": {136"name": "variable.other.bibtex"137}138},139"end": "\\)",140"endCaptures": {141"0": {142"name": "punctuation.section.string-constant.end.bibtex"143}144},145"name": "meta.string-constant.parenthesis.bibtex",146"patterns": [147{148"include": "#field_value"149}150]151}152]153},154"entry": {155"patterns": [156{157"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\{)\\s*([^\\s,}]*)",158"beginCaptures": {159"1": {160"name": "keyword.other.entry-type.bibtex"161},162"2": {163"name": "punctuation.definition.keyword.bibtex"164},165"3": {166"name": "punctuation.section.entry.begin.bibtex"167},168"4": {169"name": "entity.name.type.entry-key.bibtex"170}171},172"end": "\\}",173"endCaptures": {174"0": {175"name": "punctuation.section.entry.end.bibtex"176}177},178"name": "meta.entry.braces.bibtex",179"patterns": [180{181"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)",182"beginCaptures": {183"1": {184"name": "support.function.key.bibtex"185},186"2": {187"name": "punctuation.separator.key-value.bibtex"188}189},190"end": "(?=[,}])",191"name": "meta.key-assignment.bibtex",192"patterns": [193{194"include": "#field_value"195}196]197}198]199},200{201"begin": "((@)[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\()\\s*([^\\s,]*)",202"beginCaptures": {203"1": {204"name": "keyword.other.entry-type.bibtex"205},206"2": {207"name": "punctuation.definition.keyword.bibtex"208},209"3": {210"name": "punctuation.section.entry.begin.bibtex"211},212"4": {213"name": "entity.name.type.entry-key.bibtex"214}215},216"end": "\\)",217"endCaptures": {218"0": {219"name": "punctuation.section.entry.end.bibtex"220}221},222"name": "meta.entry.parenthesis.bibtex",223"patterns": [224{225"begin": "([a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*)\\s*(\\=)",226"beginCaptures": {227"1": {228"name": "support.function.key.bibtex"229},230"2": {231"name": "punctuation.separator.key-value.bibtex"232}233},234"end": "(?=[,)])",235"name": "meta.key-assignment.bibtex",236"patterns": [237{238"include": "#field_value"239}240]241}242]243}244]245},246"field_value": {247"patterns": [248{249"include": "#string_content"250},251{252"include": "#integer"253},254{255"include": "#string_var"256},257{258"match": "#",259"name": "keyword.operator.bibtex"260}261]262},263"integer": {264"captures": {265"1": {266"name": "constant.numeric.bibtex"267}268},269"match": "\\s*(\\d+)\\s*"270},271"nested_braces": {272"begin": "\\{",273"beginCaptures": {274"0": {275"name": "punctuation.definition.group.begin.bibtex"276}277},278"end": "\\}",279"endCaptures": {280"0": {281"name": "punctuation.definition.group.end.bibtex"282}283},284"patterns": [285{286"include": "#nested_braces"287}288]289},290"string_content": {291"patterns": [292{293"begin": "\\{",294"beginCaptures": {295"0": {296"name": "punctuation.definition.string.begin.bibtex"297}298},299"end": "\\}",300"endCaptures": {301"0": {302"name": "punctuation.definition.string.end.bibtex"303}304},305"patterns": [306{307"include": "#nested_braces"308}309]310},311{312"begin": "\"",313"beginCaptures": {314"0": {315"name": "punctuation.definition.string.begin.bibtex"316}317},318"end": "\"",319"endCaptures": {320"0": {321"name": "punctuation.definition.string.end.bibtex"322}323},324"patterns": [325{326"include": "#nested_braces"327}328]329}330]331},332"string_var": {333"captures": {334"0": {335"name": "support.variable.bibtex"336}337},338"match": "[a-zA-Z!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~][a-zA-Z0-9!$&*+\\-./:;<>?@\\[\\\\\\]^_`|~]*"339}340}341}342343