From b62fa0059aa27673c11ffe9949db5bc465ff348e Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sun, 3 Mar 2024 15:16:11 +0100 Subject: [PATCH 1/7] Regenerate, which changes `vscode-vba` source --- lang/source.vba.js | 2 +- notice | 25 ++++++++++++++++++++++++- readme.md | 2 +- script/info.js | 2 +- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lang/source.vba.js b/lang/source.vba.js index fb8ca4c..c82b95d 100644 --- a/lang/source.vba.js +++ b/lang/source.vba.js @@ -1,6 +1,6 @@ // This is a TextMate grammar distributed by `starry-night`. // This grammar is developed at -// +// // and licensed `mpl-2.0`. // See for more info. /** @type {import('../lib/index.js').Grammar} */ diff --git a/notice b/notice index 09387e9..c22c19d 100644 --- a/notice +++ b/notice @@ -21401,7 +21401,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ========================================================================================================= Files in `starry-night`: lang/source.vba.js -From source: +From source: SPDX: mpl-2.0 --------------------------------------------------------------------------------------------------------- License from source file: LICENSE.txt @@ -21781,6 +21781,29 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice defined by the Mozilla Public License, v. 2.0. +License from source file: README.md + +Source code and grammars are licensed under the [Mozilla Public License (MPL-2.0)](LICENSE.txt). + +The icon is licensed under the [Creative Commons ShareAlike](images/LICENSE) license. + + + +[ci-badge]: https://github.com/serkonda7/vscode-vba/actions/workflows/ci.yml/badge.svg +[ci-status]: https://github.com/serkonda7/vscode-vba/actions/workflows/ci.yml + +[badge-installs-market]: https://img.shields.io/visual-studio-marketplace/i/serkonda7.vscode-vba?label=Installs +[badge-installs-vsx]: https://img.shields.io/open-vsx/dt/serkonda7/vscode-vba?label=VSX%20downloads +[vs-marketplace]: https://marketplace.visualstudio.com/items?itemName=serkonda7.vscode-vba +[open-vsx]: https://open-vsx.org/extension/serkonda7/vscode-vba + +[discussions]: https://github.com/serkonda7/vscode-vba/discussions + +[gh-linguist]: https://github.com/DecimalTurn/linguist/blob/master/vendor/licenses/git_submodule/vscode-vba-json.dep.yml + +[sponsors-badge]: https://img.shields.io/badge/Sponsor-GitHub-blue.svg +[sponsors-profile]: https://github.com/sponsors/serkonda7 + ========================================================================================================= Files in `starry-night`: lang/source.v.js From source: diff --git a/readme.md b/readme.md index 065dee7..cbbffb6 100644 --- a/readme.md +++ b/readme.md @@ -1520,7 +1520,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.v`](lang/source.v.js) (mit) — [upstream](https://github.com/0x9ef/vscode-vlang) * [ ] [`source.vala`](lang/source.vala.js) (mit) — [upstream](https://github.com/technosophos/Vala-TMBundle) * [ ] [`source.varnish.vcl`](lang/source.varnish.vcl.js) (mit) — [upstream](https://github.com/brandonwamboldt/sublime-varnish) -* [ ] [`source.vba`](lang/source.vba.js) (mpl-2.0) — [upstream](https://github.com/tiabeast/vscode-vba-json) +* [ ] [`source.vba`](lang/source.vba.js) (mpl-2.0) — [upstream](https://github.com/serkonda7/vscode-vba) * [ ] [`source.velocity`](lang/source.velocity.js) (mit) — [upstream](https://github.com/animecyc/AtomLanguageVelocity) * [ ] [`source.verilog`](lang/source.verilog.js) * [ ] [`source.vhdl`](lang/source.vhdl.js) diff --git a/script/info.js b/script/info.js index c359413..39610af 100644 --- a/script/info.js +++ b/script/info.js @@ -2197,7 +2197,7 @@ export const info = { license: 'bsd-3-clause' }, 'source.vba': { - homepage: 'https://github.com/tiabeast/vscode-vba-json', + homepage: 'https://github.com/serkonda7/vscode-vba', license: 'mpl-2.0' }, 'source.v': { From 53fce6fe4b8c9fab80413327e571373a5965d3e8 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sun, 3 Mar 2024 16:24:45 +0100 Subject: [PATCH 2/7] Update dev-dependencies --- lib/index.js | 4 ++-- package.json | 4 ++-- script/build.js | 6 +++--- script/css.js | 10 +++++----- script/preview.js | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/index.js b/lib/index.js index 6f9354c..f0440a8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -435,7 +435,7 @@ export async function createStarryNight(grammars, options) { * `vscode-oniguruma`. */ async function createOniguruma(options) { - const wasmBin = await getOniguruma(options || undefined) - await vscodeOniguruma.loadWASM(wasmBin) + const wasmBinary = await getOniguruma(options || undefined) + await vscodeOniguruma.loadWASM(wasmBinary) return vscodeOniguruma } diff --git a/package.json b/package.json index c1ab8e7..fcbcba5 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@types/json-stable-stringify": "^1.0.0", "@types/mdast": "^4.0.0", "@types/node": "^20.0.0", - "c8": "^8.0.0", + "c8": "^9.0.0", "css": "^3.0.0", "generate-github-markdown-css": "^6.0.0", "hast-util-to-html": "^9.0.0", @@ -75,7 +75,7 @@ "type-coverage": "^2.0.0", "typescript": "^5.0.0", "unist-builder": "^4.0.0", - "xo": "^0.56.0", + "xo": "^0.57.0", "yaml": "^2.0.0" }, "scripts": { diff --git a/script/build.js b/script/build.js index 4965365..c06eedd 100644 --- a/script/build.js +++ b/script/build.js @@ -223,10 +223,10 @@ const ruleSchema = { const grammarsBase = new URL('grammars/', gemBase) const grammarBasenames = await fs.readdir(grammarsBase) const scopes = grammarBasenames.flatMap(function (d) { - const ext = path.extname(d) + const extension = path.extname(d) - if (ext === '.json') { - return path.basename(d, ext) + if (extension === '.json') { + return path.basename(d, extension) } assert(d === 'version', d) diff --git a/script/css.js b/script/css.js index 9a26e88..9745dd8 100644 --- a/script/css.js +++ b/script/css.js @@ -128,19 +128,19 @@ for (const fileName of fileNames) { const lightCss = light ? themeMap.get(light) : undefined const darkCss = dark ? themeMap.get(dark) : undefined /** @type {Array} */ - const doc = [] + const document = [] if (lightCss && darkCss) { - doc.push( + document.push( lightCss, '@media (prefers-color-scheme: dark) {\n' + darkCss + '\n}' ) } else { - doc.push(lightCss || darkCss || '') + document.push(lightCss || darkCss || '') } for (const rule of selectorsMap.values()) { - doc.push(rule) + document.push(rule) } writePromises.push( @@ -150,7 +150,7 @@ for (const fileName of fileNames) { '/* This is a theme distributed by `starry-night`.\n' + ' * It’s based on what GitHub uses on their site.\n' + ' * See for more info. */' + - doc.join('\n\n'), + document.join('\n\n'), {...prettierConfig, parser: 'css'} ) ) diff --git a/script/preview.js b/script/preview.js index 797dd32..fe0324b 100644 --- a/script/preview.js +++ b/script/preview.js @@ -12,7 +12,7 @@ import {common, createStarryNight} from '../index.js' const highlighter = await createStarryNight(common) -const doc = ` +const document = ` Example @@ -49,7 +49,7 @@ console.log(tree)`, ` -fs.writeFile(new URL('../media/preview.html', import.meta.url), doc) +fs.writeFile(new URL('../media/preview.html', import.meta.url), document) /** * @param {string} value From 91c2c019d14f88f28b6e9872372015b618672f60 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 13 Mar 2024 15:01:03 +0100 Subject: [PATCH 3/7] Regenerate for `linguist@7.29.0` * add `source.8xp`, `source.bb`, `source.bh`, `source.commonlisp`, `source.gts`, `source.mojo`, `source.pip-requirements`, `source.roc`, `source.slint`, `source.textgrid`, `text.html.edge` * change upstream of `source.lua`, `source.sourcepawn` * rename `source.slice` to `source.ice` * update a bunch of grammars For more info, see: * [`github-linguist/linguist@7.29.0`](https://github.com/github-linguist/linguist/releases/tag/v7.29.0) --- lang/etc.js | 30 +- lang/source.8xp.js | 156 ++ lang/source.abl.js | 1652 ++++++++++++++++++-- lang/source.astro.js | 5 +- lang/source.bb.js | 172 +++ lang/source.bh.js | 1233 +++++++++++++++ lang/source.bicep.js | 2 +- lang/source.blitzmax.js | 2 +- lang/source.brs.js | 17 +- lang/source.cobol.js | 26 +- lang/source.commonlisp.js | 433 ++++++ lang/source.cs.js | 23 +- lang/source.csound.js | 2 +- lang/source.dart.js | 8 +- lang/source.elvish-transcript.js | 5 +- lang/source.fsharp.js | 4 + lang/source.gdscript.js | 227 +-- lang/source.gjs.js | 780 +++++++++- lang/source.gts.js | 793 ++++++++++ lang/source.haskell.js | 11 +- lang/source.hcl.terraform.js | 8 +- lang/source.ice.js | 1473 ++++++++++++++++++ lang/source.json.js | 2 + lang/source.julia.js | 134 +- lang/source.lean4.js | 26 +- lang/source.lisp.js | 20 +- lang/source.lua.js | 553 +++++-- lang/source.matlab.js | 49 +- lang/source.mdx.js | 4 +- lang/source.modula2.js | 4 +- lang/source.mojo.js | 2414 ++++++++++++++++++++++++++++++ lang/source.nasal.js | 201 ++- lang/source.nushell.js | 195 ++- lang/source.p4.js | 19 +- lang/source.pip-requirements.js | 41 + lang/source.praat.js | 2 +- lang/source.r.js | 2 +- lang/source.rascal.js | 1 - lang/source.rescript.js | 25 +- lang/source.roc.js | 216 +++ lang/source.rust.js | 14 +- lang/source.scala.js | 62 +- lang/source.slice.js | 977 +----------- lang/source.slint.js | 163 ++ lang/source.sourcepawn.js | 1101 +++++++------- lang/source.swift.js | 2 +- lang/source.textgrid.js | 47 + lang/source.toit.js | 14 +- lang/source.ts.js | 8 +- lang/source.tsx.js | 8 +- lang/source.vba.js | 28 +- lang/text.html.edge.js | 76 + lang/text.md.js | 8 +- lang/text.srt.js | 13 +- lib/all.js | 26 +- notice | 339 ++++- readme.md | 17 +- script/build.js | 3 +- script/graph.yml | 12 + script/info.js | 54 +- 60 files changed, 11697 insertions(+), 2245 deletions(-) create mode 100644 lang/source.8xp.js create mode 100644 lang/source.bb.js create mode 100644 lang/source.bh.js create mode 100644 lang/source.commonlisp.js create mode 100644 lang/source.gts.js create mode 100644 lang/source.ice.js create mode 100644 lang/source.mojo.js create mode 100644 lang/source.pip-requirements.js create mode 100644 lang/source.roc.js create mode 100644 lang/source.slint.js create mode 100644 lang/source.textgrid.js create mode 100644 lang/text.html.edge.js diff --git a/lang/etc.js b/lang/etc.js index 593968d..09f47f9 100644 --- a/lang/etc.js +++ b/lang/etc.js @@ -78,6 +78,10 @@ const grammar = { match: '\\.', name: 'punctuation.delimiter.separator.property.period.dot' }, + dotDec: { + match: '(?:\\G|(? +// and licensed `bsd-3-clause`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: ['.8xp', '.8xp.txt'], + names: ['ti-program'], + patterns: [ + {include: '#functions'}, + {include: '#special-chars'}, + {include: '#control'}, + {include: '#operators'}, + {include: '#numbers'}, + {include: '#snippets'}, + {include: '#strings'}, + {include: '#constants'}, + {include: '#headers'}, + {include: '#variables'}, + {include: '#reals'} + ], + repository: { + constants: { + patterns: [ + {match: 'CENTER|LEFT|RIGHT', name: 'constant.language.8xp'}, + { + match: + '\\[(MATHPRINT|CLASSIC|(U)?n\\/d|AUTO|DEC|FRAC(\\-APPROX)?|STATWIZARD O(FF|N))\\]', + name: 'constant.language.8xp' + }, + { + match: + 'BLUE|RED|BLACK|MAGENTA|GREEN|ORANGE|BROWN|NAVY|LTBLUE|YELLOW|WHITE|LTGRAY|MEDGRAY|GRAY|DARKGRAY', + name: 'constant.language.8xp' + }, + { + match: + 'Blue|Red|Black|Magenta|Green|Orange|Brown|Navy|LtBlue|Yellow|White|LtGray|MedGray|Gray|DarkGray', + name: 'constant.language.8xp' + } + ] + }, + control: { + patterns: [ + { + match: '(If|While|Repeat|Pause|Lbl|Goto|Wait|DelVar) ', + name: 'keyword.control.8xp' + }, + { + match: 'Then|Else|End|Return|Stop|ExecLib', + name: 'keyword.control.8xp' + }, + { + match: '(For|IS>|DS<|Menu|GraphStyle|GraphColor|OpenLib)(?=\\()', + name: 'keyword.control.8xp' + } + ] + }, + functions: { + patterns: [ + { + match: 'prgm([A-Z]|theta)([0-9A-Z]|theta){0,7}', + name: 'entity.name.function.8xp' + }, + { + match: + '(abs|angle|ANOVA|Asm(Comp)?|augment|bal|binom(c|p)df|checkTmr|(X|chi)\\^2((c|p)df|(GOF)?-Test)|Circle|conj|cos(\\^-1|h(\\^-1)?)?|cumSum|dayOfWk|dbd|det|dim|DS<|(e|10)\\^\\^|>Eff|Equ>String|eval|expr|F(c|p)df|Fill|fM(ax|in)|fnInt|fPart|gcd|geomet(c|p)df|Get|GetCalc|get(Dt|Tm)Str|identity|imag|inString|int|SigmaInt|inv(Binom|Norm|T)|iPart|irr|IS>|lcm|length|Line|DeltaList|List>matr|ln|log(BASE)?|Matr>list|max|mean|median|min|nDeriv|>Nom|normal(c|p)df|npv|Output|piece[wW]ise|Plot[1-3]|poisson(c|p)df|SigmaPrn|prod|[1-2]\\-PropZ(Int|Test)|P(t|xl)\\-(Change|O(ff|n))|pxl\\-Test|P>R[x-y]|rand(Bin|Int(NoRep)?|M|Norm)|real|ref|remainder|round|\\*row(\\+)?|row(\\+|Swap)|rref|R>Pr|R>Ptheta|2\\-SampZ(Int|Test)|Select|Send|seq|set(Date|Time)|set(Dt|Tm)Fmt|Shade((X|chi)\\^2|F|Norm|_t)?|sin(h)?(\\^-1)?|solve|Sort(A|D)|stdDev|String>Equ|su[bm]|summation Sigma|tan(h)?(\\^-1)?|Tangent|t[cp]df|Text(Color)?|timeCnv|toString|variance|Z\\-Test)(?=\\()', + name: 'entity.name.function.8xp' + }, + { + match: + '(Archive|AxesOn|BackgroundOn|BorderColor|ClrList|Disp|Draw(F|Inv)|ExpReg|Fix|FnO(ff|n)|GridDot|GridLine|Horizontal|Input|Lbl|LinReg\\((a\\+bx|ax\\+b)\\)|LinRegT(Int|Test)|LnReg|Logistic|Manual\\-Fit|Med\\-Med| n(C|P)r|Pause|PlotsO(ff|n)|Prompt|PwrReg|Qua(d|rt)Reg|(Recall|Store)(GDB|Pic)|2\\-SampFTest|2\\-SampT(Int|Test)|SetUpEditor|SinReg|TInterval|T\\-Test|UnArchive|(1|2)-Var Stats|Vertical|Wait) ', + name: 'entity.name.function.8xp' + }, + { + match: + 'Asm(84CE?)?Prgm|AxesOff|a\\+bi|BackgroundOff|Boxplot|Clear Entries|ClockO(ff|n)|Clr(AllLists|Draw|Home|Table)|CoordO(ff|n)|CubicReg|>Dec|Degree|DependA(sk|uto)|DetectAsymO(ff|n)|DiagnosticO(ff|n)|DispGraph|DispTable|>DMS|Dot\\-Thi(ck|n)|\\|E|Eng|ExprO(ff|n)|>F<>D|Float|>Frac|Full|Func|GarbageCollect|get(Date|Time)|get(Dt|Tm)Fmt|getKey|GridO(ff|n)|G\\-T|Histogram|Horiz|IndpntAsk|IndpntAuto|isClockOn|\\|L|LabelO(ff|n)|ModBox[pP]lot|>n\\/d<>Un\\/d|Normal|NormProbPlot|Param|Pmt_(Bgn|End)|PolarGC|(>)?Polar|PrintScreen|Radian|rand|re\\^thetai|Real|>Rect|RectGC|Scatter|Sci|Seq(uential)?|SEQ\\(n(\\+[1-2])?\\)|Simul|startTmr|Thi(ck|n)|Time|Trace(?!Step)|tvm_(FV|I%|N|Pmt|PV)|u[vw]Axes|vwAxes|Web|xyLine|Z(Box|Decimal|Frac(1\\/([2-58]|10))|Inte(ger|rval)|Previous|Quadrant1|Square|Standard|Trig)|Zoom( In| Out|Fit|Rcl|Stat|Sto)', + name: 'entity.name.function.8xp' + }, + { + match: '(?:(?<=Goto )|(?<=Lbl ))([0-9A-Z]|theta){1,2}', + name: 'entity.name.function.8xp' + } + ] + }, + headers: {match: '^\\:DCS(6|)$', name: 'entity.name.section.8xp'}, + numbers: {match: '(\\d+\\.?\\d*|\\.\\d+)', name: 'constant.numeric.8xp'}, + operators: { + patterns: [ + { + match: + '(->|\\+|-|\\*|/|\\^|=|!=|>|>=|<|<=|squareroot|xroot|(sqrt|cuberoot)\\()', + name: 'keyword.operator.8xp' + }, + {match: '(cuberoot|sqrt)(?=\\()', name: 'keyword.operator.8xp'}, + { + match: '( (and|or|xor) |not(?=\\())', + name: 'keyword.operator.expression.8xp' + } + ] + }, + reals: {match: '[A-Z]|theta', name: 'variable.parameter.8xp'}, + snippets: {match: '<[a-z ]+>', name: 'variable.other.8xp'}, + 'special-chars': { + match: + '(\\^\\^(r|o|\\-1|2|T|3)|\\|(N|F|[PC]\\/Y)|I%|invertedequal|(square|cross|dot)plot|sharps|small(T|10|[0-9])|(bold)?(up|down)arrow|plotpixel|U?n\\/d|mathprintbox|plottinydot)', + name: 'markup.raw.8xp' + }, + strings: {begin: '"', end: '"|\n|(?=->)', name: 'string.quoted.double.8xp'}, + variables: { + patterns: [ + {match: 'Ans', name: 'variable.language.8xp'}, + { + match: + '\\[(xbar(1|2)?|sigma[xy]|ybar|recursiven|phat(1|2)?|(factor|error)(df|SS|MS))\\]', + name: 'variable.parameter' + }, + { + match: + 'Xmin|Xmax|Xscl|Ymin|Ymax|Yscl|[UV]n-1|Xres|Delta[XY]|XFact|YFact|TraceStep|Tmin|Tmax|Tstep|Z?theta[mM]in|Z?theta[mM]ax|Z?thetastep|\\|[uvw]|((?<=[uvw])\\((nMin\\)))|nMin|nMax|PlotStart|PlotStep', + name: 'variable.parameter.8xp' + }, + { + match: + 'ZXmin|ZXmax|ZXscl|ZYmin|ZYmax|ZYscl|ZXres|ZTmin|ZTmax|ZTstep|thetastep|Z[uvw]|((?<=Z[uvw])\\((n[mM]in\\)))|ZnMin|ZnMax|ZPlotStart|ZPlotStep', + name: 'variable.parameter.8xp' + }, + {match: '(Pic|Image|GDB|Str)[0-9]', name: 'variable.parameter.8xp'}, + { + match: + '\\[(n(1|2)?|i|RegEQ|xhat(1|2)?|yhat|Sigma[xy](\\^2)?|Sx(1|2|p)?|Sy|(min|max)[XY]|Sigmaxy|r(\\^2)?|Med|Q[13]|\\|[Fa-e]|[xy][1-3]|[pstz]|chi\\^2|df|lower|upper|R\\^2|e)\\]', + name: 'variable.parameter.8xp' + }, + {match: 'Tbl(Start|Input)|DeltaTbl', name: 'variable.parameter.8xp'}, + { + match: + 'theta|pi|alpha|beta|gamma|Delta|delta|epsilon|lambda|mu|greek_pi|rho|Sigma|Phi|Omega|phat|chi|sigma|tau', + name: 'variable.parameter.8xp' + }, + {match: '{Y[0-9]}', name: 'variable.parameter.8xp'}, + {match: '{[XY][1-6]T}', name: 'variable.parameter.8xp'}, + {match: '{r[1-6]}', name: 'variable.parameter.8xp'}, + {match: 'L[1-6]', name: 'variable.parameter.8xp'}, + { + match: '((?<=->)|\\|L)([A-Z]|theta)([0-9A-Z]|theta){0,4}', + name: 'variable.parameter.8xp' + }, + {match: '\\[[A-J]\\]', name: 'variable.parameter.8xp'} + ] + } + }, + scopeName: 'source.8xp' +} + +export default grammar diff --git a/lang/source.abl.js b/lang/source.abl.js index 6c43db2..1fdf728 100644 --- a/lang/source.abl.js +++ b/lang/source.abl.js @@ -7,13 +7,263 @@ const grammar = { extensions: ['.w'], names: ['openedge-abl', 'progress', 'openedge', 'abl'], - patterns: [{include: '#procedure-definition'}, {include: '#statements'}], + patterns: [{include: '#statements'}], repository: { + 'abl-functions': { + patterns: [ + {include: '#abl-functions-A'}, + {include: '#abl-functions-B'}, + {include: '#abl-functions-C'}, + {include: '#abl-functions-D'}, + {include: '#abl-functions-E'}, + {include: '#abl-functions-F'}, + {include: '#abl-functions-G'}, + {include: '#abl-functions-H'}, + {include: '#abl-functions-I'}, + {include: '#abl-functions-K'}, + {include: '#abl-functions-L'}, + {include: '#abl-functions-M'}, + {include: '#abl-functions-N'}, + {include: '#abl-functions-O'}, + {include: '#abl-functions-P'}, + {include: '#abl-functions-Q'}, + {include: '#abl-functions-R'}, + {include: '#abl-functions-S'}, + {include: '#abl-functions-T'}, + {include: '#abl-functions-U'}, + {include: '#abl-functions-V'}, + {include: '#abl-functions-W'}, + {include: '#abl-functions-Y'} + ] + }, + 'abl-functions-A': { + begin: + '(?i)\\s*(ABSOLUTE|ACCUM|ADD-INTERVAL|ALIAS|AMBIGUOUS|ASC|AUDIT-ENABLED|AVAILABLE)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-B': { + begin: + '(?i)\\s*(BASE64-DECODE|BASE64-ENCODE|BOX|BUFFER-GROUP-ID|BUFFER-GROUP-NAME|BUFFER-PARTITION-ID|BUFFER-TENANT-ID|BUFFER-TENANT-NAME)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-C': { + begin: + '(?i)\\s*(CAN-DO|CAN-FIND|CAN-QUERY|CAN-SET|CAPS|CAST|CHR|CODEPAGE-CONVERT|COMPARE|CONNECTED|COUNT-OF|CURRENT-CHANGED|CURRENT-LANGUAGE|CURRENT-RESULT-ROW|CURRENT-VALUE)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-D': { + begin: + '(?i)\\s*(DATASERVERS|DATA-SOURCE-MODIFIED|DATE|DATETIME|DATETIME-TZ|DAY|DBCODEPAGE|DBCOLLATION|DBNAME|DBPARAM|DB-REMOTE-HOST|DBRESTRICTIONS|DBTASKID|DBTYPE|DBVERSION|DECIMAL|DECRYPT|DEFINED|DYNAMIC-CAST|DYNAMIC-CURRENT-VALUE|DYNAMIC-ENUM|DYNAMIC-FUNCTION|DYNAMIC-INVOKE|DYNAMIC-NEXT-VALUE|DYNAMIC-PROPERTY)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-E': { + begin: + '(?i)\\s*(ENCODE|ENCRYPT|ENTERED|ENTRY|ERROR|ETIME|EXP|EXTENT)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-F': { + begin: + '(?i)\\s*(FILL|FIRST|FIRST-OF|FRAME-COL|FRAME-DB|FRAME-DOWN|FRAME-FIELD|FRAME-FILE|FRAME-INDEX|FRAME-LINE|FRAME-NAME|FRAME-ROW|FRAME-VALUE)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-G': { + begin: + '(?i)\\s*(GATEWAYS|GENERATE-PBE-KEY|GENERATE-PBE-SALT|GENERATE-RANDOM-KEY|GENERATE-UUID|GET-BITS|GET-BYTE|GET-BYTE-ORDER|GET-BYTES|GET-CLASS|GET-CODEPAGE|GET-CODEPAGES|GET-COLLATION|GET-COLLATIONS|GET-DB-CLIENT|GET-DOUBLE|GET-EFFECTIVE-TENANT-ID|GET-EFFECTIVE-TENANT-NAME|GET-FLOAT|GET-INT64|GET-LONG|GET-POINTER-VALUE|GET-SHORT|GET-SIZE|GET-STRING|GET-UNSIGNED-LONG|GET-UNSIGNED-SHORT|GO-PENDING|GUID)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-H': { + begin: '(?i)\\s*(HANDLE|HASH-CODE|HEX-DECODE|HEX-ENCODE)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-I': { + begin: + '(?i)\\s*(INDEX|INPUT|INT64|INTEGER|INTERVAL|IS-ATTR-SPACE|IS-CODEPAGE-FIXED|IS-COLUMN-CODEPAGE|IS-DB-MULTI-TENANT|IS-LEAD-BYTE|ISO-DATE)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-K': { + begin: + '(?i)\\s*(KBLABEL|KEYCODE|KEYFUNCTION|KEYLABEL|KEYWORD|KEYWORD-ALL)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-L': { + begin: + '(?i)\\s*(LAST|LASTKEY|LAST-OF|LC|LDBNAME|LEFT-TRIM|LENGTH|LIBRARY|LINE-COUNTER|LIST-EVENTS|LIST-QUERY-ATTRS|LIST-SET-ATTRS|LIST-WIDGETS|LOCKED|LOG|LOGICAL|Logical values|LOOKUP)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-M': { + begin: + '(?i)\\s*(MAXIMUM|MD5-DIGEST|MEMBER|MESSAGE-DIGEST|MESSAGE-LINES|MINIMUM|MONTH|MTIME)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-N': { + begin: + '(?i)\\s*(NEXT-VALUE|NORMALIZE|NOT ENTERED|NOW|NUM-ALIASES|NUM-DBS|NUM-ENTRIES|NUM-RESULTS)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-O': { + begin: '(?i)\\s*(OPSYS|OS-DRIVES|OS-ERROR|OS-GETENV)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-P': { + begin: + '(?i)\\s*(PAGE-NUMBER|PAGE-SIZE|PDBNAME|proc-ha|proc-han|proc-hand|proc-handl|proc-handle|PROGRAM-NAME|PROGRESS|PROMSGS|PROPATH|provers|proversi|proversio|proversion)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-Q': { + begin: '(?i)\\s*(QUERY-OFF-END|QUOTER)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-R': { + begin: + '(?i)\\s*(R-INDEX|RANDOM|RAW|RAW-TRANSFER|RECID|RECORD-LENGTH|REJECTED|REPLACE|RETRY|RETURN-VALUE|rgb-v|rgb-va|rgb-val|rgb-valu|rgb-value|RIGHT-TRIM|ROUND|ROW-STATE|ROWID)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-S': { + begin: + '(?i)\\s*(SCREEN-LINES|SDBNAME|SEAL|SEARCH|SEEK|SET-DB-CLIENT|SET-EFFECTIVE-TENANT|set-attribute|set-attribute-node|set-rgb|set-byte-order|set-rgb-|set-rgb-v|set-rgb-va|set-rgb-val|set-rgb-valu|set-rgb-value|setuser|setuseri|setuserid|SHA1-DIGEST|SQRT|SSL-SERVER-NAME|subst|substi|substit|substitu|substitut|substitute|substr|substri|substrin|substring|SUPER)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-T': { + begin: + '(?i)\\s*(TENANT-ID|TENANT-NAME|TENANT-NAME-TO-ID|TERMINAL|TIME|TIMEZONE|TODAY|TO-ROWID|TRANSACTION|TRIM|TRUNCATE|TYPE-OF)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-U': { + begin: '(?i)\\s*(UNBOX|USERID)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-V': { + begin: '(?i)\\s*(VALID-EVENT|VALID-HANDLE|VALID-OBJECT|VALUE)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-W': { + begin: '(?i)\\s*(WEEKDAY|WIDGET-HANDLE)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-functions-Y': { + begin: '(?i)\\s*(YEAR)\\s*(?=\\()', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?=\\))', + name: 'meta.function-call.abl', + patterns: [{include: '#function-arguments'}, {include: '#parens'}] + }, + 'abl-system-handles': { + captures: { + 1: {name: 'variable.language.abl'}, + 2: {name: 'punctuation.terminator.abl'}, + 3: {name: 'meta.brace.round.js'} + }, + match: + '(?i)\\s*(this-object|super|self|this-procedure|target-procedure|source-procedure|session|error-status|compiler|audit-control|audit-policy|clipboard|codebase-locator|color-table|debugger|dslog-manager|file-information|file-info|font-table|last-event|log-manager|profiler|rcode-information|rcode-info|security-policy|session|web-context)(:)?(\\()?\\s*' + }, + 'access-modifier': { + captures: {1: {name: 'keyword.other.abl'}}, + match: + '(?i)\\s*(package-private|private|package-protected|protected|public|static|override|abstract|final)\\s*' + }, 'analyze-suspend-resume': { begin: '(?i)(\\&analyze-suspend|\\&analyze-resume)\\s*', end: '(?=(?://|/\\*))|$', name: 'comment.preprocessor.analyze-suspend.abl' }, + annotation: { + patterns: [ + {include: '#annotation-simple'}, + {include: '#annotation-attributes'} + ] + }, + 'annotation-attributes': { + begin: '(?i)(^|\\s+)(\\@[a-z][a-z0-9#\\$-_%&]*)', + beginCaptures: {2: {name: 'storage.type.annotation.abl'}}, + end: '(?=\\.)', + name: 'meta.declaration.annotation.abl', + patterns: [ + {include: '#parens'}, + { + captures: {1: {name: 'constant.other.key.abl'}}, + match: '(?i)\\s*([a-z][a-z0-9#\\$-_%&]+)(?=[\\=\\s$])' + }, + {include: '#string'}, + {include: '#operator-no-space'}, + {include: '#punctuation-comma'} + ] + }, + 'annotation-simple': { + captures: {2: {name: 'storage.type.annotation.abl'}}, + match: '(?i)(^|\\s*)(\\@[a-z][a-z0-9#\\$-_%&]*)\\s*(?=\\.)', + name: 'meta.declaration.annotation.abl' + }, + 'argument-reference': { + captures: {1: {name: 'support.other.argument.abl'}}, + match: + '\\s*((\\{\\s*\\&[\\.\\w\\/-]+\\})|(\\{\\s*\\d+\\})|(\\{\\s*\\*\\}))\\s*' + }, 'array-literal': { begin: '\\[', beginCaptures: {0: {name: 'meta.brace.square.abl'}}, @@ -22,122 +272,619 @@ const grammar = { name: 'meta.array.literal.abl', patterns: [{include: '#expression'}, {include: '#punctuation-comma'}] }, + 'array-use': { + begin: '\\[', + beginCaptures: {0: {name: 'meta.brace.square.abl'}}, + end: '\\]', + endCaptures: {0: {name: 'meta.brace.square.abl'}}, + name: 'meta.array.literal.abl', + patterns: [{include: '#expression'}, {include: '#punctuation-comma'}] + }, + 'as-type': { + begin: '(?i)\\s*(as)\\s*(class)?', + beginCaptures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'keyword.other.abl'} + }, + end: '\\s*(\\.|\\,|\\s*)', + patterns: [ + {include: '#primitive-type'}, + {include: '#type-name-generic-progress'}, + {include: '#type-name-progress'}, + {include: '#type-name-generic'}, + {include: '#type-name'} + ] + }, + 'attribute-access': {begin: ':', end: '(?=:)|(?=\\s*)'}, + 'block-label': { + captures: {2: {name: 'meta.block.label.abl'}}, + match: '(?i)^\\s*(([a-z][a-z0-9\\-\\_\\$]*):)\\s+' + }, + 'block-statement': { + begin: '(?i)(?)?)', + beginCaptures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'entity.name.type.abl'} + }, + end: '\\s*(:)', + endCaptures: {1: {name: 'punctuation.terminator.abl'}}, + name: 'meta.define.interface.abl', + patterns: [ + { + captures: {1: {name: 'keyword.other.abl'}}, + match: '(?i)\\s*(inherits|implements)\\s*' }, + {include: '#implements-type'}, + {include: '#type-name-comma'} + ] + }, + 'define-like': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'storage.data.table.abl'} + }, + match: '(?i)\\s*(like|like-sequential)\\s+([\\w\\-#$%]+)\\s*' + }, + 'define-property': { + begin: '(?i)\\b(property|prop)\\b', + beginCaptures: {1: {name: 'keyword.other.abl'}}, + end: '(?i)\\s*(no-undo)|(?=private|public|protected|get|set)', + endCaptures: {1: {name: 'keyword.other.abl'}}, + patterns: [ + {include: '#property-as'}, + {include: '#primitive-type'}, + {include: '#extent'}, + {include: '#decimals'}, + {include: '#array-literal'}, + {include: '#timestamp-constant'}, + {include: '#numeric'}, + {include: '#type-name-generic-progress'}, + {include: '#type-name-progress'}, + {include: '#keywords'}, {include: '#string'}, + {include: '#type-name-generic'}, + {include: '#type-name'} + ] + }, + 'define-stream': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {patterns: [{include: '#variable-name'}]} + }, + match: '(?i)\\s*(stream)\\s*([\\w\\-]+)', + name: 'meta.define.stream.abl' + }, + 'define-table': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'storage.data.table.abl'} + }, + match: '(?i)\\b(temp-table|like|before-table)\\s*([\\w\\-#$%]+)\\s*' + }, + 'define-type': { + patterns: [ + {include: '#define-class'}, + {include: '#define-interface'}, + {include: '#define-enum'} + ] + }, + 'define-variable': { + begin: '(?i)\\s*(variable|variabl|variab|varia|vari|var)\\s*', + beginCaptures: {1: {name: 'keyword.other.abl'}}, + end: '(?=\\.)|(?i)\\s*(no-undo)\\s*', + endCaptures: {1: {name: 'keyword.other.abl'}}, + patterns: [ + {include: '#variable-as'}, {include: '#primitive-type'}, + {include: '#extent'}, + {include: '#decimals'}, + {include: '#array-literal'}, + {include: '#timestamp-constant'}, {include: '#numeric'}, - {include: '#constant'}, + {include: '#type-name-generic-progress'}, + {include: '#type-name-progress'}, {include: '#keywords'}, - {include: '#singlelinecomment'}, - {include: '#multilinecomment'} + {include: '#string'}, + {include: '#type-name-generic'}, + {include: '#type-name'} ] }, - 'do-block': { - begin: '(?i)\\b(do)\\b', + 'define-variable-name': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'variable.other.abl'} + }, + match: + '(?i)(var|vari|varia|variab|variabl|variable)\\s+([a-z][a-z0-9#$-_%&])+\\s*' + }, + 'dll-type': { + captures: {1: {name: 'storage.type.abl'}}, + match: + '(?i)\\s*(byte|unsigned-short|short|unsigned-long|long|int64|float)\\s*' + }, + 'double-colon-field-name': { + captures: {1: {name: 'storage.data.table.abl'}}, + match: '\\s*::([\\w\\-#$%]+)\\s*' + }, + doublequotedstring: { + begin: '(")', + beginCaptures: {1: {name: 'punctuation.definition.string.begin.abl'}}, + end: '(")', + endCaptures: {1: {name: 'punctuation.definition.string.end.abl'}}, + name: 'string.double.complex.abl', + patterns: [{match: '~.', name: 'constant.character.escape.abl'}] + }, + 'end-block': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'keyword.other.abl'} + }, + match: + '(?i)\\s*(end)\\s+(CASE|CATCH|CLASS|CONSTRUCTOR|DESTRUCTOR|ENUM|FINALLY|FUNCTION|GET|INTERFACE|METHOD|PROCEDURE|SET|TRIGGERS)\\s*' + }, + 'end-function-procedure-method-block': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'keyword.other.abl'} + }, + match: '(?i)\\s*(end)\\s*(method|procedure|function)?\\s*(?=\\.)\\s*' + }, + expression: { + patterns: [ + {include: '#string'}, + {include: '#timestamp-constant'}, + {include: '#constant'}, + {include: '#numeric'}, + {include: '#variable-name'}, + {include: '#double-colon-field-name'} + ] + }, + extent: { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'constant.numeric.source.abl'} + }, + match: '(?i)\\s*(extent)\\s*((0x[0-9a-f]+)|([0-9]+)?)' + }, + 'field-as-object': { + captures: {1: {name: 'entity.name.type.abl'}}, + match: '(?i)\\s*(progress\\.lang\\.object|object)\\s*' + }, + 'field-name': { + patterns: [ + { + captures: {1: {name: 'storage.data.table.abl'}}, + match: '\\s*([\\w\\-#$%]+(\\.[\\w\\-#$%]+)?\\s*(\\[\\d+\\]))\\s*' + }, + { + captures: {1: {name: 'storage.data.table.abl'}}, + match: '\\s*([\\w\\-#$%]+(\\.[\\w\\-#$%]+)?)\\s*' + } + ] + }, + 'fields-except-list': { + begin: '(?i)\\s*(fields|except)\\s*(\\()', + beginCaptures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'meta.brace.round.js'} + }, + end: '(\\))', + endCaptures: {1: {name: 'meta.brace.round.js'}}, + patterns: [{include: '#db-dot-table-dot-field'}, {include: '#field-name'}] + }, + 'find-record': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'keyword.other.abl'}, + 3: {name: 'storage.data.table.abl'} + }, + match: + '(?i)\\s*(find)\\s+(first|last|next|prev|current)?\\s*([\\w\\-#$%]+)\\s*' + }, + 'for-each-join': { + begin: + '(?i)(?<=,)\\s*((each|first|last)|([\\w\\-#$%]+(\\.[\\w\\-#$%]+)?))\\s*', + beginCaptures: { + 2: {name: 'keyword.other.abl'}, + 3: {name: 'storage.data.table.abl'} + }, + end: '(?i)\\s*(?=where|no-lock|share-lock|exclusive-lock|tenant-where|use-index|table-scan|using|no-prefetch|left|outer-join|break|by|transaction,|:)\\s*', + patterns: [ + {include: '#fields-except-list'}, + {include: '#of-phrase'}, + { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'storage.data.table.abl'} + }, + match: '(?i)\\s*(of)\\s+([\\w\\-#$%]+(\\.[\\w\\-#$%]+)?)\\s*' + }, + { + captures: {1: {name: 'storage.data.table.abl'}}, + match: '\\s*([\\w\\-#$%]+(\\.[\\w\\-#$%]+)?)\\s*' + } + ] + }, + 'for-each-table': { beginCaptures: {1: {name: 'keyword.other.abl'}}, - end: '(?=\\.)', - name: 'meta.do.abl', + end: '(?i)\\s*(?=where|no-lock|share-lock|exclusive-lock|tenant-where|use-index|table-scan|using|no-prefetch|left|outer-join|break|by|transaction|,|:)\\s*', + patterns: [ + { + captures: {1: {name: 'keyword.other.abl'}}, + match: '(?i)\\s*(each|first|last|of)\\s*' + }, + {include: '#fields-except-list'}, + {include: '#of-phrase'}, + {include: '#field-name'}, + {include: '#db-dot-table'}, + {include: '#db-dot-table-dot-field'} + ] + }, + 'for-join': { + captures: { + 2: {name: 'storage.data.table.abl'}, + 4: {name: 'keyword.other.abl'} + }, + match: '(?i)(^|,)\\s*([\\w\\-#$%]+(\\.[\\w\\-#$%]+)?)\\s+(where)\\s*' + }, + 'for-record': { + captures: { + 1: {name: 'keyword.other.abl'}, + 10: {name: 'storage.data.table.abl'}, + 11: {name: 'separator.comma.abl'}, + 12: {name: 'storage.data.table.abl'}, + 2: {name: 'storage.data.table.abl'}, + 3: {name: 'separator.comma.abl'}, + 4: {name: 'storage.data.table.abl'}, + 5: {name: 'separator.comma.abl'}, + 6: {name: 'storage.data.table.abl'}, + 7: {name: 'separator.comma.abl'}, + 8: {name: 'storage.data.table.abl'}, + 9: {name: 'separator.comma.abl'} + }, + match: + '(?i)\\s*(for)\\s+([\\w\\-#$%]*)\\s*(,)?\\s*([\\w\\-#$%]*)?\\s*(,)?\\s*([\\w\\-#$%]*)?\\s*(,)?\\s*([\\w\\-#$%]*)?\\s*(,)?\\s*([\\w\\-#$%]*)?\\s*(,)?\\s*([\\w\\-#$%]*)?' + }, + 'for-table': { + captures: { + 1: {name: 'keyword.other.abl'}, + 3: {name: 'keyword.other.abl'}, + 4: {name: 'storage.data.table.abl'} + }, + match: '(?i)\\s*(for)\\s+((temp-table)\\s+)?([\\w\\-#$%]+)\\s*' + }, + 'format-constant': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'constant.language.source.abl'} + }, + match: '(?i)\\b(format)\\s+(9+\\/9+\\/9+)\\b' + }, + 'from-to-by': { + begin: '\\s*([\\w\\$\\-\\_\\%\\&]+)\\s+(=)\\s*', + beginCaptures: { + 1: {name: 'variable.other.abl'}, + 2: {name: 'keyword.operator.source.abl'} + }, + end: '(?=\\R)', + patterns: [ + {match: '(?i)\\s+(to|by)\\s*', name: 'keyword.other'}, + {include: '#numeric'}, + {include: '#branch-options'} + ] + }, + 'function-arguments': { + begin: '(?=\\()', + beginCaptures: {1: {name: 'meta.brace.round.js'}}, + end: '(?=\\))', + endCaptures: {1: {name: 'meta.brace.round.js'}}, + name: 'meta.function.arguments.abl', patterns: [ - { - begin: '(?i)\\b(while)\\b', - beginCaptures: {1: {name: 'keyword.other.abl'}}, - end: '(?=(?::))', - name: 'meta.do.while.abl', - patterns: [{include: '#statements'}] - }, - {include: '#statements'}, - { - begin: ':', - end: '(?i)(end\\s*do|end)', - endCaptures: {1: {name: 'keyword.other.abl'}}, - name: 'meta.do.body.abl', - patterns: [{include: '#code-block'}] - } + {include: '#parens'}, + {include: '#constant'}, + {include: '#type-reference'}, + {include: '#expression'}, + {include: '#property-call'}, + {include: '#punctuation-comma'}, + {include: '#static-object-property-call'}, + {include: '#function-call'} ] }, - doublequotedstring: { - begin: '"', - beginCaptures: {0: {name: 'punctuation.definition.string.begin.abl'}}, - end: '"', - endCaptures: {0: {name: 'punctuation.definition.string.end.abl'}}, - name: 'string.double.complex.abl', - patterns: [{match: '~.', name: 'constant.character.escape.abl'}] + 'function-parameter-definition': { + begin: '(\\()', + beginCaptures: {1: {name: 'meta.brace.round.js'}}, + end: '(\\))', + endCaptures: {1: {name: 'meta.brace.round.js'}}, + name: 'meta.function.parameters', + patterns: [{include: '#parameter-definition'}] }, - expression: { + 'generic-types': { patterns: [ - {include: '#string'}, - {include: '#constant'}, - {include: '#numeric'}, - {include: '#variable-name'} + {include: '#type-name-comma-progress'}, + {include: '#type-name-comma'}, + {include: '#type-name-generic-progress'}, + {include: '#type-name-progress'}, + {include: '#type-name-generic'}, + {include: '#type-name'} ] }, - 'function-call': { - begin: '([\\w-]+)\\s*(\\()', + 'get-class': { + begin: '(?i)\\s*(get-class)\\s*(\\()', beginCaptures: { 1: {name: 'entity.name.function.abl'}, 2: {name: 'meta.brace.round.js'} @@ -145,7 +892,7 @@ const grammar = { end: '(\\))', endCaptures: {1: {name: 'meta.brace.round.js'}}, name: 'meta.function-call.abl', - patterns: [{include: '#expression'}, {include: '#punctuation-comma'}] + patterns: [{include: '#string'}, {include: '#type-names'}] }, 'global-scoped-define': { begin: '(?i)(\\&scoped-define|\\&global-define)\\s*([\\.\\w\\\\/-]*)\\s*', @@ -157,25 +904,204 @@ const grammar = { name: 'meta.preprocessor.define.abl', patterns: [{include: '#string'}] }, + 'handle-attributes': { + patterns: [ + {include: '#handle-attributes-A'}, + {include: '#handle-attributes-B'}, + {include: '#handle-attributes-C'}, + {include: '#handle-attributes-D'}, + {include: '#handle-attributes-E'}, + {include: '#handle-attributes-F'}, + {include: '#handle-attributes-G'}, + {include: '#handle-attributes-H'}, + {include: '#handle-attributes-I'}, + {include: '#handle-attributes-K'}, + {include: '#handle-attributes-L'}, + {include: '#handle-attributes-M'}, + {include: '#handle-attributes-N'}, + {include: '#handle-attributes-O'}, + {include: '#handle-attributes-P'}, + {include: '#handle-attributes-Q'}, + {include: '#handle-attributes-R'}, + {include: '#handle-attributes-S'}, + {include: '#handle-attributes-T'}, + {include: '#handle-attributes-U'}, + {include: '#handle-attributes-V'}, + {include: '#handle-attributes-W'}, + {include: '#handle-attributes-X'}, + {include: '#handle-attributes-Y'} + ] + }, + 'handle-attributes-A': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(ACCELERATOR|ACCEPT-CHANGES|ACCEPT-ROW-CHANGES|ACTIVE|ACTOR|ADD-BUFFER|add-calc-col|add-calc-colu|add-calc-colum|add-calc-column|ADD-COLUMNS-FROM|add-events-proc|add-events-proce|add-events-proced|add-events-procedu|add-events-procedur|add-events-procedure|ADD-FIELDS-FROM|ADD-FIRST|ADD-HEADER-ENTRY|ADD-INDEX-FIELD|ADD-LAST|add-like-col|add-like-colu|add-like-colum|add-like-column|ADD-LIKE-FIELD|ADD-LIKE-INDEX|ADD-NEW-FIELD|ADD-NEW-INDEX|ADD-PARENT-ID-RELATION|add-rel|add-rela|add-relat|add-relati|add-relatio|add-relation|ADD-SCHEMA-LOCATION|ADD-SOURCE-BUFFER|add-super-proc|add-super-proce|add-super-proced|add-super-procedu|add-super-procedur|add-super-procedure|ADM-DATA|AFTER-BUFFER|AFTER-ROWID|AFTER-TABLE|ALLOW-COLUMN-SEARCHING|ALLOW-PREV-DESERIALIZATION|ALWAYS-ON-TOP|ambig|ambigu|ambiguo|ambiguou|ambiguous|APPEND-CHILD|appl-alert|appl-alert-|appl-alert-b|appl-alert-bo|appl-alert-box|appl-alert-boxe|appl-alert-boxes|APPL-CONTEXT-ID|APPLY-CALLBACK|APPSERVER-INFO|APPSERVER-PASSWORD|APPSERVER-USERID|ASYNCHRONOUS|ASYNC-REQUEST-COUNT|ASYNC-REQUEST-HANDLE|ATTACH-DATA-SOURCE|ATTACHED-PAIRLIST|ATTRIBUTE-NAMES|attr|attr-|attr-s|attr-sp|attr-spa|attr-spac|attr-space|AUDIT-EVENT-CONTEXT|AUTHENTICATION-FAILED|auto-comp|auto-compl|auto-comple|auto-complet|auto-completi|auto-completio|auto-completion|AUTO-DELETE|AUTO-DELETE-XML|auto-end-key|auto-endkey|AUTO-GO|auto-ind|auto-inde|auto-inden|auto-indent|AUTO-RESIZE|auto-ret|auto-retu|auto-retur|auto-return|AUTO-SYNCHRONIZE|auto-val|auto-vali|auto-valid|auto-valida|auto-validat|auto-validate|auto-z|auto-za|auto-zap|avail|availa|availab|availabl|available|AVAILABLE-FORMATS)\\s*' + }, + 'handle-attributes-B': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(back|back-tab|backg|backgr|backgro|backgrou|backgroun|background|BASE-ADE|BASIC-LOGGING|BATCH-MODE|BATCH-SIZE|BEFORE-BUFFER|BEFORE-ROWID|BEFORE-TABLE|BEGIN-EVENT-GROUP|bgc|bgco|bgcol|bgcolo|bgcolor|BLANK|BLOCK-ITERATION-DISPLAY|border-b|border-bo|border-bot|border-bott|border-botto|border-bottom|border-bottom-c|border-bottom-ch|border-bottom-cha|border-bottom-char|border-bottom-chars|border-bottom-p|border-bottom-pi|border-bottom-pix|border-bottom-pixe|border-bottom-pixel|border-bottom-pixels|border-l|border-le|border-lef|border-left|border-left-c|border-left-ch|border-left-cha|border-left-char|border-left-chars|border-left-p|border-left-pi|border-left-pix|border-left-pixe|border-left-pixel|border-left-pixels|border-r|border-ri|border-rig|border-righ|border-right|border-right-c|border-right-ch|border-right-cha|border-right-char|border-right-chars|border-right-p|border-right-pi|border-right-pix|border-right-pixe|border-right-pixel|border-right-pixels|border-t|border-to|border-top|border-top-c|border-top-ch|border-top-cha|border-top-char|border-top-chars|border-top-p|border-top-pi|border-top-pix|border-top-pixe|border-top-pixel|border-top-pixels|BOX|BOX-SELECTABLE|BUFFER-CHARS|buffer-comp|buffer-compa|buffer-compar|buffer-compare|BUFFER-COPY|BUFFER-CREATE|BUFFER-DELETE|BUFFER-FIELD|BUFFER-FIELD|BUFFER-GROUP-ID|BUFFER-GROUP-NAME|BUFFER-HANDLE|BUFFER-LINES|buffer-n|buffer-na|buffer-nam|buffer-name|BUFFER-PARTITION-ID|buffer-releas|buffer-release|BUFFER-TENANT-ID|BUFFER-TENANT-NAME|BUFFER-VALIDATE|BUFFER-VALUE|BYTES-READ|BYTES-WRITTEN)\\s*' + }, + 'handle-attributes-C': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(CACHE|CALL-NAME|CALL-TYPE|CANCEL-BREAK|CANCEL-BUTTON|CANCEL-REQUESTS|CANCEL-REQUESTS-AFTER|CANCELLED|can-crea|can-creat|can-create|can-dele|can-delet|can-delete|CAN-DO-DOMAIN-SUPPORT|CAN-READ|CAN-WRITE|CAREFUL-PAINT|case-sen|case-sens|case-sensi|case-sensit|case-sensiti|case-sensitiv|case-sensitive|center|centere|centered|CHARSET|CHECKED|CHILD-BUFFER|CHILD-NUM|CLASS-TYPE|CLEAR|CLEAR-APPL-CONTEXT|CLEAR-LOG|clear-select|clear-selecti|clear-selectio|clear-selection|clear-sort-arrow|clear-sort-arrows|CLIENT-CONNECTION-ID|CLIENT-TTY|CLIENT-TYPE|CLIENT-WORKSTATION|CLONE-NODE|CLOSE-LOG|CODE|CODEPAGE|COLUMN|column-bgc|column-bgco|column-bgcol|column-bgcolo|column-bgcolor|COLUMN-DCOLOR|column-fgc|column-fgco|column-fgcol|column-fgcolo|column-fgcolor|COLUMN-FONT|column-lab|column-labe|column-label|COLUMN-MOVABLE|column-pfc|column-pfco|column-pfcol|column-pfcolo|column-pfcolor|COLUMN-READ-ONLY|COLUMN-RESIZABLE|column-sc|column-scr|column-scro|column-scrol|column-scroll|column-scrolli|column-scrollin|column-scrolling|COM-HANDLE|COMPLETE|CONFIG-NAME|CONNECT|CONNECTED|CONTEXT-HELP|CONTEXT-HELP-FILE|CONTEXT-HELP-ID|CONTROL-BOX|convert-3d|convert-3d-|convert-3d-c|convert-3d-co|convert-3d-col|convert-3d-colo|convert-3d-color|convert-3d-colors|convert-to-offs|convert-to-offse|convert-to-offset|COPY-DATASET|COPY-SAX-ATTRIBUTES|COPY-TEMP-TABLE|COVERAGE|CPCASE|CPCOLL|cpint|cpinte|cpinter|cpintern|cpinterna|cpinternal|CPLOG|CPPRINT|CPRCODEIN|CPRCODEOUT|CPSTREAM|CPTERM|crc-val|crc-valu|crc-value|CREATE-LIKE|CREATE-LIKE-SEQUENTIAL|CREATE-NODE|CREATE-NODE-NAMESPACE|CREATE-RESULT-LIST-ENTRY|CURRENT-CHANGED|CURRENT-COLUMN|current-env|current-envi|current-envir|current-enviro|current-environ|current-environm|current-environme|current-environmen|current-environment|CURRENT-ITERATION|CURRENT-QUERY|CURRENT-REQUEST-INFO|CURRENT-RESPONSE-INFO|CURRENT-RESULT-ROW|CURRENT-ROW-MODIFIED|CURRENT-WINDOW|curs|curso|cursor|cursor-char|CURSOR-LINE|CURSOR-OFFSET)\\s*' + }, + 'handle-attributes-D': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(data-entry-ret|data-entry-retu|data-entry-retur|data-entry-return|DATA-SOURCE|DATA-SOURCE-COMPLETE-MAP|DATA-SOURCE-MODIFIED|DATA-SOURCE-ROWID|data-t|data-ty|data-typ|data-type|DATASET|date-f|date-fo|date-for|date-form|date-forma|date-format|DB-CONTEXT|DB-LIST|DB-REFERENCES|DBNAME|DCOLOR|DDE-ERROR|dde-i|dde-id|DDE-ITEM|DDE-NAME|DDE-TOPIC|DEBLANK|debu|debug|debug-alert|dec|deci|decim|decima|decimal|decimals|DECLARE-NAMESPACE|DEFAULT|DEFAULT-BUFFER-HANDLE|default-but|default-butt|default-butto|default-button|DEFAULT-COMMIT|DEFAULT-STRING|DEFAULT-VALUE|DELETE|DELETE-CHAR|DELETE-CURRENT-ROW|DELETE-HEADER-ENTRY|DELETE-LINE|DELETE-NODE|DELETE-RESULT-LIST-ENTRY|DELETE-SELECTED-ROW|DELETE-SELECTED-ROWS|DELIMITER|descript|descripti|descriptio|description|DESELECT-FOCUSED-ROW|DESELECT-ROWS|DESELECT-SELECTED-ROW|DETACH-DATA-SOURCE|dir|directory|DISABLE|DISABLE-AUTO-ZAP|DISABLE-CONNECTIONS|DISABLE-DUMP-TRIGGERS|DISABLE-LOAD-TRIGGERS|discon|disconn|disconne|disconnec|disconnect|DISPLAY-MESSAGE|display-t|display-timezone|display-ty|display-typ|display-typess|DOMAIN-DESCRIPTION|DOMAIN-NAME|DOMAIN-TYPE|DOWN|DRAG-ENABLED|DROP-TARGET|DUMP-LOGGING-NOW|DYNAMIC)\\s*' + }, + 'handle-attributes-E': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(edge-c|edge-ch|edge-cha|edge-char|edge-chars|edge-p|edge-pi|edge-pix|edge-pixe|edge-pixel|edge-pixels|EDIT-CAN-PASTE|EDIT-CAN-UNDO|EDIT-CLEAR|EDIT-COPY|EDIT-CUT|EDIT-PASTE|EDIT-UNDO|EMPTY|EMPTY-DATASET|EMPTY-TEMP-TABLE|ENABLE|ENABLE-CONNECTIONS|ENABLE-EVENTS|ENABLED|ENCODE-DOMAIN-ACCESS-CODE|ENCODING|ENCRYPT-AUDIT-MAC-KEY|ENCRYPTION-SALT|END-DOCUMENT|END-ELEMENT|END-EVENT-GROUP|END-FILE-DROP|END-USER-PROMPT|ENTITY-EXPANSION-LIMIT|ENTRY|ENTRY-TYPES-LIST|ERROR|error-col|error-colu|error-colum|error-columnsss|ERROR-OBJECT|ERROR-OBJECT-DETAIL|ERROR-ROW|ERROR-STACK-TRACE|ERROR-STRING|EVENT-GROUP-ID|EVENT-HANDLER|EVENT-HANDLER-OBJECT|EVENT-PROCEDURE|EVENT-PROCEDURE-CONTEXT|event-ty|event-typ|event-type|EXCLUSIVE-ID|EXECUTION-LOG|EXIT-CODE|EXPAND|EXPANDABLE|EXPORT|EXPORT-PRINCIPAL|EXTENT)\\s*' + }, + 'handle-attributes-F': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(FETCH-SELECTED-ROW|FGCOfgc|fgco|fgcol|fgcolo|fgcolorLOR|file-create-d|file-create-da|file-create-dat|file-create-date|file-create-t|file-create-ti|file-create-tim|file-create-time|file-mod-d|file-mod-da|file-mod-dat|file-mod-date|file-mod-t|file-mod-ti|file-mod-tim|file-mod-time|FILE-NAME|file-off|file-offs|file-offse|file-offset|FILE-SIZE|FILE-TYPE|FILL|FILLED|FILL-MODE|FILL-WHERE-STRING|FIND-BY-ROWID|FIND-CURRENT|FIND-FIRST|FIND-LAST|FIND-UNIQUE|first-async|first-async-|first-async-r|first-async-re|first-async-req|first-async-requ|first-async-reque|first-async-reques|first-async-request|FIRST-BUFFER|FIRST-CHILD|FIRST-COLUMN|FIRST-DATASET|FIRST-DATA-SOURCE|FIRST-FORM|FIRST-OBJECT|FIRST-OF|first-proc|first-proce|first-proced|first-procedu|first-procedur|first-procedure|FIRST-QUERY|first-serv|first-serve|first-server|first-server-socket|FIRST-SOCKET|first-tab-i|first-tab-it|first-tab-ite|first-tab-item|FIT-LAST-COLUMN|FLAT-BUTTON|FOCUSED-ROW|FOCUSED-ROW-SELECTED|FONT|fore|foreg|foregr|foregro|foregrou|foregroun|foreground|FOREIGN-KEY-HIDDEN|FORM-INPUT|FORM-LONG-INPUT|forma|format|formatte|formatted|FORWARD-ONLY|fragmen|fragment|fram|frame|FRAME-COL|FRAME-NAME|FRAME-ROW|frame-spa|frame-spac|frame-spaci|frame-spacin|frame-spacing|FRAME-X|FRAME-Y|FREQUENCY|full-height|full-height-c|full-height-ch|full-height-cha|full-height-char|full-height-chars|full-height-p|full-height-pi|full-height-pix|full-height-pixe|full-height-pixel|full-height-pixels|full-pathn|full-pathna|full-pathnam|full-pathname|full-width-|full-width-c|full-width-ch|full-width-cha|full-width-char|full-width-chars|full-width-p|full-width-pi|full-width-pix|full-width-pixe|full-width-pixel|full-width-pixels|FUNCTION)\\s*' + }, + 'handle-attributes-G': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(GET-ATTRIBUTE|GET-ATTRIBUTE-NODE|GET-BINARY-DATA|get-blue|get-blue-|get-blue-v|get-blue-va|get-blue-val|get-blue-valu|get-blue-value|get-browse-col|get-browse-colu|get-browse-colum|get-browse-column|GET-BUFFER-HANDLE|GET-BYTES-AVAILABLE|GET-CALLBACK-PROC-CONTEXT|GET-CALLBACK-PROC-NAME|GET-CGI-LIST|GET-CGI-VALUE|GET-CGI-LONG-VALUE|GET-CHANGES|GET-CHILD|get-child-rel|get-child-rela|get-child-relat|get-child-relati|get-child-relatio|get-child-relation|GET-CLIENT|GET-COLUMN|GET-CONFIG-VALUE|get-curr|get-curre|get-curren|get-current|GET-DATASET-BUFFER|GET-DOCUMENT-ELEMENT|GET-DROPPED-FILE|GET-DYNAMIC|GET-ERROR-COLUMN|GET-ERROR-ROW|GET-FILE-NAME|get-file-offse|get-file-offset|get-firs|get-first|get-green|get-green-|get-green-v|get-green-va|get-green-val|get-green-valu|get-green-value|get-header-entr|get-header-entry|GET-INDEX-BY-NAMESPACE-NAME|GET-INDEX-BY-QNAME|GET-ITERATION|GET-LAST|GET-LOCALNAME-BY-INDEX|GET-MESSAGE|GET-MESSAGE-TYPE|GET-NEXT|GET-NODE|GET-NUMBER|GET-PARENT|GET-PREV|GET-PRINTERS|GET-QNAME-BY-INDEX|get-red|get-red-|get-red-v|get-red-va|get-red-val|get-red-valu|get-red-value|get-rel|get-rela|get-relat|get-relati|get-relatio|get-relation|GET-REPOSITIONED-ROW|get-rgb|get-rgb-|get-rgb-v|get-rgb-va|get-rgb-val|get-rgb-valu|get-rgb-values|GET-ROW|GET-SAFE-USER|get-selected|get-selected-|get-selected-w|get-selected-wi|get-selected-wid|get-selected-widg|get-selected-widge|get-selected-widget|GET-SERIALIZED|GET-SIGNATURE|GET-SOCKET-OPTION|GET-SOURCE-BUFFER|GET-TAB-ITEM|get-text-height|get-text-height-c|get-text-height-ch|get-text-height-cha|get-text-height-char|get-text-height-chars|get-text-height-p|get-text-height-pi|get-text-height-pix|get-text-height-pixe|get-text-height-pixel|get-text-height-pixels|get-text-width|get-text-width-c|get-text-width-ch|get-text-width-cha|get-text-width-char|get-text-width-chars|get-text-width-p|get-text-width-pi|get-text-width-pix|get-text-width-pixe|get-text-width-pixel|get-text-width-pixels|GET-TOP-BUFFER|GET-TYPE-BY-INDEX|GET-TYPE-BY-NAMESPACE-NAME|GET-TYPE-BY-QNAME|GET-URI-BY-INDEX|GET-VALUE-BY-INDEX|GET-VALUE-BY-NAMESPACE-NAME|GET-VALUE-BY-QNAME|get-wait|get-wait-|get-wait-s|get-wait-st|get-wait-sta|get-wait-stat|get-wait-state|graphic-e|graphic-ed|graphic-edg|graphic-edge|grid-factor-h|grid-factor-ho|grid-factor-hor|grid-factor-hori|grid-factor-horiz|grid-factor-horizo|grid-factor-horizon|grid-factor-horizont|grid-factor-horizonta|grid-factor-horizontal|grid-factor-v|grid-factor-ve|grid-factor-ver|grid-factor-vert|grid-factor-verti|grid-factor-vertic|grid-factor-vertica|grid-factor-vertical|GRID-SNAP|grid-unit-height|grid-unit-height-c|grid-unit-height-ch|grid-unit-height-cha|grid-unit-height-char|grid-unit-height-chars|grid-unit-height-p|grid-unit-height-pi|grid-unit-height-pix|grid-unit-height-pixe|grid-unit-height-pixel|grid-unit-height-pixels|grid-unit-width|grid-unit-width-c|grid-unit-width-ch|grid-unit-width-cha|grid-unit-width-char|grid-unit-width-chars|grid-unit-width-p|grid-unit-width-pi|grid-unit-width-pix|grid-unit-width-pixe|grid-unit-width-pixel|grid-unit-width-pixels|GRID-VISIBLE|GROUP-BOX)\\s*' + }, + 'handle-attributes-H': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(HANDLE|HANDLER|HAS-LOBS|HAS-RECORDS|height|height-c|height-ch|height-cha|height-char|height-chars|height-p|height-pi|height-pix|height-pixe|height-pixel|height-pixels|HELP|HIDDEN|horizo|horizon|horizont|horizonta|horizontal|HTML-CHARSET|HTML-END-OF-LINE|HTML-END-OF-PAGE|HTML-FRAME-BEGIN|HTML-FRAME-END|HTML-HEADER-BEGIN|HTML-HEADER-END|HTML-TITLE-BEGIN|HTML-TITLE-END|HWND)\\s*' + }, + 'handle-attributes-I': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(icfparam|icfparame|icfparamet|icfparamete|icfparameter|ICON|ignore-current-mod|ignore-current-modi|ignore-current-modif|ignore-current-modifi|ignore-current-modifie|ignore-current-modified|IMAGE|IMAGE-DOWN|IMAGE-INSENSITIVE|IMAGE-UP|IMMEDIATE-DISPLAY|IMPORT-NODE|IMPORT-PRINCIPAL|INCREMENT-EXCLUSIVE-ID|INDEX|index-info|index-infor|index-inform|index-informa|index-informat|index-informati|index-informatio|index-information|IN-HANDLE|inherit-bgc|inherit-bgco|inherit-bgcol|inherit-bgcolo|inherit-bgcolor|inherit-fgc|inherit-fgco|inherit-fgcol|inherit-fgcolo|inherit-fgcolor|init|initial|INITIALIZE|INITIALIZE-DOCUMENT-TYPE|INITIATE|INNER-CHARS|INNER-LINES|INPUT-VALUE|INSERT|INSERT-ATTRIBUTE|insert-b|insert-ba|insert-bac|insert-back|insert-backt|insert-backta|insert-backtab|INSERT-BEFORE|INSERT-FILE|INSERT-ROW|INSERT-STRING|insert-t|insert-ta|insert-tab|INSTANTIATING-PROCEDURE|INTERNAL-ENTRIES|INVOKE|IS-CLASS|IS-JSON|IS-MULTI-TENANT|IS-OPEN|IS-PARAMETER-SET|is-partitione|is-partitioned|IS-ROW-SELECTED|IS-SELECTED|IS-XML|ITEMS-PER-ROW)\\s*' + }, + 'handle-attributes-K': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(KEEP-CONNECTION-OPEN|keep-frame-z|keep-frame-z-|keep-frame-z-o|keep-frame-z-or|keep-frame-z-ord|keep-frame-z-orde|keep-frame-z-order|KEEP-SECURITY-CACHE|KEY|KEYS)\\s*' + }, + 'handle-attributes-L': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(LABEL|label-bgc|label-bgco|label-bgcol|label-bgcolo|label-bgcolor|label-dc|label-dco|label-dcol|label-dcolo|label-dcolor|label-fgc|label-fgco|label-fgcol|label-fgcolo|label-fgcolor|LABEL-FONT|LABELS|LABELS-HAVE-COLONS|language|languages|LARGE|LARGE-TO-SMALL|last-async|last-async-|last-async-r|last-async-re|last-async-req|last-async-requ|last-async-reque|last-async-reques|last-async-request|LAST-BATCH|LAST-CHILD|last-even|last-event|LAST-FORM|LAST-OBJECT|LAST-OF|last-proce|last-proced|last-procedu|last-procedur|last-procedure|last-serv|last-serve|last-server|last-server-socket|LAST-SOCKET|last-tab-i|last-tab-it|last-tab-ite|last-tab-item|LENGTH|LIBRARY|LIBRARY-CALLING-CONVENTION|LINE|LIST-ITEM-PAIRS|LIST-ITEMS|LISTINGS|LITERAL-QUESTION|LOAD|LOAD-DOMAINS|LOAD-ICON|LOAD-IMAGE|LOAD-IMAGE-DOWN|LOAD-IMAGE-INSENSITIVE|LOAD-IMAGE-UP|load-mouse-p|load-mouse-po|load-mouse-poi|load-mouse-poin|load-mouse-point|load-mouse-pointe|load-mouse-pointer|LOAD-SMALL-ICON|LOCAL-HOST|LOCAL-NAME|LOCAL-PORT|LOCAL-VERSION-INFO|LOCATOR-COLUMN-NUMBER|LOCATOR-LINE-NUMBER|LOCATOR-PUBLIC-ID|LOCATOR-SYSTEM-ID|LOCATOR-TYPE|LOCKED|LOCK-REGISTRATION|LOG-AUDIT-EVENT|LOG-ENTRY-TYPES|LOG-THRESHOLD|LOGFILE-NAME|LOGGING-LEVEL|LOGIN-EXPIRATION-TIMESTAMP|LOGIN-HOST|LOGIN-STATE|LOGOUT|LONGCHAR-TO-NODE-VALUE|LOOKUP)\\s*' + }, + 'handle-attributes-M': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(MANDATORY|MANUAL-HIGHLIGHT|MARK-NEW|MARK-ROW-STATE|MAX-BUTTON|MAX-CHARS|MAX-DATA-GUESS|max-height|max-height-c|max-height-ch|max-height-cha|max-height-char|max-height-chars|max-height-p|max-height-pi|max-height-pix|max-height-pixe|max-height-pixel|max-height-pixels|MAXIMUM-LEVEL|max-val|max-valu|max-value|max-width|max-width-c|max-width-ch|max-width-cha|max-width-char|max-width-chars|max-width-p|max-width-pi|max-width-pix|max-width-pixe|max-width-pixel|max-width-pixels|MEMPTR-TO-NODE-VALUE|MENU-BAR|menu-k|menu-ke|menu-key|menu-m|menu-mo|menu-mou|menu-mous|menu-mouse|MERGE-BY-FIELD|MERGE-CHANGES|MERGE-ROW-CHANGES|MESSAGE-AREA|MESSAGE-AREA-FONT|MIN-BUTTON|min-column-width-c|min-column-width-ch|min-column-width-cha|min-column-width-char|min-column-width-chars|min-column-width-p|min-column-width-pi|min-column-width-pix|min-column-width-pixe|min-column-width-pixel|min-column-width-pixels|min-height|min-height-c|min-height-ch|min-height-cha|min-height-char|min-height-chars|min-height-p|min-height-pi|min-height-pix|min-height-pixe|min-height-pixel|min-height-pixels|min-schema-marshal|min-schema-marshall|min-val|min-valu|min-value|min-width|min-width-c|min-width-ch|min-width-cha|min-width-char|min-width-chars|min-width-p|min-width-pi|min-width-pix|min-width-pixe|min-width-pixel|min-width-pixels|mod|modified|mouse|mouse-p|mouse-po|mouse-poi|mouse-poin|mouse-point|mouse-pointe|mouse-pointer|MOVABLE|move|move-after|move-after-|move-after-t|move-after-ta|move-after-tab|move-after-tab-|move-after-tab-i|move-after-tab-it|move-after-tab-ite|move-after-tab-item|move-befor|move-before|move-before-|move-before-t|move-before-ta|move-before-tab|move-before-tab-|move-before-tab-i|move-before-tab-it|move-before-tab-ite|move-before-tab-item|move-col|move-colu|move-colum|move-column|move-to-b|move-to-bo|move-to-bot|move-to-bott|move-to-botto|move-to-bottom|move-to-eof|move-to-t|move-to-to|move-to-top|MULTI-COMPILE|MULTIPLE|MULTITASKING-INTERVAL|MUST-UNDERSTAND)\\s*' + }, + 'handle-attributes-N': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(NAME|NAMESPACE-PREFIX|NAMESPACE-URI|NEEDS-APPSERVER-PROMPT|NEEDS-PROMPT|NESTED|NEW|NEW-ROW|next-col|next-colu|next-colum|next-column|NEXT-ROWID|NEXT-SIBLING|next-tab-ite|next-tab-item|NO-CURRENT-VALUE|NO-EMPTY-SPACE|NO-FOCUS|NONAMESPACE-SCHEMA-LOCATION|no-schema-marshal|no-schema-marshall|no-val|no-vali|no-valid|no-valida|no-validat|no-validate|NODE-VALUE|NODE-VALUE-TO-LONGCHAR|NODE-VALUE-TO-MEMPTR|NORMALIZE|NUM-BUFFERS|num-but|num-butt|num-butto|num-button|num-buttons|NUM-CHILD-RELATIONS|NUM-CHILDREN|num-col|num-colu|num-colum|num-column|num-columns|NUM-DROPPED-FILES|NUM-ENTRIES|NUM-FIELDS|NUM-FORMATS|NUM-HEADER-ENTRIES|NUM-ITEMS|NUM-ITERATIONS|NUM-LINES|num-locked-col|num-locked-colu|num-locked-colum|num-locked-column|num-locked-columns|NUM-LOG-FILES|NUM-MESSAGES|NUM-PARAMETERS|NUM-REFERENCES|NUM-RELATIONS|num-repl|num-repla|num-replac|num-replace|num-replaced|NUM-RESULTS|num-selected|num-selected-rows|NUM-SELECTED-WIDGETS|NUM-SOURCE-BUFFERS|NUM-TABS|NUM-TO-RETAIN|NUM-TOP-BUFFERS|num-visible-col|num-visible-colu|num-visible-colum|num-visible-column|num-visible-columns|numeric|numeric-dec|numeric-deci|numeric-decim|numeric-decima|numeric-decimal|numeric-decimal-|numeric-decimal-p|numeric-decimal-po|numeric-decimal-poi|numeric-decimal-poin|numeric-decimal-point|numeric-f|numeric-fo|numeric-for|numeric-form|numeric-forma|numeric-format|numeric-sep|numeric-sepa|numeric-separ|numeric-separa|numeric-separat|numeric-separato|numeric-separator)\\s*' + }, + 'handle-attributes-O': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(on-frame|on-frame-|on-frame-b|on-frame-bo|on-frame-bor|on-frame-bord|on-frame-borde|on-frame-border|OPTIONS|ORDINAL|ORIGIN-HANDLE|ORIGIN-ROWID|OVERLAY|OWNER|OWNER-DOCUMENT)\\s*' + }, + 'handle-attributes-P': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(page-bot|page-bott|page-botto|page-bottom|PAGE-TOP|PARAMETER|PARENT|PARENT-BUFFER|PARENT-FIELDS-AFTER|PARENT-FIELDS-BEFORE|PARENT-ID-RELATION|parent-rel|parent-rela|parent-relat|parent-relati|parent-relatio|parent-relation|PARSE-STATUS|PASSWORD-FIELD|PATHNAME|pbe-hash-alg|pbe-hash-algo|pbe-hash-algor|pbe-hash-algori|pbe-hash-algorit|pbe-hash-algorith|pbe-hash-algorithm|PBE-KEY-ROUNDS|PERSISTENT|PERSISTENT-CACHE-DISABLED|PERSISTENT-PROCEDURE|pfc|pfco|pfcol|pfcolo|pfcolor|pixels-per-col|pixels-per-colu|pixels-per-colum|pixels-per-column|PIXELS-PER-ROW|popup-m|popup-me|popup-men|popup-menu|popup-o|popup-on|popup-onl|popup-only|POSITION|PREFER-DATASET|PREPARED|PREPARE-STRING|prev-col|prev-colu|prev-colum|prev-column|PREV-SIBLING|prev-tab-i|prev-tab-it|prev-tab-ite|prev-tab-item|PRIMARY|PRIMARY-PASSPHRASE|PRINTER-CONTROL-HANDLE|PRINTER-HDC|PRINTER-NAME|PRINTER-PORT|private-d|private-da|private-dat|private-data|PROCEDURE-NAME|PROCEDURE-TYPE|PROFILING|progress-s|progress-so|progress-sou|progress-sour|progress-sourc|progress-source|PROXY|PROXY-PASSWORD|PROXY-USERID|PUBLIC-ID|PUBLISHED-EVENTS)\\s*' + }, + 'handle-attributes-Q': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(QUALIFIED-USER-ID|QUERY|QUERY-CLOSE|QUERY-OFF-END|QUERY-OPEN|QUERY-PREPARE|QUIT)\\s*' + }, + 'handle-attributes-R': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(RADIO-BUTTONS|READ|READ-FILE|READ-JSON|READ-ONLY|READ-XML|READ-XMLSCHEMA|RECID|record-len|record-leng|record-lengt|record-length|RECURSIVE|REFRESH|REFRESHABLE|REFRESH-AUDIT-POLICY|REGISTER-DOMAIN|REJECT-CHANGES|REJECT-ROW-CHANGES|REJECTED|relation-fi|relation-fie|relation-fiel|relation-field|relation-fields|RELATIONS-ACTIVE|REMOTE|REMOTE-HOST|REMOTE-PORT|REMOVE-ATTRIBUTE|REMOVE-CHILD|remove-events-proc|remove-events-proce|remove-events-proced|remove-events-procedu|remove-events-procedur|remove-events-procedure|remove-super-proc|remove-super-proce|remove-super-proced|remove-super-procedu|remove-super-procedur|remove-super-procedure|REPLACE|REPLACE-CHILD|REPLACE-SELECTION-TEXT|REPOSITION|reposition-back|reposition-backw|reposition-backwa|reposition-backwar|reposition-backward|reposition-backwards|reposition-forw|reposition-forwa|reposition-forwar|reposition-forward|reposition-forwards|REPOSITION-TO-ROW|REPOSITION-TO-ROWID|REQUEST-INFO|RESET|resiza|resizab|resizabl|resizable|RESIZE|RESPONSE-INFO|RESTART-ROW|RESTART-ROWID|retain-s|retain-sh|retain-sha|retain-shap|retain-shape|return-ins|return-inse|return-inser|return-insert|return-inserte|return-inserted|RETURN-VALUE|RETURN-VALUE-DATA-TYPE|RETURN-VALUE-DLL-TYPE|ROLE|ROLES|ROUNDED|ROW|row-height|row-height-c|row-height-ch|row-height-cha|row-height-char|row-height-chars|row-height-p|row-height-pi|row-height-pix|row-height-pixe|row-height-pixel|row-height-pixels|ROW-STATE|ROWID|row-ma|row-mar|row-mark|row-marke|row-marker|row-markers|ROW-RESIZABLE)\\s*' + }, + 'handle-attributes-S': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(SAVE|SAVE-FILE|SAVE-ROW-CHANGES|SAVE-WHERE-STRING|SAX-PARSE|SAX-PARSE-FIRST|SAX-PARSE-NEXT|sax-parser-error|SCHEMA-CHANGE|SCHEMA-LOCATION|SCHEMA-MARSHAL|SCHEMA-PATH|SCREEN-LINES|screen-val|screen-valu|screen-value|SCROLL-BARS|SCROLL-TO-CURRENT-ROW|scroll-to-i|scroll-to-it|scroll-to-ite|scroll-to-item|SCROLL-TO-SELECTED-ROW|SCROLLABLE|scrollbar-h|scrollbar-ho|scrollbar-hor|scrollbar-hori|scrollbar-horiz|scrollbar-horizo|scrollbar-horizon|scrollbar-horizont|scrollbar-horizonta|scrollbar-horizontal|scrollbar-v|scrollbar-ve|scrollbar-ver|scrollbar-vert|scrollbar-verti|scrollbar-vertic|scrollbar-vertica|scrollbar-verticalsss|SEAL-TIMESTAMP|SEARCH|SELECT-ALL|SELECT-FOCUSED-ROW|SELECT-NEXT-ROW|SELECT-PREV-ROW|SELECT-ROW|SELECTABLE|SELECTED|SELECTION-END|SELECTION-START|SELECTION-TEXT|SENSITIVE|SEPARATORS|SEPARATOR-FGCOLOR|SERIALIZE-HIDDEN|SERIALIZE-NAME|SERIALIZE-ROW|SERVER|server-connection-bo|server-connection-bou|server-connection-boun|server-connection-bound|server-connection-bound-re|server-connection-bound-req|server-connection-bound-requ|server-connection-bound-reque|server-connection-bound-reques|server-connection-bound-request|server-connection-co|server-connection-con|server-connection-cont|server-connection-conte|server-connection-contex|server-connection-context|server-connection-id|server-operating-mode|SESSION-END|SESSION-ID|SET-ACTOR|SET-APPL-CONTEXT|SET-ATTRIBUTE|SET-ATTRIBUTE-NODE|set-blue|set-blue-|set-blue-v|set-blue-va|set-blue-val|set-blue-valu|set-blue-value|SET-BREAK|SET-BUFFERS|SET-CALLBACK|SET-CALLBACK-PROCEDURE|SET-CLIENT|SET-COMMIT|SET-CONNECT-PROCEDURE|SET-DYNAMIC|set-green|set-green-|set-green-v|set-green-va|set-green-val|set-green-valu|set-green-value|SET-INPUT-SOURCE|SET-MUST-UNDERSTAND|SET-NODE|set-numeric-form|set-numeric-forma|set-numeric-format|SET-OUTPUT-DESTINATION|SET-PARAMETER|SET-READ-RESPONSE-PROCEDURE|set-red|set-red-|set-red-v|set-red-va|set-red-val|set-red-valu|set-red-value|SET-REPOSITIONED-ROW|SET-RGB-VALUE|SET-ROLE|SET-ROLLBACK|SET-SAFE-USER|SET-SELECTION|SET-SERIALIZED|SET-SOCKET-OPTION|SET-SORT-ARROW|set-wait|set-wait-|set-wait-s|set-wait-st|set-wait-sta|set-wait-stat|set-wait-state|show-in-task|show-in-taskb|show-in-taskba|show-in-taskbar|side-label-han|side-label-hand|side-label-handl|side-label-handle|SIDE-LABELS|signature|signature-value|SINGLE-RUN|SINGLETON|skip-deleted-rec|skip-deleted-reco|skip-deleted-recor|skip-deleted-record|SMALL-ICON|SMALL-TITLE|soap-fault-actor|soap-fault-code|soap-fault-detail|soap-fault-misunderstood-header|soap-fault-node|soap-fault-role|soap-fault-string|soap-fault-subcode|SOAP-VERSION|SORT|SORT-ASCENDING|SORT-NUMBER|SSL-SERVER-NAME|STANDALONE|START-DOCUMENT|START-ELEMENT|STARTUP-PARAMETERS|STATE-DETAIL|STATISTICS|STATUS-AREA|STATUS-AREA-FONT|STOP|STOP-OBJECT|STOP-PARSING|stoppe|stopped|STREAM|STRETCH-TO-FIT|STRICT|STRICT-ENTITY-RESOLUTION|STRING-VALUE|SUBTYPE|super-proc|super-proce|super-proced|super-procedu|super-procedur|super-procedure|super-procedures|SUPPRESS-NAMESPACE-PROCESSING|suppress-w|suppress-wa|suppress-war|suppress-warn|suppress-warni|suppress-warnin|suppress-warning|suppress-warnings|suppress-warnings-list|SYMMETRIC-ENCRYPTION-AAD|SYMMETRIC-ENCRYPTION-ALGORITHM|SYMMETRIC-ENCRYPTION-IV|SYMMETRIC-ENCRYPTION-KEY|SYMMETRIC-SUPPORT|SYNCHRONIZE|system-alert|system-alert-|system-alert-b|system-alert-bo|system-alert-box|system-alert-boxe|system-alert-boxes|SYSTEM-ID)\\s*' + }, + 'handle-attributes-T': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(TAB-POSITION|TAB-STOP|TABLE|TABLE-CRC-LIST|TABLE-HANDLE|TABLE-LIST|table-num|table-numb|table-numbe|table-number|temp-dir|temp-dire|temp-direc|temp-direct|temp-directo|temp-director|temp-directory|temp-table-prepar|temp-table-prepare|TENANT-ID|TENANT-NAME|TEXT-SELECTED|THREAD-SAFE|THREE-D|TIC-MARKS|TIME-SOURCE|TIMEZONE|TITLE|title-bgc|title-bgco|title-bgcol|title-bgcolo|title-bgcolor|title-dc|title-dco|title-dcol|title-dcolo|title-dcolor|title-fgc|title-fgco|title-fgcol|title-fgcolo|title-fgcolor|title-fo|title-fon|title-font|TOGGLE-BOX|TOOLTIP|TOOLTIPS|TOP-NAV-QUERY|TOP-ONLY|TRACE-FILTER|TRACING|TRACKING-CHANGES|TRANSACTION|TRANSPARENT|trans-init-proc|trans-init-proce|trans-init-proced|trans-init-procedu|trans-init-procedur|trans-init-procedure|TYPE)\\s*' + }, + 'handle-attributes-U': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(UNDO|UNDO-THROW-SCOPE|UNIQUE-ID|UNIQUE-MATCH|UPDATE-ATTRIBUTE|URL|URL-DECODE|URL-ENCODE|URL-PASSWORD|URL-USERID|USER-DATA |USER-ID)\\s*' + }, + 'handle-attributes-V': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(V6DISPLAY|VALIDATE|VALIDATE-DOMAIN-ACCESS-CODE|validate-expressio|validate-expression|VALIDATE-MESSAGE|VALIDATE-SEAL|VALIDATE-XML|VALIDATION-ENABLED|VALUE|VERSION|VIEW-AS|VIEW-FIRST-COLUMN-ON-REOPEN|virtual-height|virtual-height-c|virtual-height-ch|virtual-height-cha|virtual-height-char|virtual-height-chars|virtual-height-p|virtual-height-pi|virtual-height-pix|virtual-height-pixe|virtual-height-pixel|virtual-height-pixels|virtual-width|virtual-width-c|virtual-width-ch|virtual-width-cha|virtual-width-char|virtual-width-chars|virtual-width-p|virtual-width-pi|virtual-width-pix|virtual-width-pixe|virtual-width-pixel|virtual-width-pixels|VISIBLE)\\s*' + }, + 'handle-attributes-W': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(WARNING|WC-ADMIN-APP|WHERE-STRING|WIDGET-ENTER|WIDGET-ID|widget-l|widget-le|widget-lea|widget-leav|widget-leave|width|width-c|width-ch|width-cha|width-char|width-chars|width-p|width-pi|width-pix|width-pixe|width-pixel|width-pixels|WINDOW|window-sta|window-stat|window-state|window-sys|window-syst|window-syste|window-system|WORD-WRAP|work-area-height-p|work-area-height-pi|work-area-height-pix|work-area-height-pixe|work-area-height-pixel|work-area-height-pixels|work-area-width-p|work-area-width-pi|work-area-width-pix|work-area-width-pixe|work-area-width-pixel|work-area-width-pixels|work-area-x|work-area-y|WRITE|WRITE-CDATA|WRITE-CHARACTERS|WRITE-COMMENT|WRITE-DATA|WRITE-DATA-ELEMENT|WRITE-EMPTY-ELEMENT|WRITE-ENTITY-REF|WRITE-EXTERNAL-DTD|WRITE-FRAGMENT|WRITE-JSON|WRITE-MESSAGE|WRITE-PROCESSING-INSTRUCTION|WRITE-STATUS|WRITE-XML|WRITE-XMLSCHEMA)\\s*' + }, + 'handle-attributes-X': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: + '(?i):(X|X-DOCUMENT|XCODE-SESSION-KEY|XML-DATA-TYPE|XML-ENTITY-EXPANSION-LIMIT|XML-NODE-NAME|XML-NODE-TYPE|XML-SCHEMA-PATH|XML-STRICT-ENTITY-RESOLUTION|XML-SUPPRESS-NAMESPACE-PROCESSING)\\s*' + }, + 'handle-attributes-Y': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: '(?i):(Y|YEAR-OFFSET)\\s*' + }, 'include-file': { - begin: '({)\\s*', - beginCaptures: {1: {name: 'punctuation.section.abl'}}, - end: '\\s*(})', + begin: '(?i)({)\\s*(([a-z][a-z0-9\\/\\-\\_\\\\]+)(\\.[a-z]+)?)', + beginCaptures: { + 1: {name: 'punctuation.section.abl'}, + 2: {name: 'meta.other.include.abl'} + }, + end: '\\s*(})\\s*', endCaptures: {1: {name: 'punctuation.section.abl'}}, name: 'meta.include.abl', patterns: [ + {include: '#argument-reference'}, + { + captures: { + 1: {name: 'support.other.argument.abl'}, + 2: {name: 'keyword.operator.source.abl'} + }, + match: '(?<=\\s)(&[a-zA-Z][a-zA-Z0-9\\#\\$\\-\\_\\%\\.]+)\\s*(=?)', + name: 'meta.include.argument.abl' + }, {include: '#string'}, - {match: '(?i)({\\&[\\w-]*})', name: 'keyword.other'}, { - match: '(\\&[\\w-]+)(\\s*)=(\\s*)((".*")|(\'.*\')|([^}\\s]*))', + captures: { + 1: {name: 'support.other.argument.abl'}, + 2: {name: 'keyword.operator.source.abl'} + }, + match: '(?<=\\s)(&[a-zA-Z][a-zA-Z0-9\\#\\$\\-\\_\\%\\.]+)\\s*(=?)', name: 'meta.include-named-argument' }, + {include: '#string'}, { - captures: {1: {name: 'string.unquoted.include-argument.abl'}}, - match: '([^}\\s]*)\\s*' + captures: { + 1: {name: 'support.other.argument.abl'}, + 2: {name: 'keyword.operator.source.abl'} + }, + match: '(?<=\\s)(&[a-zA-Z][a-zA-Z0-9\\#\\$\\-\\_\\%\\.]+)\\s*(=?)', + name: 'meta.include-named-argument' } ] }, + 'inherits-implements-type': { + begin: + '(?i)\\s*(implements|inherits)\\s*(([\\w\\#\\$\\%]+|progress)(\\.[\\w\\#\\$\\%]+)*(?|>=|=|\\+| - |/|<|>|,)', - name: 'keyword.operator.source.abl' + patterns: [ + {include: '#operator-no-space'}, + {include: '#operator-with-space'} + ] + }, + 'operator-no-space': { + captures: {1: {name: 'keyword.operator.source.abl'}}, + match: '(<=|<>|>=|=|\\+|\\-|/|<|>|,|\\?\\:)' + }, + 'operator-with-space': { + captures: {1: {name: 'keyword.operator.source.abl'}}, + match: '(?i)\\s+(contains|begins|matches|eq|le|lt|ge|gt|ne)\\s+' + }, + ordinal: { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'constant.numeric.source.abl'} + }, + match: '(?i)\\s*(ordinal)\\s((0x[0-9a-f]+)|([0-9]+)?)' + }, + 'parameter-as': { + begin: '(?i)\\s*([\\w\\-]+)\\s+(as)\\s*', + beginCaptures: { + 1: {name: 'variable.parameter.abl'}, + 2: {name: 'keyword.other.abl'} + }, + end: '(?=\\s|\\)|\\.)', + patterns: [ + { + captures: {1: {name: 'keyword.other.abl'}}, + match: '(?i)\\s*(class)\\s*' + }, + {include: '#dll-type'}, + {include: '#primitive-type'}, + {include: '#type-name-progress'}, + {include: '#type-name-generic'}, + {include: '#type-name'}, + {include: '#parens'}, + {include: '#string'}, + {include: '#punctuation-period'}, + {include: '#punctuation-comma'} + ] + }, + 'parameter-definition': { + name: 'meta.define.parameter.abl', + patterns: [ + { + captures: {1: {name: 'keyword.other.abl'}}, + match: + '(?i)\\s*(input-output|input-outpu|input-outp|input-out|input-ou|input-o|input|output|append|bind|by-value|preselect|buffer|parameter|param|no-undo)\\s*' + }, + { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'variable.parameter.abl'} + }, + match: '(?i)\\s*(dataset-handle|table-handle)\\s+([\\w\\-]+)' + }, + { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'storage.data.table.abl'} + }, + match: '(?i)\\s*(dataset|table)\\s+([\\w\\-]+)\\s*' + }, + {include: '#parameter-as'}, + { + captures: { + 1: {name: 'storage.type.abl'}, + 2: {name: 'punctuation.separator.comma.abl'} + }, + match: + '(?i)\\s*(character|characte|charact|charac|chara|char|com-handle|date|datetime-tz|datetime|decimal|decima|decim|deci|dec|handle|int64|integer|intege|integ|inte|int|logical|logica|logic|logi|log|longchar|longcha|longch|memptr|raw|recid|rowid|widget-handle|widget-h?)(?![=\\w-])\\s*(,*)' + }, + { + captures: {1: {name: 'punctuation.separator.comma.abl'}}, + match: '\\s*(,)\\s*' + }, + {include: '#buffer-for-table'}, + {include: '#extent'}, + {include: '#property-call'}, + {include: '#abl-functions'}, + {include: '#array-literal'}, + {include: '#decimals'}, + {include: '#constant'}, + {include: '#type-name-generic-progress'}, + {include: '#type-name-progress'}, + {include: '#abl-system-handles'}, + {include: '#keywords'}, + {include: '#handle-attributes'}, + {include: '#abl-functions'}, + {include: '#type-name-generic'}, + {include: '#type-name'}, + {include: '#string'}, + {include: '#comment'} + ] }, 'parameter-name': { match: '(?<=^|\\s)(\\w|-)+(?=\\s)', name: 'variable.parameter.abl' }, + parens: {match: '\\(|\\)', name: 'meta.brace.round.js'}, 'primitive-type': { + captures: {1: {name: 'storage.type.abl'}}, match: - '(?i)(?<=^|\\s)(blob|character|characte|charact|charac|chara|char|clob|com-handle|date|datetime|datetime-tz|decimal|decima|decim|deci|dec|handle|int64|integer|intege|integ|inte|int|logical|logica|logic|logi|log|longchar|longcha|longch|memptr|raw|recid|rowid|widget-handle)(?![=\\w-])', - name: 'storage.type.abl' + '(?i)(?<=^|\\s)(blob|character|characte|charact|charac|chara|char|clob|com-handle|date|datetime|datetime-tz|decimal|decima|decim|deci|dec|handle|int64|integer|intege|integ|inte|int|logical|logica|logic|logi|log|longchar|longcha|longch|memptr|raw|recid|rowid|widget-handle)(?![=\\w-])' }, 'procedure-definition': { begin: - "(?i)\\b(proce|proced|procedu|procedur|procedure)\\b\\s+('[\\w\\.\\-\\{\\}\\&]*':U|'[\\w\\.\\-\\{\\}\\&]*'|[\\w\\.\\-\\{\\}\\&]*)?(\\s+(EXTERNAL)\\s+(\")([\\w\\.-]*)(\"))?", - beginCaptures: { - 1: {name: 'keyword.other.abl'}, - 2: {name: 'entity.name.function.abl'}, - 4: {name: 'keyword.other.abl'}, - 5: {name: 'punctuation.definition.string.begin.abl'}, - 6: {name: 'string.double.complex.abl'}, - 7: {name: 'punctuation.definition.string.begin.abl'} - }, - end: '(?=\\.)', + '(?i)\\s*(procedure|procedur|procedu|proced|proce)\\s+(?=[\\w\'"#\\$_])', + beginCaptures: {1: {name: 'keyword.other.abl'}}, + end: '(?<=:)', name: 'meta.procedure.abl', patterns: [ { - begin: ':', - end: '(?i)(end\\s*procedure|end)', - endCaptures: {1: {name: 'keyword.other.abl'}}, - name: 'meta.procedure.body.abl', - patterns: [{include: '#code-block'}] - } + captures: {1: {name: 'keyword.other.abl'}}, + match: + '(?i)\\s*(external|cdecl|pascal|stdcall|ordinal|persistent|thread-safe|in|super)\\s*' + }, + {include: '#string'}, + {include: '#translation-attribute'}, + { + captures: {1: {name: 'entity.name.function.abl'}}, + match: '([a-zA-Z][a-zA-Z0-9\\#\\$\\-\\_\\%\\&\\.]+)' + }, + {include: '#argument-reference'}, + {include: '#numeric'} + ] + }, + 'property-accessor': { + patterns: [ + {include: '#property-get-empty'}, + {include: '#property-set-empty'}, + {include: '#property-get-block'}, + {include: '#property-set-block'} + ] + }, + 'property-as': { + captures: { + 1: {name: 'entity.name.function.abl'}, + 2: {name: 'keyword.other.abl'} + }, + match: '(?i)\\s*([\\w\\-]+)\\s+(as)\\s*' + }, + 'property-call': { + captures: {1: {name: 'entity.name.function.abl'}}, + match: '(?<=:)([\\w-]+)\\s*' + }, + 'property-get-block': { + begin: '(?i)\\s*(get)', + beginCaptures: {1: {name: 'keyword.other.abl'}}, + end: '(?i)\\s*(end)\\s*(get)?\\s*(?=\\.)\\s*', + endCaptures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'keyword.other.abl'} + }, + name: 'meta.define.getter.abl', + patterns: [ + {include: '#function-parameter-definition'}, + {include: '#code-block'}, + {include: '#punctuation-colon'} + ] + }, + 'property-get-empty': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'keyword.other.abl'} + }, + match: '\\s*(get)\\s*(super)?\\s*(?=\\.)', + name: 'meta.define.getter.abl' + }, + 'property-set-block': { + begin: '(?i)\\s*(set)', + beginCaptures: {1: {name: 'keyword.other.abl'}}, + end: '(?i)\\s*(end)\\s*(set)?\\s*(?=\\.)\\s*', + endCaptures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'keyword.other.abl'} + }, + name: 'meta.define.setter.abl', + patterns: [ + {include: '#punctuation-colon'}, + {include: '#function-parameter-definition'}, + {include: '#code-block'} ] }, + 'property-set-empty': { + captures: { + 1: {name: 'keyword.other.abl'}, + 2: {name: 'keyword.other.abl'} + }, + match: '\\s*(set)\\s*(super)?\\s*(?=\\.)', + name: 'meta.define.setter.abl' + }, + 'punctuation-colon': {match: ':', name: 'punctuation.terminator.abl'}, 'punctuation-comma': {match: ',', name: 'punctuation.separator.comma.abl'}, - 'punctuation-semicolon': {match: '\\.', name: 'punctuation.terminator.abl'}, - singlelinecomment: {match: '//.*$', name: 'comment.source.abl'}, + 'punctuation-period': {match: '\\.', name: 'punctuation.terminator.abl'}, + 'punctuation-semicolon': {match: ';', name: 'punctuation.terminator.abl'}, + 'run-statement': { + captures: { + 1: {name: 'keyword.other.abl.abl'}, + 2: {name: 'meta.other.procedure.abl'} + }, + match: + '(?i)\\s*(run)\\s+(?!value)(([a-z][a-z0-9\\/\\-\\_\\\\]+)(\\.[a-z]+)?)' + }, + serializable: { + captures: {1: {name: 'keyword.other.abl'}}, + match: '(?i)\\b(non-serializable|serializable)\\b' + }, + singlelinecomment: { + match: '\\/\\/.*$', + name: 'comment.line.double-slash.abl' + }, singlequotedstring: { - begin: "'", - beginCaptures: {0: {name: 'punctuation.definition.string.begin.abl'}}, - end: "'", - endCaptures: {0: {name: 'punctuation.definition.string.end.abl'}}, + begin: "(')", + beginCaptures: {1: {name: 'punctuation.definition.string.begin.abl'}}, + end: "(')", + endCaptures: {1: {name: 'punctuation.definition.string.end.abl'}}, name: 'string.single.complex.abl', patterns: [{match: '~.', name: 'constant.character.escape.abl'}] }, statements: { + name: 'meta.statements.abl', patterns: [ + {include: '#annotation'}, + {include: '#block-statement'}, + {include: '#block-label'}, + {include: '#end-block'}, + {include: '#end-function-procedure-method-block'}, + {include: '#find-record'}, + {include: '#type-argument-function'}, + {include: '#get-class'}, + {include: '#break-group'}, + {include: '#abl-functions'}, + {include: '#handle-attributes'}, + {include: '#function-arguments'}, + {include: '#arguments-reference'}, + {include: '#method-definition'}, + {include: '#access-modifier'}, + { + captures: {1: {name: 'keyword.other.abl'}}, + match: '(?i)\\s*(void)\\s*' + }, {include: '#string'}, + {include: '#translation-attribute'}, + {include: '#parens'}, {include: '#singlelinecomment'}, {include: '#multilinecomment'}, {include: '#declarations'}, + {include: '#decimals'}, {include: '#numeric'}, {include: '#constant'}, + {include: '#timestamp-constant'}, {include: '#operator'}, {include: '#analyze-suspend-resume'}, {include: '#global-scoped-define'}, + {include: '#label-variable'}, + {include: '#define-field'}, + {include: '#define-like'}, + {include: '#format-constant'}, { match: '(?i)(\\&[\\w-]*)|({\\&[\\w-]*})|(&window-system|&text-height|&line-number|&batch-mode|&file-name|&undefine|&sequence|&message|defined|&elseif|&scoped|&global|&opsys|&endif|&else|&scop|&then|&glob|&if)', name: 'storage.type.function.abl' }, + {include: '#procedure-definition'}, + {include: '#dll-type'}, + {include: '#parameter-as'}, + {include: '#buffer-for-table'}, {include: '#primitive-type'}, {include: '#method-call'}, + {include: '#property-accessor'}, + {include: '#property-call'}, {include: '#function-call'}, + {include: '#type-reference'}, + {include: '#type-name2'}, + {include: '#for-each-table'}, + {include: '#for-each-join'}, + {include: '#for-join'}, + {include: '#of-phrase'}, + {include: '#db-dot-table-dot-field'}, {include: '#code-block'}, + {include: '#language-functions'}, + {include: '#comment'}, + {include: '#array-literal'}, + {include: '#punctuation-semicolon'}, + {include: '#parens'}, {include: '#keywords'}, {include: '#variable-name'}, - {include: '#array-literal'}, - {include: '#punctuation-semicolon'} + {include: '#punctuation-period'} ] }, + 'static-object-property-call': { + captures: { + 1: {name: 'entity.name.type.abl'}, + 4: {name: 'entity.name.function.abl'} + }, + match: + '(?i)\\s*(([\\w\\#\\$\\%\\-]+|progress)(\\.[\\w\\#\\$\\%\\-]+)*)\\s*:([\\w-]+)\\s*' + }, string: { patterns: [ {include: '#singlequotedstring'}, - {include: '#doublequotedstring'} + {include: '#doublequotedstring'}, + {include: '#translation-attribute'} + ] + }, + 'timestamp-constant': {name: 'constant.language.abl'}, + 'translation-attribute': { + captures: {1: {name: 'support.other.abl'}}, + match: '(?i)(:[L|R|T|C|U]\\d*)\\s*' + }, + 'type-argument-function': { + begin: '(?i)\\s*(cast|type-of)\\s*', + beginCaptures: {1: {name: 'support.function.abl'}}, + end: '(?<=\\))', + endCaptures: {1: {name: 'meta.brace.round.js'}}, + name: 'meta.function-call.abl', + patterns: [ + { + captures: { + 1: {name: 'storage.data.table.abl'}, + 4: {name: 'punctuation.separator.comma.abl'} + }, + match: '\\s*(([\\w\\-#$%]+)\\.([\\w\\-#$%]+))\\s*(,)' + }, + { + captures: { + 1: {name: 'variable.other.abl'}, + 3: {name: 'punctuation.separator.comma.abl'} + }, + match: '\\s*([a-zA-Z][a-zA-Z0-9\\#\\$\\-\\_\\%\\&]*)\\s*((,)|(?=:))' + }, + { + captures: { + 1: {name: 'entity.name.function.abl'}, + 2: {name: 'punctuation.separator.comma.abl'} + }, + match: '\\s*:([\\w-]+)\\s*(,)' + }, + {include: '#expression'}, + {include: '#property-call'}, + {include: '#static-object-property-call'}, + {include: '#doublequotedstring'}, + {include: '#singlequotedstring'}, + {include: '#translation-attribute'}, + {include: '#type-name-generic-progress'}, + {include: '#type-name-generic'}, + {include: '#type-name-comma-progress'}, + {include: '#type-name-progress'}, + {include: '#type-name-comma'}, + {include: '#type-name'}, + {include: '#parens'} ] }, + 'type-name': { + captures: {1: {name: 'entity.name.type.abl'}}, + match: '(?i)\\b([\\w\\#\\$\\%\\-]+(\\.[\\w\\#\\$\\%\\-]+)*)\\b' + }, + 'type-name-comma': { + captures: { + 1: {name: 'punctuation.separator.comma.abl'}, + 2: {name: 'keyword.other.abl'}, + 3: {name: 'entity.name.type.abl'}, + 6: {name: 'punctuation.separator.comma.abl'} + }, + match: + '(?i)\\s*(,*)\\s*(class)?\\s*(([\\w\\#\\$\\%]+)(\\.?[\\w\\#\\$\\%]*)*(?', + name: 'entity.name.type.generic.abl', + patterns: [{include: '#generic-types'}] + }, + 'type-name-generic-progress': { + begin: '(?i)\\s*((progress)(\\.[\\w\\#\\$\\%\\-]+)*)\\s*<', + beginCaptures: {1: {name: 'entity.name.type.abl'}}, + end: '\\>', + name: 'entity.name.type.generic.abl', + patterns: [{include: '#generic-types'}] + }, + 'type-name-progress': { + captures: {1: {name: 'entity.name.type.abl'}}, + match: '(?i)\\s*((progress\\.)([\\.\\w\\#\\$\\%]+)*)\\s*(? +// and licensed `mit`. +// See for more info. +/** @type {import('../lib/index.js').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: + '(? +// and licensed `bsd-3-clause`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: [], + names: ['bluespec-bh', 'bh', 'bluespec-classic'], + patterns: [ + {include: '#comment_like'}, + {include: '#numeric_literals'}, + {include: '#string_literal'}, + {include: '#char_literal'}, + {match: '(?\n \\( # Opening parenthesis\n (?:\n [^\\(\\)]* # Match non-parentheses\n | \\g # or recurse into further depth\n )*\n \\) # Closing parenthesis\n )\n )\n # Type inside balanced brackets\n | ('? # Optional promotion tick\n (?\n \\[ # Opening bracket\n (?:\n [^\\[\\]]* # Match non-brackets\n | \\g # or recurse into further depth\n )*\n \\] # Closing bracket\n )\n )\n )\n # Then either\n \\s*\n # - a symbolic infix constructor, or\n (?:(?|⇒)\n (?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_"\']])\n' + }, + deriving: { + patterns: [ + { + begin: '^(\\s*)(deriving)\\s+(?:(via|stock|newtype|anyclass)\\s+)?', + beginCaptures: { + 2: {name: 'keyword.other.deriving.bh'}, + 3: {name: 'keyword.other.deriving.strategy.$3.bh'} + }, + end: '(?x) # Detect end of deriving statement\n # Decreasing indentation\n (?=\\}|;) # Explicit indentation\n |^(?! # Implicit indentation: end match on newline *unless* the new line is either:\n \\1\\s+\\S # - more indented, or\n | \\s* # - starts with whitespace, followed by:\n (?: $ # - the end of the line (i.e. empty line), or\n |\\{-[^@] # - the start of a block comment, or\n |--+ # - the start of a single-line comment.\n (?![\\p{S}\\p{P}&&[^(),;\\[\\]{}`_"\']]).*$) # non-symbol\n # The double dash may not be followed by other operator characters\n # (then it would be an operator, not a comment)\n )', + name: 'meta.deriving.bh', + patterns: [ + {include: '#comment_like'}, + { + match: "(?|→)', + endCaptures: { + 1: {name: 'keyword.operator.period.bh'}, + 2: {name: 'keyword.operator.arrow.bh'} + }, + patterns: [ + {include: '#comment_like'}, + {include: '#type_variable'}, + {include: '#type_signature'} + ] + }, + fun_decl: { + begin: + "(?x)^(\\s*)\n (primitive\\s+)?\n (type\\s+)?\n (?\n (?:\n [\\p{Ll}_\\p{Lu}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*\\#*\n | \\(\\s*\n (?!--+\\))\n [\\p{S}\\p{P}&&[^(),:;\\[\\]`{}_\"']]\n [\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]*\n \\s*\\)\n )\n (?:\\s*,\\s*\\g)?\n )\n \\s*(?)\n ((<-|←)|(=)|(-<|↢)|(-<<|⤛))\n # non-symbolic character\n ([(),;\\[\\]`{}_"\']|[^\\p{S}\\p{P}])\n )\n # Decreasing indentation:\n |(?=\\}|;) # Explicit indentation\n |^(?! # Implicit indentation: end match on newline *unless* the new line is either:\n \\1\\s+\\S # - more indented, or\n | \\s* # - starts with whitespace, followed by:\n (?: $ # - the end of the line (i.e. empty line), or\n |\\{-[^@] # - the start of a block comment, or\n |--+ # - the start of a single-line comment.\n (?![\\p{S}\\p{P}&&[^(),;\\[\\]{}`_"\']]).*$) # non-symbol\n # The double dash may not be followed by other operator characters\n # (then it would be an operator, not a comment)\n )\n', + name: 'meta.function.type-declaration.bh', + patterns: [{include: '#type_signature'}] + }, + gadt_constructor: { + patterns: [ + { + begin: + "(?x)\n ^(\\s*)\n (?:\n (\\b(?[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(\\.\\g)?)", + name: 'entity.name.namespace.bh' + }, + pragma: { + begin: '\\{-#', + end: '#-\\}', + name: 'meta.preprocessor.bh', + patterns: [ + {include: '#comments'}, + { + match: + "(?xi) \\b(?|→)\n |(-<|↢)\n |(-<<|⤛)\n |(>-|⤚)\n |(>>-|⤜)\n )\n (?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"'']])" + }, + { + captures: {1: {name: 'keyword.operator.postfix.hash.bh'}}, + match: + '(?x)\n (?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\\p{S}\\p{P}&&[^\\#,;\\[`{]]) # Require closing characters\n (\\#+)\n (?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\\p{S}\\p{P}&&[^),;\\]`}]]) # Disallow opening character' + }, + { + captures: {1: {name: 'keyword.operator.infix.tight.at.bh'}}, + match: + "(?x)\n (?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'\\)\\}\\]]) # Require closing characters\n (@)\n (?=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'\\(\\[\\{]) # Require opening character" + }, + { + captures: { + 1: {name: 'keyword.operator.prefix.tilde.bh'}, + 2: {name: 'keyword.operator.prefix.bang.bh'}, + 3: {name: 'keyword.operator.prefix.minus.bh'}, + 4: {name: 'keyword.operator.prefix.double-dollar.bh'}, + 5: {name: 'keyword.operator.prefix.dollar.bh'}, + 6: {name: 'keyword.operator.prefix.modifier.bh'} + }, + match: + "(?x)\n (?)\n (?)\n (?|⇒', name: 'keyword.operator.big-arrow.bh'}, + {include: '#string_literal'}, + {match: "'[^']'", name: 'invalid'}, + {include: '#type_application'}, + {include: '#reserved_symbol'}, + {include: '#type_operator'}, + {include: '#type_constructor'}, + { + begin: '(\\()', + beginCaptures: {1: {name: 'punctuation.paren.bh'}}, + end: '(\\))', + endCaptures: {2: {name: 'punctuation.paren.bh'}}, + patterns: [{include: '#comma'}, {include: '#type_signature'}] + }, + { + begin: "(')?(\\()", + beginCaptures: { + 1: {name: 'keyword.operator.promotion.bh'}, + 2: {name: 'punctuation.paren.bh'} + }, + end: '(\\))', + endCaptures: {1: {name: 'punctuation.paren.bh'}}, + patterns: [{include: '#comma'}, {include: '#type_signature'}] + }, + { + begin: "(')?(\\[)", + beginCaptures: { + 1: {name: 'keyword.operator.promotion.bh'}, + 2: {name: 'punctuation.bracket.bh'} + }, + end: '(\\])', + endCaptures: {1: {name: 'punctuation.bracket.bh'}}, + patterns: [{include: '#comma'}, {include: '#type_signature'}] + }, + {include: '#type_variable'} + ] + }, + type_variable: { + match: + "\\b(? for more info. /** @type {import('../lib/index.js').Grammar} */ const grammar = { - extensions: ['.bicep'], + extensions: ['.bicep', '.bicepparam'], names: ['bicep'], patterns: [{include: '#expression'}, {include: '#comments'}], repository: { diff --git a/lang/source.blitzmax.js b/lang/source.blitzmax.js index 4fcdae1..23a5809 100644 --- a/lang/source.blitzmax.js +++ b/lang/source.blitzmax.js @@ -3,7 +3,7 @@ // See for more info. /** @type {import('../lib/index.js').Grammar} */ const grammar = { - extensions: ['.bb', '.bmx', '.decls'], + extensions: ['.bmx', '.decls'], names: [ 'b3d', 'blitz3d', diff --git a/lang/source.brs.js b/lang/source.brs.js index 17c2887..cfa2147 100644 --- a/lang/source.brs.js +++ b/lang/source.brs.js @@ -307,11 +307,18 @@ const grammar = { }, preprocessor_keywords: { patterns: [ - {match: '(?i:(#const))', name: 'keyword.preprocessor.if.brs'}, - {match: '(?i:(#if))', name: 'keyword.preprocessor.if.brs'}, - {match: '(?i:(#else\\s*if))', name: 'keyword.preprocessor.if.brs'}, - {match: '(?i:(#end\\s*if))', name: 'keyword.preprocessor.endif.brs'}, - {match: '(?i:(#else))', name: 'keyword.preprocessor.else.brs'} + {match: '(?i:(#[ \t]*const))', name: 'keyword.preprocessor.const.brs'}, + {match: '(?i:(#[ \t]*if))', name: 'keyword.preprocessor.if.brs'}, + { + match: '(?i:(#[ \t]*else[ \t]*if))', + name: 'keyword.preprocessor.elseif.brs' + }, + { + match: '(?i:(#[ \t]*end[ \t]*if))', + name: 'keyword.preprocessor.endif.brs' + }, + {match: '(?i:(#[ \t]*else))', name: 'keyword.preprocessor.else.brs'}, + {match: '(?i:(#[ \t]*error))', name: 'keyword.preprocessor.error.brs'} ] }, primitive_literal_expression: { diff --git a/lang/source.cobol.js b/lang/source.cobol.js index 742fa1b..65cb9b5 100644 --- a/lang/source.cobol.js +++ b/lang/source.cobol.js @@ -151,6 +151,20 @@ const grammar = { match: '>>\\s*(?i:turn|page|listing|leap-seconds|d)\\s+.*$', name: 'invalid.illegal.meta.preprocessor.cobolit' }, + { + match: '(?i:substitute-case|substitute)\\s+', + name: 'invalid.illegal.functions.cobolit' + }, + { + captures: { + 1: { + name: 'invalid.illegal.keyword.control.directive.conditional.cobol' + }, + 2: {name: 'invalid.illegal.entity.name.function.preprocessor.cobol'}, + 3: {name: 'invalid.illegal.entity.name.function.preprocessor.cobol'} + }, + match: '((((>>|\\$)[\\s]*)(?i:elif))(.*$))' + }, { captures: { 1: {name: 'keyword.control.directive.conditional.cobol'}, @@ -267,6 +281,7 @@ const grammar = { patterns: [ {match: '(\\()', name: 'meta.symbol.cobol'}, {include: '#dli-keywords'}, + {include: '#dli-options'}, {include: '#string-double-quoted-constant'}, {include: '#string-quoted-constant'}, {include: '#number-complex-constant'}, @@ -452,7 +467,7 @@ const grammar = { }, { match: - '(? +// and licensed `mit`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: ['.lisp', '.asd', '.cl', '.l', '.lsp', '.ny', '.podsl', '.sexp'], + names: ['common-lisp', 'lisp'], + patterns: [ + {include: '#comment'}, + {include: '#block-comment'}, + {include: '#string'}, + {include: '#escape'}, + {include: '#constant'}, + {include: '#lambda-list'}, + {include: '#function'}, + {include: '#style-guide'}, + {include: '#def-name'}, + {include: '#macro'}, + {include: '#symbol'}, + {include: '#special-operator'}, + {include: '#declaration'}, + {include: '#type'}, + {include: '#class'}, + {include: '#condition-type'}, + {include: '#package'}, + {include: '#variable'}, + {include: '#punctuation'} + ], + repository: { + 'block-comment': { + begin: '\\#\\|', + contentName: 'comment.block.commonlisp', + end: '\\|\\#', + name: 'comment', + patterns: [{include: '#block-comment', name: 'comment'}] + }, + class: { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:two-way-stream|synonym-stream|symbol|structure-object|structure-class|string-stream|stream|standard-object|standard-method|\nstandard-generic-function|standard-class|sequence|restart|real|readtable|ratio|random-state|package|number|method|integer|hash-table|\ngeneric-function|file-stream|echo-stream|concatenated-stream|class|built-in-class|broadcast-stream|bit-vector|array)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'support.class.commonlisp' + }, + comment: { + begin: '(^[ \\t]+)?(?=;)', + beginCaptures: { + 1: {name: 'punctuation.whitespace.comment.leading.commonlisp'} + }, + end: '(?!\\G)', + patterns: [ + { + begin: ';', + beginCaptures: { + 0: {name: 'punctuation.definition.comment.commonlisp'} + }, + end: '\\n', + name: 'comment.line.semicolon.commonlisp' + } + ] + }, + 'condition-type': { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:warning|undefined-function|unbound-variable|unbound-slot|type-error|style-warning|stream-error|storage-condition|simple-warning|\nsimple-type-error|simple-error|simple-condition|serious-condition|reader-error|program-error|print-not-readable|parse-error|package-error|\nfloating-point-underflow|floating-point-overflow|floating-point-invalid-operation|floating-point-inexact|file-error|error|end-of-file|\ndivision-by-zero|control-error|condition|cell-error|arithmetic-error)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'support.type.exception.commonlisp' + }, + constant: { + patterns: [ + { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:t|single-float-negative-epsilon|single-float-epsilon|short-float-negative-epsilon|short-float-epsilon|pi|\nnil|multiple-values-limit|most-positive-single-float|most-positive-short-float|most-positive-long-float|\nmost-positive-fixnum|most-positive-double-float|most-negative-single-float|most-negative-short-float|\nmost-negative-long-float|most-negative-fixnum|most-negative-double-float|long-float-negative-epsilon|\nlong-float-epsilon|least-positive-single-float|least-positive-short-float|least-positive-normalized-single-float|\nleast-positive-normalized-short-float|least-positive-normalized-long-float|least-positive-normalized-double-float|\nleast-positive-long-float|least-positive-double-float|least-negative-single-float|least-negative-short-float|\nleast-negative-normalized-single-float|least-negative-normalized-short-float|least-negative-normalized-long-float|\nleast-negative-normalized-double-float|least-negative-long-float|least-negative-double-float|lambda-parameters-limit|\nlambda-list-keywords|internal-time-units-per-second|double-float-negative-epsilon|double-float-epsilon|char-code-limit|\ncall-arguments-limit|boole-xor|boole-set|boole-orc2|boole-orc1|boole-nor|boole-nand|boole-ior|boole-eqv|boole-clr|\nboole-c2|boole-c1|boole-andc2|boole-andc1|boole-and|boole-2|boole-1|array-total-size-limit|array-rank-limit|array-dimension-limit)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'constant.language.commonlisp' + }, + { + match: + '(?x)\n(?<=^|\\s|\\() # preceded by space or (\n([+-]?[0-9]+(?:\\/[0-9]+)*| # ratio\n[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?| # integer, float\n(\\#b|\\#B)[01\\/+-]+|(\\#o|\\#O)[0-7\\/+-]+|(\\#x|\\#X)[0-9a-fA-F\\/+-]+|(\\#[0-9]+[rR]?)[0-9a-zA-Z\\/+-]+)\n(?=(\\s|\\))) # followed by space, )', + name: 'constant.numeric.commonlisp' + }, + { + match: '(?xi)\n(?<=\\s) # preceded by space or (\n(\\.)\n(?=\\s)', + name: 'variable.other.constant.dot.commonlisp' + }, + { + match: + '(?x)\n(?<=^|\\s|\\() # preceded by space or (\n([+-]?[0-9]*\\.[0-9]*((e|s|f|d|l|E|S|F|D|L)[+-]?[0-9]+)?|\n[+-]?[0-9]+(\\.[0-9]*)?(e|s|f|d|l|E|S|F|D|L)[+-]?[0-9]+)\n(?=(\\s|\\))) # followed by space, )', + name: 'constant.numeric.commonlisp' + } + ] + }, + declaration: { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:type|speed|special|space|safety|optimize|notinline|inline|ignore|ignorable|ftype|dynamic-extent|declaration|debug|compilation-speed)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'storage.type.function.declaration.commonlisp' + }, + 'def-name': { + patterns: [ + { + captures: { + 1: {name: 'storage.type.function.defname.commonlisp'}, + 3: {name: 'storage.type.function.defname.commonlisp'}, + 4: {name: 'variable.other.constant.defname.commonlisp'}, + 6: { + patterns: [ + {include: '#package'}, + {match: '\\S+?', name: 'entity.name.function.commonlisp'} + ] + }, + 7: {name: 'variable.other.constant.defname.commonlisp'}, + 9: { + patterns: [ + {include: '#package'}, + {match: '\\S+?', name: 'entity.name.function.commonlisp'} + ] + } + }, + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by (\n(defun|defsetf|defmethod|defmacro|define-symbol-macro|define-setf-expander|\ndefine-modify-macro|define-method-combination|define-compiler-macro|defgeneric) #1 keywords\n\\s+\n( \\(\\s*\n ([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+) #3\n \\s*\n ((,@|,\\.|,)?) #4\n ([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?) #6 (<3>something+ <6>name)\n |\n ((,@|,\\.|,)?) #7\n ([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?) #9 name\n) #2\n(?=(\\s|\\(|\\)))' + }, + { + captures: { + 1: {name: 'storage.type.function.defname.commonlisp'}, + 2: {name: 'entity.name.type.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\()\n(deftype|defpackage|define-condition|defclass) # keywords\n\\s+\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?) # name\n(?=(\\s|\\(|\\)))' + }, + { + captures: { + 1: {name: 'storage.type.function.defname.commonlisp'}, + 2: { + patterns: [ + {include: '#package'}, + { + match: '\\S+?', + name: 'variable.other.constant.defname.commonlisp' + } + ] + } + }, + match: + '(?xi)\n(?<=^|\\s|\\()\n(defconstant) # keywords\n\\s+\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?) # name\n(?=(\\s|\\(|\\)))' + }, + { + captures: {1: {name: 'storage.type.function.defname.commonlisp'}}, + match: + '(?xi)\n(?<=^|\\s|\\()\n(defvar|defparameter) # keywords\n\\s+\n(?=(\\s|\\(|\\)))' + }, + { + captures: { + 1: {name: 'storage.type.function.defname.commonlisp'}, + 2: {name: 'entity.name.type.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\()\n(defstruct) # keywords\n\\s+\\(?\\s*\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?) # name\n(?=(\\s|\\(|\\)))' + }, + { + captures: { + 1: {name: 'keyword.control.commonlisp'}, + 2: { + patterns: [ + {include: '#package'}, + {match: '\\S+?', name: 'entity.name.function.commonlisp'} + ] + } + }, + match: + '(?xi)\n(?<=^|\\s|\\()\n(macrolet|labels|flet) # keywords\n\\s+\\(\\s*\\(\\s*\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?) # name\n(?=(\\s|\\(|\\)))' + } + ] + }, + escape: { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:\\#\\\\\\S+?)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'constant.character.escape.commonlisp' + }, + function: { + patterns: [ + { + match: + "(?xi)\n(?<=^|\\s|\\(|\\#') # preceded by space or (\n(?:values|third|tenth|symbol-value|symbol-plist|symbol-function|svref|subseq|sixth|seventh|second|schar|sbit|row-major-aref|\n rest|readtable-case|nth|ninth|mask-field|macro-function|logical-pathname-translations|ldb|gethash|getf|get|fourth|first|\n find-class|fill-pointer|fifth|fdefinition|elt|eighth|compiler-macro-function|char|cdr|cddr|cdddr|cddddr|cdddar|cddar|cddadr|\n cddaar|cdar|cdadr|cdaddr|cdadar|cdaar|cdaadr|cdaaar|car|cadr|caddr|cadddr|caddar|cadar|cadadr|cadaar|caar|caadr|caaddr|caadar|\n caaar|caaadr|caaaar|bit|aref)\n(?=(\\s|\\(|\\))) # followed by space, ( or )", + name: 'support.function.accessor.commonlisp' + }, + { + match: + "(?xi)\n(?<=^|\\s|\\(|\\#') # preceded by space or (\n(?:yes-or-no-p|y-or-n-p|write-sequence|write-char|write-byte|warn|vector-pop|use-value|use-package|unuse-package|union|unintern|\nunexport|terpri|tailp|substitute-if-not|substitute-if|substitute|subst-if-not|subst-if|subst|sublis|string-upcase|string-downcase|\nstring-capitalize|store-value|sleep|signal|shadowing-import|shadow|set-syntax-from-char|set-macro-character|set-exclusive-or|\nset-dispatch-macro-character|set-difference|set|rplacd|rplaca|room|reverse|revappend|require|replace|remprop|remove-if-not|remove-if|\nremove-duplicates|remove|remhash|read-sequence|read-byte|random|provide|pprint-tabular|pprint-newline|pprint-linear|pprint-fill|\nnunion|nsubstitute-if-not|nsubstitute-if|nsubstitute|nsubst-if-not|nsubst-if|nsubst|nsublis|nstring-upcase|nstring-downcase|nstring-capitalize|\nnset-exclusive-or|nset-difference|nreverse|nreconc|nintersection|nconc|muffle-warning|method-combination-error|maphash|makunbound|ldiff|\ninvoke-restart-interactively|invoke-restart|invoke-debugger|invalid-method-error|intersection|inspect|import|get-output-stream-string|\nget-macro-character|get-dispatch-macro-character|gentemp|gensym|fresh-line|fill|file-position|export|describe|delete-if-not|delete-if|\ndelete-duplicates|delete|continue|clrhash|close|clear-input|break|abort)\n(?=(\\s|\\(|\\))) # followed by space, ( or )", + name: 'support.function.f.sideeffects.commonlisp' + }, + { + match: + "(?xi)\n(?<=^|\\s|\\(|\\#') # preceded by space or (\n(?:zerop|write-to-string|write-string|write-line|write|wild-pathname-p|vectorp|vector-push-extend|vector-push|vector|values-list|\nuser-homedir-pathname|upper-case-p|upgraded-complex-part-type|upgraded-array-element-type|unread-char|unbound-slot-instance|typep|type-of|\ntype-error-expected-type|type-error-datum|two-way-stream-output-stream|two-way-stream-input-stream|truncate|truename|tree-equal|translate-pathname|\ntranslate-logical-pathname|tanh|tan|synonym-stream-symbol|symbolp|symbol-package|symbol-name|sxhash|subtypep|subsetp|stringp|string>=|string>|\nstring=|string<=|string<|string\\/=|string-trim|string-right-trim|string-not-lessp|string-not-greaterp|string-not-equal|string-lessp|\nstring-left-trim|string-greaterp|string-equal|string|streamp|stream-external-format|stream-error-stream|stream-element-type|standard-char-p|\nstable-sort|sqrt|special-operator-p|sort|some|software-version|software-type|slot-value|slot-makunbound|slot-exists-p|slot-boundp|sinh|sin|\nsimple-vector-p|simple-string-p|simple-condition-format-control|simple-condition-format-arguments|simple-bit-vector-p|signum|short-site-name|\nset-pprint-dispatch|search|scale-float|round|restart-name|rename-package|rename-file|rem|reduce|realpart|realp|readtablep|\nread-preserving-whitespace|read-line|read-from-string|read-delimited-list|read-char-no-hang|read-char|read|rationalp|rationalize|\nrational|rassoc-if-not|rassoc-if|rassoc|random-state-p|proclaim|probe-file|print-not-readable-object|print|princ-to-string|princ|\nprin1-to-string|prin1|pprint-tab|pprint-indent|pprint-dispatch|pprint|position-if-not|position-if|position|plusp|phase|peek-char|pathnamep|\npathname-version|pathname-type|pathname-name|pathname-match-p|pathname-host|pathname-directory|pathname-device|pathname|parse-namestring|\nparse-integer|pairlis|packagep|package-used-by-list|package-use-list|package-shadowing-symbols|package-nicknames|package-name|package-error-package|\noutput-stream-p|open-stream-p|open|oddp|numerator|numberp|null|nthcdr|notevery|notany|not|next-method-p|nbutlast|namestring|name-char|mod|mismatch|\nminusp|min|merge-pathnames|merge|member-if-not|member-if|member|max|maplist|mapl|mapcon|mapcar|mapcan|mapc|map-into|map|make-two-way-stream|\nmake-synonym-stream|make-symbol|make-string-output-stream|make-string-input-stream|make-string|make-sequence|make-random-state|make-pathname|\nmake-package|make-load-form-saving-slots|make-list|make-hash-table|make-echo-stream|make-dispatch-macro-character|make-condition|\nmake-concatenated-stream|make-broadcast-stream|make-array|macroexpand-1|macroexpand|machine-version|machine-type|machine-instance|lower-case-p|\nlong-site-name|logxor|logtest|logorc2|logorc1|lognot|lognor|lognand|logior|logical-pathname|logeqv|logcount|logbitp|logandc2|logandc1|logand|\nlog|load-logical-pathname-translations|load|listp|listen|list-length|list-all-packages|list\\*|list|lisp-implementation-version|\nlisp-implementation-type|length|ldb-test|lcm|last|keywordp|isqrt|intern|interactive-stream-p|integerp|integer-length|integer-decode-float|\ninput-stream-p|imagpart|identity|host-namestring|hash-table-test|hash-table-size|hash-table-rehash-threshold|hash-table-rehash-size|hash-table-p|\nhash-table-count|graphic-char-p|get-universal-time|get-setf-expansion|get-properties|get-internal-run-time|get-internal-real-time|\nget-decoded-time|gcd|functionp|function-lambda-expression|funcall|ftruncate|fround|format|force-output|fmakunbound|floor|floatp|float-sign|\nfloat-radix|float-precision|float-digits|float|finish-output|find-symbol|find-restart|find-package|find-if-not|find-if|find-all-symbols|find|\nfile-write-date|file-string-length|file-namestring|file-length|file-error-pathname|file-author|ffloor|fceiling|fboundp|expt|exp|every|evenp|\neval|equalp|equal|eql|eq|ensure-generic-function|ensure-directories-exist|enough-namestring|endp|encode-universal-time|ed|echo-stream-output-stream|\necho-stream-input-stream|dribble|dpb|disassemble|directory-namestring|directory|digit-char-p|digit-char|deposit-field|denominator|delete-package|\ndelete-file|decode-universal-time|decode-float|count-if-not|count-if|count|cosh|cos|copy-tree|copy-symbol|copy-structure|copy-seq|copy-readtable|\ncopy-pprint-dispatch|copy-list|copy-alist|constantp|constantly|consp|cons|conjugate|concatenated-stream-streams|concatenate|compute-restarts|\ncomplexp|complex|complement|compiled-function-p|compile-file-pathname|compile-file|compile|coerce|code-char|clear-output|class-of|cis|characterp|\ncharacter|char>=|char>|char=|char<=|char<|char\\/=|char-upcase|char-not-lessp|char-not-greaterp|char-not-equal|char-name|char-lessp|char-int|\nchar-greaterp|char-equal|char-downcase|char-code|cerror|cell-error-name|ceiling|call-next-method|byte-size|byte-position|byte|butlast|\nbroadcast-stream-streams|boundp|both-case-p|boole|bit-xor|bit-vector-p|bit-orc2|bit-orc1|bit-not|bit-nor|bit-nand|bit-ior|bit-eqv|bit-andc2|\nbit-andc1|bit-and|atom|atanh|atan|assoc-if-not|assoc-if|assoc|asinh|asin|ash|arrayp|array-total-size|array-row-major-index|array-rank|\narray-in-bounds-p|array-has-fill-pointer-p|array-element-type|array-displacement|array-dimensions|array-dimension|arithmetic-error-operation|\narithmetic-error-operands|apropos-list|apropos|apply|append|alphanumericp|alpha-char-p|adjustable-array-p|adjust-array|adjoin|acosh|acos|acons|\nabs|>=|>|=|<=|<|1-|1\\+|\\/=|\\/|-|\\+|\\*)\n(?=(\\s|\\(|\\))) # followed by space, ( or )", + name: 'support.function.f.sideeffects.commonlisp' + }, + { + match: + "(?xi)\n(?<=^|\\s|\\(|\\#') # preceded by space or (\n(?:variable|update-instance-for-redefined-class|update-instance-for-different-class|structure|slot-unbound|slot-missing|shared-initialize|\nremove-method|print-object|no-next-method|no-applicable-method|method-qualifiers|make-load-form|make-instances-obsolete|make-instance|\ninitialize-instance|function-keywords|find-method|documentation|describe-object|compute-applicable-methods|compiler-macro|class-name|\nchange-class|allocate-instance|add-method)\n(?=(\\s|\\(|\\))) # followed by space, ( or )", + name: 'support.function.sgf.nosideeffects.commonlisp' + }, + { + match: + "(?xi)\n(?<=^|\\s|\\(|\\#') # preceded by space or (\n(?:reinitialize-instance)\n(?=(\\s|\\(|\\))) # followed by space, ( or )", + name: 'support.function.sgf.sideeffects.commonlisp' + }, + { + match: + "(?xi)\n(?<=^|\\s|\\(|\\#') # preceded by space or (\n(?:satisfies)\n(?=(\\s|\\(|\\))) # followed by space, ( or )", + name: 'support.function.typespecifier.commonlisp' + } + ] + }, + 'lambda-list': { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:&[#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?|&whole|&rest|&optional|&key|&environment|&body|&aux|&allow-other-keys)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'keyword.other.lambdalist.commonlisp' + }, + macro: { + patterns: [ + { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:with-standard-io-syntax|with-slots|with-simple-restart|with-package-iterator|with-hash-table-iterator|with-condition-restarts|\nwith-compilation-unit|with-accessors|when|unless|typecase|time|step|shiftf|setf|rotatef|return|restart-case|restart-bind|psetf|prog2|prog1|\nprog\\*|prog|print-unreadable-object|pprint-logical-block|pprint-exit-if-list-exhausted|or|nth-value|multiple-value-setq|multiple-value-list|\nmultiple-value-bind|make-method|loop|lambda|ignore-errors|handler-case|handler-bind|formatter|etypecase|dotimes|dolist|do-symbols|do-external-symbols|\ndo-all-symbols|do\\*|do|destructuring-bind|defun|deftype|defstruct|defsetf|defpackage|defmethod|defmacro|define-symbol-macro|define-setf-expander|\ndefine-condition|define-compiler-macro|defgeneric|defconstant|defclass|declaim|ctypecase|cond|call-method|assert|and)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'storage.type.function.m.nosideeffects.commonlisp' + }, + { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:with-output-to-string|with-open-stream|with-open-file|with-input-from-string|untrace|trace|remf|pushnew|push|psetq|pprint-pop|pop|\notherwise|loop-finish|incf|in-package|ecase|defvar|defparameter|define-modify-macro|define-method-combination|decf|check-type|ccase|case)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'storage.type.function.m.sideeffects.commonlisp' + }, + { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:setq)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'storage.type.function.specialform.commonlisp' + } + ] + }, + package: { + patterns: [ + { + captures: { + 2: {name: 'support.type.package.commonlisp'}, + 3: {name: 'support.type.package.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\n ([A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?) #2\n | \n (\\#) #3\n)\n(?=\\:\\:|\\:)' + } + ] + }, + punctuation: { + patterns: [ + { + match: + "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n('|`)\n(?=\\S)", + name: 'variable.other.constant.singlequote.commonlisp' + }, + { + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(?:\\:[#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'entity.name.variable.commonlisp' + }, + { + captures: { + 1: {name: 'variable.other.constant.sharpsign.commonlisp'}, + 2: {name: 'constant.numeric.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#)([0-9]*)\n(?=\\()' + }, + { + captures: { + 1: {name: 'variable.other.constant.sharpsign.commonlisp'}, + 2: {name: 'constant.numeric.commonlisp'}, + 3: {name: 'variable.other.constant.sharpsign.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#)\n([0-9]*)\n(\\*)\n(?=0|1)' + }, + { + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#\\*|\\#0\\*)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'variable.other.constant.sharpsign.commonlisp' + }, + { + captures: { + 1: {name: 'variable.other.constant.sharpsign.commonlisp'}, + 2: {name: 'constant.numeric.commonlisp'}, + 3: {name: 'variable.other.constant.sharpsign.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#)\n([0-9]+)\n(a|A)\n(?=.)' + }, + { + captures: { + 1: {name: 'variable.other.constant.sharpsign.commonlisp'}, + 2: {name: 'constant.numeric.commonlisp'}, + 3: {name: 'variable.other.constant.sharpsign.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#)\n([0-9]+)\n(=)\n(?=.)' + }, + { + captures: { + 1: {name: 'variable.other.constant.sharpsign.commonlisp'}, + 2: {name: 'constant.numeric.commonlisp'}, + 3: {name: 'variable.other.constant.sharpsign.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#)\n([0-9]+)\n(\\#)\n(?=.)' + }, + { + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#(\\+|-))\n(?=\\S)', + name: 'variable.other.constant.sharpsign.commonlisp' + }, + { + match: + "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#('|,|\\.|c|C|s|S|p|P))\n(?=\\S)", + name: 'variable.other.constant.sharpsign.commonlisp' + }, + { + captures: {1: {name: 'support.type.package.commonlisp'}}, + match: + '(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,) # preceded by space , ( or `,`|`,@`|`,.`\n(\\#)\n(:)\n(?=\\S)' + }, + { + captures: { + 2: {name: 'variable.other.constant.backquote.commonlisp'}, + 3: {name: 'variable.other.constant.backquote.commonlisp'}, + 4: {name: 'variable.other.constant.backquote.commonlisp'}, + 5: {name: 'variable.other.constant.backquote.commonlisp'} + }, + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(\n (`\\#) #2\n |\n (`)(,@|,\\.|,)? #3, #4\n |\n (,@|,\\.|,) #5\n)\n(?=\\S)' + } + ] + }, + 'special-operator': { + captures: {2: {name: 'keyword.control.commonlisp'}}, + match: + '(?xi)\n(\\(\\s*) # preceded by (\n(unwind-protect|throw|the|tagbody|symbol-macrolet|return-from|quote|progv|progn|multiple-value-prog1|multiple-value-call|\nmacrolet|locally|load-time-value|let\\*|let|labels|if|go|function|flet|eval-when|catch|block)\n(?=(\\s|\\(|\\))) # followed by space, ( or )' + }, + string: { + begin: '(")', + beginCaptures: { + 1: {name: 'punctuation.definition.string.begin.commonlisp'} + }, + end: '(")', + endCaptures: {1: {name: 'punctuation.definition.string.end.commonlisp'}}, + name: 'string.quoted.double.commonlisp', + patterns: [ + {match: '\\\\.', name: 'constant.character.escape.commonlisp'}, + { + captures: { + 1: {name: 'storage.type.function.formattedstring.commonlisp'}, + 10: {name: 'storage.type.function.formattedstring.commonlisp'}, + 2: {name: 'variable.other.constant.formattedstring.commonlisp'}, + 8: {name: 'storage.type.function.formattedstring.commonlisp'} + }, + match: + "(?xi)\n\n(~) #1 tilde\n(\n (\n (([+-]?[0-9]+)|('.)|V|\\#)*?\n (,)?\n )\n*?) #2 prefix parameters, signed decimal numbers|single char, separated by commas\n(\n (:@|@:|:|@)\n?) #8 modifiers\n(\\(|\\)|\\[|\\]|;|{|}|<|>|\\^) #10 control structures" + }, + { + captures: { + 1: {name: 'entity.name.variable.commonlisp'}, + 10: {name: 'entity.name.variable.commonlisp'}, + 2: {name: 'variable.other.constant.formattedstring.commonlisp'}, + 8: {name: 'entity.name.variable.commonlisp'} + }, + match: + "(?xi)\n\n(~) #1 tilde\n(\n (\n (([+-]?[0-9]+)|('.)|V|\\#)*?\n (,)?\n )\n*?) #2 prefix parameters, signed decimal numbers|single char, separated by commas\n(\n (:@|@:|:|@)\n?) #8 modifiers\n(A|S|D|B|O|X|R|P|C|F|E|G|\\$|%|\\&|\\||~|T|\\*|\\?|_|W|I) #10 directives" + }, + { + captures: { + 1: {name: 'entity.name.variable.commonlisp'}, + 10: {name: 'entity.name.variable.commonlisp'}, + 11: {name: 'entity.name.variable.commonlisp'}, + 12: {name: 'entity.name.variable.commonlisp'}, + 2: {name: 'variable.other.constant.formattedstring.commonlisp'}, + 8: {name: 'entity.name.variable.commonlisp'} + }, + match: + "(?xi)\n\n(~) #1 tilde\n(\n (\n (([+-]?[0-9]+)|('.)|V|\\#)*?\n (,)?\n )\n*?) #2 prefix parameters, signed decimal numbers|single char, separated by commas\n(\n (:@|@:|:|@)\n?) #8 modifiers\n(\\/) #10\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?) #11 call function\n(\\/) #12" + }, + { + match: '(~\\n)', + name: 'variable.other.constant.formattedstring.commonlisp' + } + ] + }, + 'style-guide': { + patterns: [ + { + captures: {3: {name: 'source.commonlisp'}}, + match: + "(?xi)\n(?<=^'|\\s'|\\('|,@'|,\\.'|,')\n(\\S+?)\n(\\:\\:|\\:)\n((\\+[^\\s\\+]+\\+)|(\\*[^\\s\\*]+\\*))\n(?=(\\s|\\(|\\)))" + }, + { + match: + '(?xi)\n(?<=\\S:|^|\\s|\\() # preceded by space or (\n(\\+[^\\s\\+]+\\+)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'variable.other.constant.earmuffsplus.commonlisp' + }, + { + match: + '(?xi)\n(?<=\\S:|^|\\s|\\() # preceded by space or (\n(\\*[^\\s\\*]+\\*)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'string.regexp.earmuffsasterisk.commonlisp' + } + ] + }, + symbol: { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:method-combination|declare)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'storage.type.function.symbol.commonlisp' + }, + type: { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:unsigned-byte|standard-char|standard|single-float|simple-vector|simple-string|simple-bit-vector|simple-base-string|simple-array|\nsigned-byte|short-float|long-float|keyword|fixnum|extended-char|double-float|compiled-function|boolean|bignum|base-string|base-char)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'support.type.t.commonlisp' + }, + variable: { + patterns: [ + { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:\\*trace-output\\*|\\*terminal-io\\*|\\*standard-output\\*|\\*standard-input\\*|\\*readtable\\*|\\*read-suppress\\*|\\*read-eval\\*|\n\\*read-default-float-format\\*|\\*read-base\\*|\\*random-state\\*|\\*query-io\\*|\\*print-right-margin\\*|\\*print-readably\\*|\\*print-radix\\*|\\*print-pretty\\*|\n\\*print-pprint-dispatch\\*|\\*print-miser-width\\*|\\*print-lines\\*|\\*print-level\\*|\\*print-length\\*|\\*print-gensym\\*|\\*print-escape\\*|\\*print-circle\\*|\n\\*print-case\\*|\\*print-base\\*|\\*print-array\\*|\\*package\\*|\\*modules\\*|\\*macroexpand-hook\\*|\\*load-verbose\\*|\\*load-truename\\*|\\*load-print\\*|\n\\*load-pathname\\*|\\*gensym-counter\\*|\\*features\\*|\\*error-output\\*|\\*default-pathname-defaults\\*|\\*debugger-hook\\*|\\*debug-io\\*|\\*compile-verbose\\*|\n\\*compile-print\\*|\\*compile-file-truename\\*|\\*compile-file-pathname\\*|\\*break-on-signals\\*)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'string.regexp.earmuffsasterisk.commonlisp' + }, + { + match: + '(?xi)\n(?<=^|\\s|\\() # preceded by space or (\n(?:\\*\\*\\*|\\*\\*|\\+\\+\\+|\\+\\+|\\/\\/\\/|\\/\\/)\n(?=(\\s|\\(|\\))) # followed by space, ( or )', + name: 'variable.other.repl.commonlisp' + } + ] + } + }, + scopeName: 'source.commonlisp' +} + +export default grammar diff --git a/lang/source.cs.js b/lang/source.cs.js index 50e6809..300ce32 100644 --- a/lang/source.cs.js +++ b/lang/source.cs.js @@ -5,7 +5,7 @@ // See for more info. /** @type {import('../lib/index.js').Grammar} */ const grammar = { - extensions: ['.bf', '.cake', '.cs', '.csx', '.eq', '.linq', '.uno'], + extensions: ['.bf', '.cake', '.cs', '.cs.pp', '.csx', '.eq', '.linq', '.uno'], names: ['beef', 'c#', 'cake', 'cakescript', 'csharp', 'eq', 'uno'], patterns: [ {include: '#preprocessor'}, @@ -958,7 +958,7 @@ const grammar = { endCaptures: {0: {name: 'punctuation.parenthesis.close.cs'}}, patterns: [ { - begin: '\\G', + begin: '(?=[^;\\)])', end: '(?=;|\\))', patterns: [ {include: '#intrusive'}, @@ -994,13 +994,14 @@ const grammar = { {include: '#intrusive'}, { captures: { - 1: {name: 'storage.type.var.cs'}, - 2: {patterns: [{include: '#type'}]}, - 7: {name: 'entity.name.variable.local.cs'}, - 8: {name: 'keyword.control.loop.in.cs'} + 1: {name: 'storage.modifier.ref.cs'}, + 2: {name: 'storage.type.var.cs'}, + 3: {patterns: [{include: '#type'}]}, + 8: {name: 'entity.name.variable.local.cs'}, + 9: {name: 'keyword.control.loop.in.cs'} }, match: - '(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b' + '(?x)\n(?:\n (?:(\\bref)\\s+)?(\\bvar\\b)| # ref local\n (?\n (?:\n (?:ref\\s+)? # ref local\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b' }, { captures: { @@ -1031,6 +1032,12 @@ const grammar = { patterns: [ {match: '\\bclass\\b', name: 'storage.type.class.cs'}, {match: '\\bstruct\\b', name: 'storage.type.struct.cs'}, + {match: '\\bdefault\\b', name: 'keyword.other.constraint.default.cs'}, + {match: '\\bnotnull\\b', name: 'keyword.other.constraint.notnull.cs'}, + { + match: '\\bunmanaged\\b', + name: 'keyword.other.constraint.unmanaged.cs' + }, { captures: { 1: {name: 'keyword.operator.expression.new.cs'}, @@ -1164,10 +1171,12 @@ const grammar = { patterns: [ {include: '#preprocessor'}, {include: '#comment'}, + {include: '#storage-modifier'}, {include: '#property-declaration'}, {include: '#event-declaration'}, {include: '#indexer-declaration'}, {include: '#method-declaration'}, + {include: '#operator-declaration'}, {include: '#attribute-section'}, {include: '#punctuation-semicolon'} ] diff --git a/lang/source.csound.js b/lang/source.csound.js index 49f4c02..8219963 100644 --- a/lang/source.csound.js +++ b/lang/source.csound.js @@ -377,7 +377,7 @@ const grammar = { 4: {name: 'type-annotation.storage.type.csound'} }, match: - '(?:\\b(ATS(?:add(?:(?:nz)?)|bufread|cross|in(?:fo|terpread)|partialtap|read(?:(?:nz)?)|sinnoi)|FL(?:b(?:ox|ut(?:Bank|ton))|c(?:loseButton|o(?:lor(?:(?:2)?)|unt))|execButton|g(?:etsnap|roup(?:(?:(?:E|_e)nd)?))|h(?:ide|vsBox(?:(?:SetValue)?))|joy|k(?:eyIn|nob)|l(?:abel|oadsnap)|mouse|p(?:a(?:ck(?:(?:(?:E|_e)nd)?)|nel(?:(?:(?:E|_e)nd)?))|rintk(?:(?:2)?))|r(?:oller|un)|s(?:avesnap|croll(?:(?:(?:E|_e)nd)?)|et(?:Align|Box|Color(?:(?:2)?)|Font|Position|S(?:ize|napGroup)|Text(?:(?:Color|(?:Siz|Typ)e)?)|Val(?:(?:(?:(?:_)?)i)?)|snap)|how|lid(?:Bnk(?:(?:2(?:(?:Set(?:(?:k)?))?)|GetHandle|Set(?:(?:k)?))?)|er))|t(?:abs(?:(?:(?:E|_e)nd)?)|ext)|update|v(?:alue|keybd|slidBnk(?:(?:2)?))|xyin)|Jacko(?:Audio(?:In(?:(?:Connect)?)|Out(?:(?:Connect)?))|Freewheel|In(?:fo|it)|Midi(?:(?:InConnec|Ou(?:(?:tConnec)?))t)|NoteOut|On|Transport)|K35_(?:(?:[hl])pf)|Mixer(?:Clear|GetLevel|Receive|Se(?:nd|tLevel(?:(?:_i)?)))|OSC(?:bundle|count|init(?:(?:M)?)|listen|raw|send(?:(?:_lo)?))|STK(?:B(?:andedWG|eeThree|low(?:Botl|Hole)|owed|rass)|Clarinet|Drummer|F(?:MVoices|lute)|HevyMetl|M(?:andolin|o(?:dalBar|og))|P(?:ercFlut|lucked)|R(?:esonate|hodey)|S(?:axofony|hakers|i(?:mple|tar)|tifKarp)|TubeBell|VoicForm|W(?:histle|urley))|a(?:bs|ctive|ds(?:r|yn(?:(?:t(?:(?:2)?))?))|ftouch|l(?:lpole|pass|wayson)|mp(?:db(?:(?:fs)?)|midi(?:(?:curve|d)?))|poleparams|r(?:duino(?:Read(?:(?:F)?)|St(?:art|op))|eson(?:(?:k)?))|tone(?:(?:[kx])?)|utocorr)|b(?:a(?:bo|lance(?:(?:2)?)|mboo|rmodel)|bcut(?:[ms])|e(?:(?:tara|xpr)nd)|form(?:dec(?:[12])|enc1)|i(?:nit|quad(?:(?:a)?)|rnd)|ob|pf(?:(?:cos)?)|qrez|u(?:t(?:b(?:[pr])|hp|lp|t(?:er(?:b(?:[pr])|(?:[hl])p)|on))|zz))|c(?:2r|a(?:basa|uchy(?:(?:i)?))|brt|e(?:il|ll|nt(?:(?:roid)?)|ps(?:(?:inv)?))|h(?:an(?:ctrl|ged(?:(?:2)?)|[io])|e(?:byshevpoly|ckbox)|n(?:_(?:[Sak])|clear|export|get(?:(?:ks|[aiks])?)|mix|params|set(?:(?:ks|[aiks])?))|uap)|l(?:ear|filt|ip|ocko(?:ff|n))|mp(?:(?:lxprod)?)|nt(?:C(?:reate|ycles)|Delete(?:(?:_i)?)|Re(?:ad|set)|State)|o(?:m(?:b(?:(?:inv)?)|p(?:ile(?:csd|orc|str)|ress(?:(?:2)?)))|n(?:nect|trol|v(?:(?:l|olv)e))|py(?:a2ftab|f2array)|s(?:(?:h|inv|seg(?:(?:[br])?))?)|unt(?:(?:_i)?))|p(?:s(?:2pch|midi(?:(?:b|nn)?)|oct|pch|t(?:mid|un(?:(?:i)?))|xpch)|u(?:meter|prc))|r(?:oss(?:2|fm(?:(?:i|pm(?:(?:i)?))?)|pm(?:(?:i)?))|unch)|t(?:lchn|rl(?:14|21|7|init|pr(?:eset|int(?:(?:presets)?))|s(?:ave|elect)))|userrnd)|d(?:a(?:m|te(?:(?:s)?))|b(?:(?:(?:(?:fs)?)amp)?)|c(?:block(?:(?:2)?)|onv|t(?:(?:inv)?))|e(?:interleave|l(?:ay(?:(?:[1krw])?)|tap(?:(?:xw|[3inx])?))|norm)|i(?:ff|ode_ladder|rectory|s(?:k(?:grain|in(?:(?:2)?))|p(?:fft|lay)|tort(?:(?:1)?))|vz)|o(?:ppler|t|wnsamp)|ripwater|ssi(?:a(?:ctivate|udio)|ctls|(?:ini|lis)t)|u(?:mpk(?:(?:[234])?)|s(?:errnd|t(?:(?:2)?))))|e(?:nvlpx(?:(?:r)?)|phasor|qfil|v(?:alstr|ent(?:(?:_i)?))|x(?:citer|itnow|p(?:(?:curve|on|rand(?:(?:i)?)|seg(?:(?:ba|[abr])?))?)))|f(?:a(?:reylen(?:(?:i)?)|ust(?:audio|c(?:ompile|tl)|dsp|gen|play))|ft(?:(?:inv)?)|i(?:close|l(?:e(?:bit|len|nchnls|peak|s(?:cal|r)|valid)|larray|ter2)|n(?:(?:[ik])?)|open)|l(?:a(?:nger|shtxt)|oo(?:per(?:(?:2)?)|r)|uid(?:AllOut|C(?:C(?:[ik])|ontrol)|Engine|Info|Load|Note|Out|ProgramSelect|SetInterpMethod))|m(?:a(?:nal|x)|b(?:3|ell)|in|metal|od|percfl|(?:rhod|voic|wurli)e)|o(?:f(?:2|ilter)|l(?:d|low(?:(?:2)?))|scil(?:(?:i)?)|ut(?:(?:ir|[ik])?)|[fg])|print(?:(?:(?:k)?)s)|r(?:a(?:c(?:(?:talnoise)?)|mebuffer)|eeverb)|t(?:audio|c(?:hnls|onv|ps)|exists|free|gen(?:(?:once|tmp)?)|l(?:en|oad(?:(?:k)?)|ptim)|morf|om|print|resize(?:(?:i)?)|s(?:a(?:mplebank|ve(?:(?:k)?))|et|lice(?:(?:i)?)|r)))|g(?:a(?:in(?:(?:slider)?)|uss(?:(?:i|trig)?))|buzz|e(?:n(?:array(?:(?:_i)?)|dy(?:(?:[cx])?))|t(?:c(?:fg|ol)|ftargs|row|seed))|ogobel|ra(?:in(?:(?:[23])?)|nule)|t(?:adsr|f)|uiro)|h(?:armon(?:(?:[234])?)|df5(?:read|write)|ilbert(?:(?:2)?)|rtf(?:early|move(?:(?:2)?)|reverb|stat)|sboscil|vs(?:[123])|ypot)|i(?:hold|mage(?:create|free|getpixel|load|s(?:ave|etpixel|ize))|n(?:(?:32|ch|it(?:(?:c(?:14|21|7))?)|let(?:kid|[afkv])|rg|s(?:global|remot)|te(?:g|r(?:leave|p))|value|[hoqstxz])?))|j(?:acktransport|itter(?:(?:2)?)|oystick|spline)|l(?:a(?:_(?:i_(?:a(?:dd_(?:m(?:[cr])|v(?:[cr]))|ssign_(?:m(?:[cr])|t|v(?:[cr])))|conjugate_(?:m(?:[cr])|v(?:[cr]))|d(?:i(?:stance_v(?:[cr])|vide_(?:m(?:[cr])|v(?:[cr])))|ot_(?:m(?:c_vc|r_vr|[cr])|v(?:[cr])))|get_(?:m(?:[cr])|v(?:[cr]))|invert_m(?:[cr])|l(?:ower_solve_m(?:[cr])|u_(?:det_m(?:[cr])|factor_m(?:[cr])|solve_m(?:[cr])))|m(?:c_(?:create|set)|r_(?:create|set)|ultiply_(?:m(?:[cr])|v(?:[cr])))|norm(?:1_(?:m(?:[cr])|v(?:[cr]))|_(?:euclid_(?:m(?:[cr])|v(?:[cr]))|inf_(?:m(?:[cr])|v(?:[cr]))|max_m(?:[cr])))|print_(?:m(?:[cr])|v(?:[cr]))|qr_(?:eigen_m(?:[cr])|factor_m(?:[cr])|sym_eigen_m(?:[cr]))|random_(?:m(?:[cr])|v(?:[cr]))|s(?:ize_(?:m(?:[cr])|v(?:[cr]))|ubtract_(?:m(?:[cr])|v(?:[cr])))|t(?:_assign|ra(?:ce_m(?:[cr])|nspose_m(?:[cr])))|upper_solve_m(?:[cr])|v(?:c_(?:create|set)|r_(?:create|set)))|k_(?:a(?:_assign|dd_(?:m(?:[cr])|v(?:[cr]))|ssign_(?:m(?:[cr])|v(?:[cr])|[aft]))|c(?:onjugate_(?:m(?:[cr])|v(?:[cr]))|urrent_(?:f|vr))|d(?:i(?:stance_v(?:[cr])|vide_(?:m(?:[cr])|v(?:[cr])))|ot_(?:m(?:c_vc|r_vr|[cr])|v(?:[cr])))|f_assign|get_(?:m(?:[cr])|v(?:[cr]))|invert_m(?:[cr])|l(?:ower_solve_m(?:[cr])|u_(?:det_m(?:[cr])|factor_m(?:[cr])|solve_m(?:[cr])))|m(?:c_set|r_set|ultiply_(?:m(?:[cr])|v(?:[cr])))|norm(?:1_(?:m(?:[cr])|v(?:[cr]))|_(?:euclid_(?:m(?:[cr])|v(?:[cr]))|inf_(?:m(?:[cr])|v(?:[cr]))|max_m(?:[cr])))|qr_(?:eigen_m(?:[cr])|factor_m(?:[cr])|sym_eigen_m(?:[cr]))|random_(?:m(?:[cr])|v(?:[cr]))|subtract_(?:m(?:[cr])|v(?:[cr]))|t(?:_assign|race_m(?:[cr]))|upper_solve_m(?:[cr])|v(?:(?:[cr])_set)))|g(?:(?:ud)?)|stcycle)|enarray|f(?:o|sr)|i(?:mit(?:(?:1)?)|n(?:cos|e(?:(?:n(?:(?:r)?)|to)?)|k_(?:beat_(?:force|(?:ge|reques)t)|create|enable|is_enabled|metro|peers|tempo_(?:(?:[gs])et))|lin|rand|seg(?:(?:[br])?))|veconv)|o(?:cs(?:end|ig)|g(?:(?:10|2|btwo|curve)?)|op(?:seg(?:(?:p)?)|(?:[tx])seg)|renz|scil(?:(?:(?:(?:3)?)phs|[3x])?)|w(?:pass2|res(?:(?:x)?)))|p(?:c(?:anal|filter)|f(?:18|orm|reson)|hasor|interp|oscil(?:(?:sa(?:(?:2)?)|[3a])?)|re(?:ad|son)|s(?:hold(?:(?:p)?)|lot))|ufs)|m(?:a(?:ca|dsr|gs|nd(?:(?:[eo])l)|parray(?:(?:_i)?)|rimba|ssign|x(?:_k|a(?:bs(?:(?:accum)?)|ccum|lloc|rray))|[cx])|clock|delay|e(?:dian(?:(?:k)?)|tro(?:(?:2|bpm)?))|fb|i(?:d(?:global|i(?:arp|c(?:14|21|7|h(?:annelaftertouch|n)|ontrolchange|trl)|default|filestatus|in|noteo(?:ff|n(?:cps|key|oct|pch))|o(?:n(?:(?:2)?)|ut(?:(?:_i)?))|p(?:gm|itchbend|olyaftertouch|rogramchange)|tempo)|remot)|n(?:(?:a(?:bs(?:(?:accum)?)|ccum|rray)|cer)?)|rror)|o(?:d(?:e|matrix)|nitor|og(?:(?:ladder(?:(?:2)?)|vcf(?:(?:2)?))?)|scil)|p(?:3(?:bitrate|in|len|nchnls|out|s(?:cal|r))|ulse)|rtmsg|s2st|to(?:[fn])|u(?:ltitap|te)|v(?:c(?:hpf|lpf(?:[1234]))|mfilter)|xadsr)|n(?:chnls_hw|estedap|l(?:alp|filt(?:(?:2)?))|o(?:ise|t(?:eo(?:ff|n(?:(?:dur(?:(?:2)?))?))|num))|r(?:everb|pn)|s(?:amp|t(?:ance|r(?:num|str)))|t(?:o(?:[fm])|rpol)|xtpow2)|o(?:ct(?:ave|cps|midi(?:(?:b|nn)?)|pch)|labuffer|sc(?:bnk|il(?:(?:1i|ikt(?:(?:[ps])?)|[13insx])?))|ut(?:(?:32|all|ch|i(?:at|c(?:(?:14)?)|p(?:at|[bc]))|k(?:at|c(?:(?:14)?)|p(?:at|[bc]))|let(?:kid|[afkv])|q(?:[1234])|rg|s(?:[12])|value|[choqsxz])?))|p(?:5g(?:connect|data)|a(?:n(?:(?:2)?)|r(?:eq|t(?:2txt|i(?:als|kkel(?:(?:get|s(?:et|ync))?))))|ssign|ulstretch)|c(?:auchy|h(?:bend|midi(?:(?:b|nn)?)|oct|tom)|o(?:nvolve|unt))|d(?:clip|half(?:(?:y)?))|eak|gm(?:(?:assig|ch)n)|h(?:as(?:er(?:[12])|or(?:(?:bnk)?))|s)|i(?:n(?:dex|k(?:er|ish))|tch(?:(?:a(?:c|mdf))?))|l(?:a(?:net|terev)|(?:ltra|u)ck)|o(?:isson|l(?:2rect|y(?:aft|nomial))|rt(?:(?:k)?)|scil(?:(?:3)?)|w(?:(?:ershape|oftwo|s)?))|r(?:e(?:alloc|piano)|int(?:(?:_type|array|f_i|k(?:s2|[2s])|ln|sk|[fks])?)|oduct)|set|t(?:ablew|rack)|uts|v(?:add|bufread|cross|interp|oc|read|s(?:2(?:array|tab)|a(?:dsyn|nal|rp)|b(?:and(?:width|[pr])|in|lur|uf(?:fer|read(?:(?:2)?)))|c(?:ale|e(?:nt|ps)|(?:f|ros)s)|d(?:emix|is(?:kin|p))|envftw|f(?:ilter|r(?:e(?:ad|eze)|omarray)|t(?:[rw])|write)|g(?:ain|endy)|hift|i(?:fd|n(?:(?:fo|it)?))|l(?:ock|pc)|m(?:aska|ix|o(?:(?:ot|rp)h))|o(?:sc|ut)|pitch|t(?:anal|encil|race)|voc|warp|ynth))|wd|y(?:assign(?:(?:[it])?)|call(?:(?:1(?:[it])|2(?:[it])|3(?:[it])|4(?:[it])|5(?:[it])|6(?:[it])|7(?:[it])|8(?:[it])|ni|[12345678int])?)|e(?:val(?:(?:[it])?)|xec(?:(?:[it])?))|init|l(?:assign(?:(?:[it])?)|call(?:(?:1(?:[it])|2(?:[it])|3(?:[it])|4(?:[it])|5(?:[it])|6(?:[it])|7(?:[it])|8(?:[it])|ni|[12345678int])?)|e(?:val(?:(?:[it])?)|xec(?:(?:[it])?))|run(?:(?:[it])?))|run(?:(?:[it])?)))|q(?:inf|nan)|r(?:2c|and(?:(?:om(?:(?:[hi])?)|[chi])?)|bjeq|e(?:ad(?:clock|fi|k(?:[234s])|sc(?:ore|ratch)|[fk])|ct2pol|lease|mo(?:teport|ve)|pluck|s(?:hapearray|on(?:(?:bnk|xk|[krxyz])?)|yn)|verb(?:(?:2|sc)?)|windscore|zzy)|fft|ifft|ms|nd(?:(?:31|seed)?)|ound|spline|tclock)|s(?:16b14|32b14|a(?:mphold|ndpaper)|c(?:_(?:lag(?:(?:ud)?)|phasor|trig)|a(?:le(?:(?:2|array)?)|n(?:hammer|map|smap|table|u2|[su]))|hed(?:kwhen(?:(?:named)?)|ule(?:(?:k)?)|when)|oreline(?:(?:_i)?))|e(?:ed|kere|lect|mitone|nse(?:(?:key)?)|q(?:time(?:(?:2)?)|u)|rial(?:Begin|End|Flush|Print|Read|Write(?:(?:_i)?))|t(?:c(?:(?:o|tr)l)|ksmps|row|scorepos))|f(?:i(?:list|nstr(?:(?:3m|[3m])?))|lo(?:ad|oper)|p(?:assign|l(?:ay(?:(?:3m|[3m])?)|ist)|reset))|h(?:aker|ift(?:in|out))|i(?:gnum|n(?:(?:h|inv|syn)?))|kf|l(?:eighbells|i(?:cearray(?:(?:_i)?)|der(?:16(?:(?:f|table(?:(?:f)?))?)|32(?:(?:f|table(?:(?:f)?))?)|64(?:(?:f|table(?:(?:f)?))?)|8(?:(?:f|table(?:(?:f)?))?)|Kawai)))|nd(?:loop|warp(?:(?:st)?))|o(?:ck(?:recv(?:(?:s)?)|send(?:(?:s)?))|rt(?:[ad])|undin)|p(?:a(?:ce|t3d(?:(?:[it])?))|dist|f|litrig|rintf(?:(?:k)?)|send)|q(?:rt|uinewave)|t(?:2ms|atevar|errain|ix|r(?:c(?:at(?:(?:k)?)|har(?:(?:k)?)|mp(?:(?:k)?)|py(?:(?:k)?))|e(?:cv|son)|fromurl|get|in(?:dex(?:(?:k)?)|g2array)|l(?:en(?:(?:k)?)|ower(?:(?:k)?))|rindex(?:(?:k)?)|s(?:et|trip|ub(?:(?:k)?))|to(?:(?:[dl])k|[dl])|upper(?:(?:k)?))|send)|u(?:binstr(?:(?:init)?)|m(?:(?:array)?))|v(?:filter|n)|y(?:nc(?:grain|loop|phasor)|stem(?:(?:_i)?)))|t(?:a(?:b(?:2(?:array|pvs)|_i|ifd|le(?:(?:3kt|copy|filter(?:(?:i)?)|gpw|i(?:copy|gpw|kt|mix)|kt|mix|ng|ra|s(?:eg|huffle(?:(?:i)?))|w(?:a|kt)|x(?:kt|seg)|[3iw])?)|morph(?:(?:ak|[ai])?)|play|rec|sum|w(?:(?:_i)?))|mbourine|n(?:h|inv(?:(?:2)?))|[bn])|bvcf|emp(?:est|o(?:(?:(?:sc|v)al)?))|i(?:me(?:dseq|inst(?:[ks])|[ks])|val)|lineto|one(?:(?:[kx])?)|r(?:a(?:dsyn|n(?:dom|seg(?:(?:[br])?)))|cross|filter|highest|i(?:g(?:Expseg|Linseg|expseg|ger|hold|linseg|phasor|seq)|m(?:(?:_i)?)|rand)|lowest|mix|s(?:cale|(?:hif|pli)t))|urno(?:ff(?:(?:2_i|[23])?)|n)|vconv)|u(?:n(?:irand|wrap)|psamp|r(?:andom|d))|v(?:a(?:ctrol|dd(?:(?:_i|v(?:(?:_i)?))?)|get|lpass|set)|bap(?:(?:gmove|lsinit|(?:(?:z)?)move|[gz])?)|c(?:ella|lpf|o(?:(?:2(?:(?:(?:f|i(?:f|ni))t)?)|mb|py(?:(?:_i)?))?))|d(?:el(?:_k|ay(?:(?:x(?:w(?:[qs])|[qsw])|[3kx])?))|ivv(?:(?:_i)?))|e(?:cdelay|loc|xp(?:(?:_i|seg|v(?:(?:_i)?))?))|i(?:b(?:es|r(?:(?:ato)?))|ncr)|l(?:i(?:mit|nseg)|owres)|m(?:ap|irror|ult(?:(?:_i|v(?:(?:_i)?))?))|o(?:ice|sim)|p(?:haseseg|o(?:rt|w(?:(?:_i|v(?:(?:_i)?))?))|s|voc)|rand(?:[hi])|subv(?:(?:_i)?)|tab(?:le(?:1k|w(?:[aik])|[aik])|w(?:[aik])|[aik])|wrap)|w(?:aveset|e(?:bsocket|ibull)|g(?:b(?:ow(?:(?:edbar)?)|rass)|clar|flute|pluck(?:(?:2)?)|uide(?:[12]))|i(?:i(?:connect|data|range|send)|ndow)|r(?:ap|itescratch)|terrain(?:(?:2)?))|x(?:adsr|in|out|tratim|yscale)|z(?:a(?:cl|kinit|mod|rg|wm|[rw])|df_(?:1pole(?:(?:_mode)?)|2pole(?:(?:_mode)?)|ladder)|filter2|i(?:wm|[rw])|k(?:cl|mod|wm|[rw]))|[Saikp])\\b|\\b(OSCsendA|array|b(?:e(?:adsynt|osc)|form(?:(?:de|en)c)|uchla)|copy2(?:(?:[ft])tab)|getrowlin|hrtfer|ktableseg|l(?:entab|ua_(?:exec|i(?:aopcall(?:(?:_off)?)|kopcall(?:(?:_off)?)|opcall(?:(?:_off)?))|opdef))|m(?:axtab|intab|p3scal_(?:check|load(?:(?:2)?)|play(?:(?:2)?)))|p(?:op(?:(?:_f)?)|table(?:(?:iw|[3i])?)|ush(?:(?:_f)?)|vsgendy)|s(?:calet|ignalflowgraph|ndload|o(?:cksend_k|undout(?:(?:s)?))|pec(?:addm|di(?:ff|sp)|filt|hist|ptrk|s(?:cal|um)|trum)|tack|um(?:TableFilter|tab)|ystime)|t(?:ab(?:gen|leiw|map(?:(?:_i)?)|rowlin|slice)|b(?:0_init|1(?:(?:(?:[012345])?)_init|[012345])|(?:[23456789])_init|[0123456789]))|vbap(?:1(?:6|move)|(?:[48])move|[48])|x(?:scan(?:map|smap|[su])|yin))\\b)(?:(\\:)([A-Za-z]))?' + '(?:\\b(ATS(?:add(?:(?:nz)?)|bufread|cross|in(?:fo|terpread)|partialtap|read(?:(?:nz)?)|sinnoi)|FL(?:b(?:ox|ut(?:Bank|ton))|c(?:loseButton|o(?:lor(?:(?:2)?)|unt))|execButton|g(?:etsnap|roup(?:(?:(?:E|_e)nd)?))|h(?:ide|vsBox(?:(?:SetValue)?))|joy|k(?:eyIn|nob)|l(?:abel|oadsnap)|mouse|p(?:a(?:ck(?:(?:(?:E|_e)nd)?)|nel(?:(?:(?:E|_e)nd)?))|rintk(?:(?:2)?))|r(?:oller|un)|s(?:avesnap|croll(?:(?:(?:E|_e)nd)?)|et(?:Align|Box|Color(?:(?:2)?)|Font|Position|S(?:ize|napGroup)|Text(?:(?:Color|(?:Siz|Typ)e)?)|Val(?:(?:(?:(?:_)?)i)?)|snap)|how|lid(?:Bnk(?:(?:2(?:(?:Set(?:(?:k)?))?)|GetHandle|Set(?:(?:k)?))?)|er))|t(?:abs(?:(?:(?:E|_e)nd)?)|ext)|update|v(?:alue|keybd|slidBnk(?:(?:2)?))|xyin)|Jacko(?:Audio(?:In(?:(?:Connect)?)|Out(?:(?:Connect)?))|Freewheel|In(?:fo|it)|Midi(?:(?:InConnec|Ou(?:(?:tConnec)?))t)|NoteOut|On|Transport)|K35_(?:(?:[hl])pf)|Mixer(?:Clear|GetLevel|Receive|Se(?:nd|tLevel(?:(?:_i)?)))|OSC(?:bundle|count|init(?:(?:M)?)|listen|raw|send(?:(?:_lo)?))|STK(?:B(?:andedWG|eeThree|low(?:Botl|Hole)|owed|rass)|Clarinet|Drummer|F(?:MVoices|lute)|HevyMetl|M(?:andolin|o(?:dalBar|og))|P(?:ercFlut|lucked)|R(?:esonate|hodey)|S(?:axofony|hakers|i(?:mple|tar)|tifKarp)|TubeBell|VoicForm|W(?:histle|urley))|a(?:bs|ctive|ds(?:r|yn(?:(?:t(?:(?:2)?))?))|ftouch|l(?:lpole|pass|wayson)|mp(?:db(?:(?:fs)?)|midi(?:(?:curve|d)?))|poleparams|r(?:duino(?:Read(?:(?:F)?)|St(?:art|op))|eson(?:(?:k)?))|tone(?:(?:[kx])?)|utocorr)|b(?:a(?:bo|lance(?:(?:2)?)|mboo|rmodel)|bcut(?:[ms])|e(?:(?:tara|xpr)nd)|form(?:dec(?:[12])|enc1)|i(?:nit|quad(?:(?:a)?)|rnd)|ob|pf(?:(?:cos)?)|qrez|u(?:t(?:b(?:[pr])|hp|lp|t(?:er(?:b(?:[pr])|(?:[hl])p)|on))|zz))|c(?:2r|a(?:basa|uchy(?:(?:i)?))|brt|e(?:il|ll|nt(?:(?:roid)?)|ps(?:(?:inv)?))|h(?:an(?:ctrl|ged(?:(?:2)?)|[io])|e(?:byshevpoly|ckbox)|n(?:_(?:[Sak])|clear|export|get(?:(?:ks|[aiks])?)|mix|params|set(?:(?:ks|[aiks])?))|uap)|l(?:ear|filt|ip|ocko(?:ff|n))|mp(?:(?:lxprod)?)|nt(?:C(?:reate|ycles)|Delete(?:(?:_i)?)|Re(?:ad|set)|State)|o(?:m(?:b(?:(?:inv)?)|p(?:ile(?:csd|orc|str)|ress(?:(?:2)?)))|n(?:nect|trol|v(?:(?:l|olv)e))|py(?:a2ftab|f2array)|s(?:(?:h|inv|seg(?:(?:[br])?))?)|unt(?:(?:_i)?))|p(?:s(?:2pch|midi(?:(?:b|nn)?)|oct|pch|t(?:mid|un(?:(?:i)?))|xpch)|u(?:meter|prc))|r(?:oss(?:2|fm(?:(?:i|pm(?:(?:i)?))?)|pm(?:(?:i)?))|unch)|t(?:lchn|rl(?:14|21|7|init|pr(?:eset|int(?:(?:presets)?))|s(?:ave|elect)))|userrnd)|d(?:a(?:m|te(?:(?:s)?))|b(?:(?:(?:(?:fs)?)amp)?)|c(?:block(?:(?:2)?)|onv|t(?:(?:inv)?))|e(?:interleave|l(?:ay(?:(?:[1krw])?)|tap(?:(?:xw|[3inx])?))|norm)|i(?:ff|ode_ladder|rectory|s(?:k(?:grain|in(?:(?:2)?))|p(?:fft|lay)|tort(?:(?:1)?))|vz)|o(?:ppler|t|wnsamp)|ripwater|ssi(?:a(?:ctivate|udio)|ctls|(?:ini|lis)t)|u(?:mpk(?:(?:[234])?)|s(?:errnd|t(?:(?:2)?))))|e(?:lapsed(?:cycles|time)|nvlpx(?:(?:r)?)|phasor|qfil|v(?:alstr|ent(?:(?:_i|cycles|time)?))|x(?:citer|itnow|p(?:(?:curve|on|rand(?:(?:i)?)|seg(?:(?:ba|[abr])?))?)))|f(?:a(?:reylen(?:(?:i)?)|ust(?:audio|c(?:ompile|tl)|dsp|gen|play))|ft(?:(?:inv)?)|i(?:close|l(?:e(?:bit|len|nchnls|peak|s(?:cal|r)|valid)|larray|ter2)|n(?:(?:[ik])?)|open)|l(?:a(?:nger|shtxt)|oo(?:per(?:(?:2)?)|r)|uid(?:AllOut|C(?:C(?:[ik])|ontrol)|Engine|Info|Load|Note|Out|ProgramSelect|SetInterpMethod))|m(?:a(?:nal|x)|b(?:3|ell)|in|metal|od|percfl|(?:rhod|voic|wurli)e)|o(?:f(?:2|ilter)|l(?:d|low(?:(?:2)?))|scil(?:(?:i)?)|ut(?:(?:ir|[ik])?)|[fg])|print(?:(?:(?:k)?)s)|r(?:a(?:c(?:(?:talnoise)?)|mebuffer)|eeverb)|t(?:audio|c(?:hnls|onv|ps)|exists|free|gen(?:(?:once|tmp)?)|l(?:en|oad(?:(?:k)?)|ptim)|morf|om|print|resize(?:(?:i)?)|s(?:a(?:mplebank|ve(?:(?:k)?))|et|lice(?:(?:i)?)|r)))|g(?:a(?:in(?:(?:slider)?)|uss(?:(?:i|trig)?))|buzz|e(?:n(?:array(?:(?:_i)?)|dy(?:(?:[cx])?))|t(?:c(?:fg|ol)|ftargs|row|seed))|ogobel|ra(?:in(?:(?:[23])?)|nule)|t(?:adsr|f)|uiro)|h(?:armon(?:(?:[234])?)|df5(?:read|write)|ilbert(?:(?:2)?)|rtf(?:early|move(?:(?:2)?)|reverb|stat)|sboscil|vs(?:[123])|ypot)|i(?:hold|mage(?:create|free|getpixel|load|s(?:ave|etpixel|ize))|n(?:(?:32|ch|it(?:(?:c(?:14|21|7))?)|let(?:kid|[afkv])|rg|s(?:global|remot)|te(?:g|r(?:leave|p))|value|[hoqstxz])?))|j(?:acktransport|itter(?:(?:2)?)|oystick|spline)|l(?:a(?:_(?:i_(?:a(?:dd_(?:m(?:[cr])|v(?:[cr]))|ssign_(?:m(?:[cr])|t|v(?:[cr])))|conjugate_(?:m(?:[cr])|v(?:[cr]))|d(?:i(?:stance_v(?:[cr])|vide_(?:m(?:[cr])|v(?:[cr])))|ot_(?:m(?:c_vc|r_vr|[cr])|v(?:[cr])))|get_(?:m(?:[cr])|v(?:[cr]))|invert_m(?:[cr])|l(?:ower_solve_m(?:[cr])|u_(?:det_m(?:[cr])|factor_m(?:[cr])|solve_m(?:[cr])))|m(?:c_(?:create|set)|r_(?:create|set)|ultiply_(?:m(?:[cr])|v(?:[cr])))|norm(?:1_(?:m(?:[cr])|v(?:[cr]))|_(?:euclid_(?:m(?:[cr])|v(?:[cr]))|inf_(?:m(?:[cr])|v(?:[cr]))|max_m(?:[cr])))|print_(?:m(?:[cr])|v(?:[cr]))|qr_(?:eigen_m(?:[cr])|factor_m(?:[cr])|sym_eigen_m(?:[cr]))|random_(?:m(?:[cr])|v(?:[cr]))|s(?:ize_(?:m(?:[cr])|v(?:[cr]))|ubtract_(?:m(?:[cr])|v(?:[cr])))|t(?:_assign|ra(?:ce_m(?:[cr])|nspose_m(?:[cr])))|upper_solve_m(?:[cr])|v(?:c_(?:create|set)|r_(?:create|set)))|k_(?:a(?:_assign|dd_(?:m(?:[cr])|v(?:[cr]))|ssign_(?:m(?:[cr])|v(?:[cr])|[aft]))|c(?:onjugate_(?:m(?:[cr])|v(?:[cr]))|urrent_(?:f|vr))|d(?:i(?:stance_v(?:[cr])|vide_(?:m(?:[cr])|v(?:[cr])))|ot_(?:m(?:c_vc|r_vr|[cr])|v(?:[cr])))|f_assign|get_(?:m(?:[cr])|v(?:[cr]))|invert_m(?:[cr])|l(?:ower_solve_m(?:[cr])|u_(?:det_m(?:[cr])|factor_m(?:[cr])|solve_m(?:[cr])))|m(?:c_set|r_set|ultiply_(?:m(?:[cr])|v(?:[cr])))|norm(?:1_(?:m(?:[cr])|v(?:[cr]))|_(?:euclid_(?:m(?:[cr])|v(?:[cr]))|inf_(?:m(?:[cr])|v(?:[cr]))|max_m(?:[cr])))|qr_(?:eigen_m(?:[cr])|factor_m(?:[cr])|sym_eigen_m(?:[cr]))|random_(?:m(?:[cr])|v(?:[cr]))|subtract_(?:m(?:[cr])|v(?:[cr]))|t(?:_assign|race_m(?:[cr]))|upper_solve_m(?:[cr])|v(?:(?:[cr])_set)))|g(?:(?:ud)?)|stcycle)|enarray|f(?:o|sr)|i(?:mit(?:(?:1)?)|n(?:cos|e(?:(?:n(?:(?:r)?)|to)?)|k_(?:beat_(?:force|(?:ge|reques)t)|create|enable|is_enabled|metro|peers|tempo_(?:(?:[gs])et))|lin|rand|seg(?:(?:[br])?))|veconv)|o(?:cs(?:end|ig)|g(?:(?:10|2|btwo|curve)?)|op(?:seg(?:(?:p)?)|(?:[tx])seg)|renz|scil(?:(?:(?:(?:3)?)phs|[3x])?)|w(?:pass2|res(?:(?:x)?)))|p(?:c(?:anal|filter)|f(?:18|orm|reson)|hasor|interp|oscil(?:(?:sa(?:(?:2)?)|[3a])?)|re(?:ad|son)|s(?:hold(?:(?:p)?)|lot))|ufs)|m(?:a(?:ca|dsr|gs|nd(?:(?:[eo])l)|parray(?:(?:_i)?)|rimba|ssign|x(?:_k|a(?:bs(?:(?:accum)?)|ccum|lloc|rray))|[cx])|clock|delay|e(?:dian(?:(?:k)?)|tro(?:(?:2|bpm)?))|fb|i(?:d(?:global|i(?:arp|c(?:14|21|7|h(?:annelaftertouch|n)|ontrolchange|trl)|default|filestatus|in|noteo(?:ff|n(?:cps|key|oct|pch))|o(?:n(?:(?:2)?)|ut(?:(?:_i)?))|p(?:gm|itchbend|olyaftertouch|rogramchange)|tempo)|remot)|n(?:(?:a(?:bs(?:(?:accum)?)|ccum|rray)|cer)?)|rror)|o(?:d(?:e|matrix)|nitor|og(?:(?:ladder(?:(?:2)?)|vcf(?:(?:2)?))?)|scil)|p(?:3(?:bitrate|in|len|nchnls|out|s(?:cal|r))|ulse)|rtmsg|s2st|to(?:[fn])|u(?:ltitap|te)|v(?:c(?:hpf|lpf(?:[1234]))|mfilter)|xadsr)|n(?:chnls_hw|estedap|l(?:alp|filt(?:(?:2)?))|o(?:ise|t(?:eo(?:ff|n(?:(?:dur(?:(?:2)?))?))|num))|r(?:everb|pn)|s(?:amp|t(?:ance|r(?:num|str)))|t(?:o(?:[fm])|rpol)|xtpow2)|o(?:ct(?:ave|cps|midi(?:(?:b|nn)?)|pch)|labuffer|sc(?:bnk|il(?:(?:1i|ikt(?:(?:[ps])?)|[13insx])?))|ut(?:(?:32|all|ch|i(?:at|c(?:(?:14)?)|p(?:at|[bc]))|k(?:at|c(?:(?:14)?)|p(?:at|[bc]))|let(?:kid|[afkv])|q(?:[1234])|rg|s(?:[12])|value|[choqsxz])?))|p(?:5g(?:connect|data)|a(?:n(?:(?:2)?)|r(?:eq|t(?:2txt|i(?:als|kkel(?:(?:get|s(?:et|ync))?))))|ssign|ulstretch)|c(?:auchy|h(?:bend|midi(?:(?:b|nn)?)|oct|tom)|o(?:nvolve|unt))|d(?:clip|half(?:(?:y)?))|eak|gm(?:(?:assig|ch)n)|h(?:as(?:er(?:[12])|or(?:(?:bnk)?))|s)|i(?:n(?:dex|k(?:er|ish))|tch(?:(?:a(?:c|mdf))?))|l(?:a(?:net|terev)|(?:ltra|u)ck)|o(?:isson|l(?:2rect|y(?:aft|nomial))|rt(?:(?:k)?)|scil(?:(?:3)?)|w(?:(?:ershape|oftwo|s)?))|r(?:e(?:alloc|piano)|int(?:(?:_type|array|f_i|k(?:s2|[2s])|ln|sk|[fks])?)|oduct)|set|t(?:ablew|rack)|uts|v(?:add|bufread|cross|interp|oc|read|s(?:2(?:array|tab)|a(?:dsyn|nal|rp)|b(?:and(?:width|[pr])|in|lur|uf(?:fer|read(?:(?:2)?)))|c(?:ale|e(?:nt|ps)|(?:f|ros)s)|d(?:emix|is(?:kin|p))|envftw|f(?:ilter|r(?:e(?:ad|eze)|omarray)|t(?:[rw])|write)|g(?:ain|endy)|hift|i(?:fd|n(?:(?:fo|it)?))|l(?:ock|pc)|m(?:aska|ix|o(?:(?:ot|rp)h))|o(?:sc|ut)|pitch|t(?:anal|encil|race)|voc|warp|ynth))|wd|y(?:assign(?:(?:[it])?)|call(?:(?:1(?:[it])|2(?:[it])|3(?:[it])|4(?:[it])|5(?:[it])|6(?:[it])|7(?:[it])|8(?:[it])|ni|[12345678int])?)|e(?:val(?:(?:[it])?)|xec(?:(?:[it])?))|init|l(?:assign(?:(?:[it])?)|call(?:(?:1(?:[it])|2(?:[it])|3(?:[it])|4(?:[it])|5(?:[it])|6(?:[it])|7(?:[it])|8(?:[it])|ni|[12345678int])?)|e(?:val(?:(?:[it])?)|xec(?:(?:[it])?))|run(?:(?:[it])?))|run(?:(?:[it])?)))|q(?:inf|nan)|r(?:2c|and(?:(?:om(?:(?:[hi])?)|[chi])?)|bjeq|e(?:ad(?:clock|fi|k(?:[234s])|sc(?:ore|ratch)|[fk])|ct2pol|lease|mo(?:teport|ve)|pluck|s(?:hapearray|on(?:(?:bnk|xk|[krxyz])?)|yn)|verb(?:(?:2|sc)?)|windscore|zzy)|fft|ifft|ms|nd(?:(?:31|seed)?)|ound|spline|tclock)|s(?:16b14|32b14|a(?:mphold|ndpaper)|c(?:_(?:lag(?:(?:ud)?)|phasor|trig)|a(?:le(?:(?:2|array)?)|n(?:hammer|map|smap|table|u2|[su]))|hed(?:kwhen(?:(?:named)?)|ule(?:(?:k)?)|when)|oreline(?:(?:_i)?))|e(?:ed|kere|lect|mitone|nse(?:(?:key)?)|q(?:time(?:(?:2)?)|u(?:(?:state)?))|rial(?:Begin|End|Flush|Print|Read|Write(?:(?:_i)?))|t(?:c(?:(?:o|tr)l)|ksmps|row|scorepos))|f(?:i(?:list|nstr(?:(?:3m|[3m])?))|lo(?:ad|oper)|p(?:assign|l(?:ay(?:(?:3m|[3m])?)|ist)|reset))|h(?:aker|ift(?:in|out))|i(?:gnum|n(?:(?:h|inv|syn)?))|kf|l(?:eighbells|i(?:cearray(?:(?:_i)?)|der(?:16(?:(?:f|table(?:(?:f)?))?)|32(?:(?:f|table(?:(?:f)?))?)|64(?:(?:f|table(?:(?:f)?))?)|8(?:(?:f|table(?:(?:f)?))?)|Kawai)))|nd(?:loop|warp(?:(?:st)?))|o(?:ck(?:recv(?:(?:s)?)|send(?:(?:s)?))|rt(?:[ad])|undin)|p(?:a(?:ce|t3d(?:(?:[it])?))|dist|f|litrig|rintf(?:(?:k)?)|send)|q(?:rt|uinewave)|t(?:2ms|atevar|errain|ix|r(?:c(?:at(?:(?:k)?)|har(?:(?:k)?)|mp(?:(?:k)?)|py(?:(?:k)?))|e(?:cv|son)|fromurl|get|in(?:dex(?:(?:k)?)|g2array)|l(?:en(?:(?:k)?)|ower(?:(?:k)?))|rindex(?:(?:k)?)|s(?:et|trip|ub(?:(?:k)?))|to(?:(?:[dl])k|[dl])|upper(?:(?:k)?))|send)|u(?:binstr(?:(?:init)?)|m(?:(?:array)?))|v(?:filter|n)|y(?:nc(?:grain|loop|phasor)|stem(?:(?:_i)?)))|t(?:a(?:b(?:2(?:array|pvs)|_i|ifd|le(?:(?:3kt|copy|filter(?:(?:i)?)|gpw|i(?:copy|gpw|kt|mix)|kt|mix|ng|ra|s(?:eg|huffle(?:(?:i)?))|w(?:a|kt)|x(?:kt|seg)|[3iw])?)|morph(?:(?:ak|[ai])?)|play|rec|sum|w(?:(?:_i)?))|mbourine|n(?:h|inv(?:(?:2)?))|[bn])|bvcf|emp(?:est|o(?:(?:(?:sc|v)al)?))|i(?:me(?:dseq|inst(?:[ks])|[ks])|val)|lineto|one(?:(?:[kx])?)|r(?:a(?:dsyn|n(?:dom|seg(?:(?:[br])?)))|cross|filter|highest|i(?:g(?:Expseg|Linseg|expseg|ger|hold|linseg|phasor|seq)|m(?:(?:_i)?)|rand)|lowest|mix|s(?:cale|(?:hif|pli)t))|urno(?:ff(?:(?:2_i|[23])?)|n)|vconv)|u(?:n(?:irand|wrap)|psamp|r(?:andom|d))|v(?:a(?:ctrol|dd(?:(?:_i|v(?:(?:_i)?))?)|get|lpass|set)|bap(?:(?:gmove|lsinit|(?:(?:z)?)move|[gz])?)|c(?:ella|lpf|o(?:(?:2(?:(?:(?:f|i(?:f|ni))t)?)|mb|py(?:(?:_i)?))?))|d(?:el(?:_k|ay(?:(?:x(?:w(?:[qs])|[qsw])|[3kx])?))|ivv(?:(?:_i)?))|e(?:cdelay|loc|xp(?:(?:_i|seg|v(?:(?:_i)?))?))|i(?:b(?:es|r(?:(?:ato)?))|ncr)|l(?:i(?:mit|nseg)|owres)|m(?:ap|irror|ult(?:(?:_i|v(?:(?:_i)?))?))|o(?:ice|sim)|p(?:haseseg|o(?:rt|w(?:(?:_i|v(?:(?:_i)?))?))|s|voc)|rand(?:[hi])|subv(?:(?:_i)?)|tab(?:le(?:1k|w(?:[aik])|[aik])|w(?:[aik])|[aik])|wrap)|w(?:aveset|e(?:bsocket|ibull)|g(?:b(?:ow(?:(?:edbar)?)|rass)|clar|flute|pluck(?:(?:2)?)|uide(?:[12]))|i(?:i(?:connect|data|range|send)|ndow)|r(?:ap|itescratch)|terrain(?:(?:2)?))|x(?:adsr|in|out|tratim|yscale)|z(?:a(?:cl|kinit|mod|rg|wm|[rw])|df_(?:1pole(?:(?:_mode)?)|2pole(?:(?:_mode)?)|ladder)|filter2|i(?:wm|[rw])|k(?:cl|mod|wm|[rw]))|[Saikp])\\b|\\b(OSCsendA|array|b(?:e(?:adsynt|osc)|form(?:(?:de|en)c)|uchla)|copy2(?:(?:[ft])tab)|getrowlin|hrtfer|ktableseg|l(?:entab|ua_(?:exec|i(?:aopcall(?:(?:_off)?)|kopcall(?:(?:_off)?)|opcall(?:(?:_off)?))|opdef))|m(?:axtab|intab|p3scal_(?:check|load(?:(?:2)?)|play(?:(?:2)?)))|p(?:op(?:(?:_f)?)|table(?:(?:iw|[3i])?)|ush(?:(?:_f)?)|vsgendy)|s(?:calet|ignalflowgraph|ndload|o(?:cksend_k|undout(?:(?:s)?))|pec(?:addm|di(?:ff|sp)|filt|hist|ptrk|s(?:cal|um)|trum)|tack|um(?:TableFilter|tab)|ystime)|t(?:ab(?:gen|leiw|map(?:(?:_i)?)|rowlin|slice)|b(?:0_init|1(?:(?:(?:[012345])?)_init|[012345])|(?:[23456789])_init|[0123456789]))|vbap(?:1(?:6|move)|(?:[48])move|[48])|x(?:scan(?:map|smap|[su])|yin))\\b)(?:(\\:)([A-Za-z]))?' }, {match: '\\b[A-Z_a-z]\\w*\\b', name: 'meta.other.csound'} ] diff --git a/lang/source.dart.js b/lang/source.dart.js index 7564a10..640f7ea 100644 --- a/lang/source.dart.js +++ b/lang/source.dart.js @@ -172,7 +172,7 @@ const grammar = { }, { match: - '(?>|&|\\||\\^|~|!', + arithmetic_operator: { + match: '->|\\+=|-=|\\*=|/=|%=|&=|\\|=|\\*|/|%|\\+|-|<<|>>|&|\\||\\^|~|!', name: 'keyword.operator.arithmetic.gdscript' }, - assignment_op: {match: '=', name: 'keyword.operator.assignment.gdscript'}, + assignment_operator: { + match: '=', + name: 'keyword.operator.assignment.gdscript' + }, base_expression: { patterns: [ {include: '#builtin_get_node_shorthand'}, {include: '#nodepath_object'}, {include: '#nodepath_function'}, {include: '#strings'}, + {include: '#const_vars'}, {include: '#keywords'}, - {include: '#logic_op'}, + {include: '#logic_operator'}, + {include: '#compare_operator'}, + {include: '#arithmetic_operator'}, {include: '#lambda_declaration'}, + {include: '#class_declaration'}, + {include: '#variable_declaration'}, + {include: '#signal_declaration_bare'}, + {include: '#signal_declaration'}, + {include: '#function_declaration'}, + {include: '#statement_keyword'}, + {include: '#assignment_operator'}, {include: '#in_keyword'}, {include: '#control_flow'}, {include: '#round_braces'}, {include: '#function_call'}, {include: '#comment'}, {include: '#self'}, + {include: '#func'}, {include: '#letter'}, {include: '#numbers'}, - {include: '#builtin_func'}, {include: '#builtin_classes'}, - {include: '#const_vars'}, {include: '#pascal_case_class'}, {include: '#line_continuation'} ] @@ -112,32 +94,37 @@ const grammar = { '(?=|==|<|>|!=', name: 'keyword.operator.comparison.gdscript' }, @@ -207,10 +194,30 @@ const grammar = { '\\b(?:if|elif|else|while|break|continue|pass|return|match|yield|await)\\b', name: 'keyword.control.gdscript' }, - extends: { - match: '(?<=extends)\\s+[a-zA-Z_]\\w*(\\.([a-zA-Z_]\\w*))?', - name: 'entity.other.inherited-class.gdscript' + expression: { + patterns: [ + {include: '#base_expression'}, + {include: '#getter_setter_godot4'}, + {include: '#assignment_operator'}, + {include: '#annotations'}, + {include: '#class_name'}, + {include: '#builtin_classes'}, + {include: '#class_new'}, + {include: '#class_is'}, + {include: '#class_enum'}, + {include: '#any_method'}, + {include: '#any_variable'}, + {include: '#any_property'} + ] + }, + extends_statement: { + captures: { + 1: {name: 'keyword.language.gdscript'}, + 2: {name: 'entity.other.inherited-class.gdscript'} + }, + match: '(extends)\\s+([a-zA-Z_]\\w*\\.[a-zA-Z_]\\w*)?' }, + func: {match: '\\bfunc\\b', name: 'keyword.language.gdscript'}, function_arguments: { begin: '(\\()', beginCaptures: { @@ -244,6 +251,9 @@ const grammar = { }, function_call: { begin: '(?x)\n \\b(?=\n ([a-zA-Z_]\\w*) \\s* (\\()\n )\n', + beginCaptures: { + 2: {name: 'punctuation.definition.arguments.begin.gdscript'} + }, end: '(\\))', endCaptures: {1: {name: 'punctuation.definition.arguments.end.gdscript'}}, name: 'meta.function-call.gdscript', @@ -255,26 +265,16 @@ const grammar = { 1: {name: 'keyword.language.gdscript storage.type.function.gdscript'}, 2: {name: 'entity.name.function.gdscript'} }, - end: '((:)|(?=[#\'"\\n]))', - endCaptures: {1: {name: 'punctuation.section.function.begin.gdscript'}}, + end: '(:|(?=[#\'"\\n]))', name: 'meta.function.gdscript', patterns: [ {include: '#parameters'}, {include: '#line_continuation'}, - { - captures: { - 1: {name: 'keyword.language.void.gdscript'}, - 2: {name: 'entity.name.type.class.gdscript'} - }, - match: '\\s*(?:\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:' - }, {include: '#base_expression'} ] }, - function_keyword: {match: 'func', name: 'keyword.language.gdscript'}, function_name: { patterns: [ - {include: '#builtin_func'}, {include: '#builtin_classes'}, { match: '(?x)\n \\b ([a-zA-Z_]\\w*) \\b\n', @@ -293,14 +293,7 @@ const grammar = { beginCaptures: {1: {name: 'entity.name.function.gdscript'}}, end: '(:|(?=[#\'"\\n]))', name: 'meta.function.gdscript', - patterns: [ - {include: '#parameters'}, - {include: '#line_continuation'}, - { - captures: {2: {name: 'entity.name.type.class.gdscript'}}, - match: '\\s*(\\-\\>)\\s*([a-zA-Z_]\\w*)\\s*\\:' - } - ] + patterns: [{include: '#parameters'}, {include: '#line_continuation'}] } ] }, @@ -322,7 +315,7 @@ const grammar = { }, keywords: { match: - '\\b(?:class|class_name|extends|is|onready|tool|static|export|as|void|enum|preload|assert|breakpoint|rpc|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\\b', + '\\b(?:class|class_name|is|onready|tool|static|export|as|void|enum|preload|assert|breakpoint|rpc|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\\b', name: 'keyword.language.gdscript' }, lambda_declaration: { @@ -336,13 +329,6 @@ const grammar = { patterns: [ {include: '#parameters'}, {include: '#line_continuation'}, - { - captures: { - 1: {name: 'keyword.language.void.gdscript'}, - 2: {name: 'entity.name.type.class.gdscript'} - }, - match: '\\s*(?:\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:' - }, {include: '#base_expression'}, {include: '#any_variable'}, {include: '#any_property'} @@ -371,7 +357,7 @@ const grammar = { } ] }, - logic_op: { + logic_operator: { match: '\\b(and|or|not|!)\\b', name: 'keyword.operator.wordlike.gdscript' }, @@ -397,7 +383,7 @@ const grammar = { { begin: '("|\')', end: '\\1', - name: 'meta.literal.nodepath.gdscript constant.character.escape', + name: 'string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape', patterns: [{match: '%', name: 'keyword.control.flow'}] } ] @@ -411,7 +397,7 @@ const grammar = { { begin: '("|\')', end: '\\1', - name: 'constant.character.escape.gdscript', + name: 'string.quoted.gdscript constant.character.escape.gdscript', patterns: [{match: '%', name: 'keyword.control.flow.gdscript'}] } ] @@ -424,18 +410,18 @@ const grammar = { name: 'constant.numeric.integer.hexadecimal.gdscript' }, { - match: '[-]?([0-9_]+\\.[0-9_]*(e[\\-\\+]?[0-9_]+)?)', + match: '[-]?([0-9][0-9_]+\\.[0-9_]*(e[\\-\\+]?[0-9_]+)?)', name: 'constant.numeric.float.gdscript' }, { - match: '[-]?(\\.[0-9_]+(e[\\-\\+]?[0-9_]+)?)', + match: '[-]?(\\.[0-9][0-9_]*(e[\\-\\+]?[0-9_]+)?)', name: 'constant.numeric.float.gdscript' }, { - match: '[-]?([0-9_]+e[\\-\\+]?\\[0-9_])', + match: '[-]?([0-9][0-9_]*e[\\-\\+]?\\[0-9_])', name: 'constant.numeric.float.gdscript' }, - {match: '[-]?[0-9_]+', name: 'constant.numeric.integer.gdscript'} + {match: '[-]?[0-9][0-9_]*', name: 'constant.numeric.integer.gdscript'} ] }, parameters: { @@ -481,28 +467,38 @@ const grammar = { }, end: '((?=[#\'"\\n]))', name: 'meta.signal.gdscript', - patterns: [ - {include: '#parameters'}, - {include: '#line_continuation'}, - { - captures: {2: {name: 'entity.name.type.class.gdscript'}}, - match: '\\s*(\\-\\>)\\s*([a-zA-Z_]\\w*)\\s*\\:' - } - ] + patterns: [{include: '#parameters'}, {include: '#line_continuation'}] }, signal_declaration_bare: { captures: { 1: {name: 'keyword.language.gdscript storage.type.function.gdscript'}, 2: {name: 'entity.name.function.gdscript'} }, - match: '(?x) \\s*\n (signal) \\s+\n ([a-zA-Z_]\\w*)(?=[\\n\\s])' + match: '(?x) \\s*\n (signal) \\s+\n ([a-zA-Z_]\\w*)(?=[\\n\\s])', + name: 'meta.signal.gdscript' + }, + statement: {patterns: [{include: '#extends_statement'}]}, + statement_keyword: { + patterns: [ + { + match: + '(?x)\n \\b(?)', + endCaptures: { + 1: {name: 'punctuation.definition.tag'}, + 2: {name: 'punctuation.definition.tag'} + }, + name: 'meta.tag.any.ember-handlebars', + patterns: [{include: '#tag-like-content'}] + }, + digit: { + captures: { + 0: {name: 'constant.numeric'}, + 1: {name: 'constant.numeric'}, + 2: {name: 'constant.numeric'} + }, + match: '\\d*(\\.)?\\d+' + }, + entities: { + patterns: [ + { + captures: { + 1: {name: 'punctuation.definition.entity.html.ember-handlebars'}, + 3: {name: 'punctuation.definition.entity.html.ember-handlebars'} + }, + match: '(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)', + name: 'constant.character.entity.html.ember-handlebars' + }, + { + match: '&', + name: 'invalid.illegal.bad-ampersand.html.ember-handlebars' + } + ] + }, + 'glimmer-argument': { + captures: { + 1: { + name: 'entity.other.attribute-name.ember-handlebars.argument', + patterns: [{match: '(@)', name: 'markup.italic'}] + }, + 2: {name: 'punctuation.separator.key-value.html.ember-handlebars'} + }, + match: '\\s(@[a-zA-Z0-9:_.-]+)(=)?' + }, + 'glimmer-as-stuff': { + patterns: [{include: '#as-keyword'}, {include: '#as-params'}] + }, + 'glimmer-block': { + begin: '({{~?)(#|/)(([@\\$a-zA-Z0-9_/.-]+))', + captures: { + 1: {name: 'punctuation.definition.tag'}, + 2: {name: 'punctuation.definition.tag'}, + 3: { + name: 'keyword.control', + patterns: [ + {include: '#glimmer-component-path'}, + {match: '(\\/)+', name: 'punctuation.definition.tag'}, + {match: '(\\.)+', name: 'punctuation.definition.tag'} + ] + } + }, + end: '(~?}})', + name: 'entity.expression.ember-handlebars', + patterns: [ + {include: '#glimmer-as-stuff'}, + {include: '#glimmer-supexp-content'} + ] + }, + 'glimmer-bools': { + captures: { + 0: {name: 'keyword.operator'}, + 1: {name: 'keyword.operator'}, + 2: {name: 'string.regexp'}, + 3: {name: 'string.regexp'}, + 4: {name: 'keyword.operator'} + }, + match: '({{~?)(true|false|null|undefined|\\d*(\\.)?\\d+)(~?}})', + name: 'entity.expression.ember-handlebars' + }, + 'glimmer-comment-block': { + begin: '{{!--', + captures: {0: {name: 'punctuation.definition.block.comment.glimmer'}}, + end: '--}}', + name: 'comment.block.glimmer', + patterns: [{include: '#script'}, {include: '#attention'}] + }, + 'glimmer-comment-inline': { + begin: '{{!', + captures: {0: {name: 'punctuation.definition.block.comment.glimmer'}}, + end: '}}', + name: 'comment.inline.glimmer', + patterns: [{include: '#script'}, {include: '#attention'}] + }, + 'glimmer-component-path': { + captures: {1: {name: 'punctuation.definition.tag'}}, + match: '(::|_|\\$|\\.)' + }, + 'glimmer-control-expression': { + begin: '({{~?)(([-a-zA-Z_0-9/]+)\\s)', + captures: { + 1: {name: 'keyword.operator'}, + 2: {name: 'keyword.operator'}, + 3: {name: 'keyword.control'} + }, + end: '(~?}})', + name: 'entity.expression.ember-handlebars', + patterns: [{include: '#glimmer-supexp-content'}] + }, + 'glimmer-else-block': { + captures: { + 0: {name: 'punctuation.definition.tag'}, + 1: {name: 'punctuation.definition.tag'}, + 2: {name: 'keyword.control'}, + 3: { + name: 'keyword.control', + patterns: [ + {include: '#glimmer-subexp'}, + {include: '#string-single-quoted-handlebars'}, + {include: '#string-double-quoted-handlebars'}, + {include: '#boolean'}, + {include: '#digit'}, + {include: '#param'}, + {include: '#glimmer-parameter-name'}, + {include: '#glimmer-parameter-value'} + ] + }, + 4: {name: 'punctuation.definition.tag'} + }, + match: '({{~?)(else\\s[a-z]+\\s|else)([()@a-zA-Z0-9\\.\\s\\b]+)?(~?}})', + name: 'entity.expression.ember-handlebars' + }, + 'glimmer-expression': { + begin: '({{~?)(([()\\s@a-zA-Z0-9_.-]+))', + captures: { + 1: {name: 'keyword.operator'}, + 2: {name: 'keyword.operator'}, + 3: { + name: 'support.function', + patterns: [ + {match: '[(]+', name: 'string.regexp'}, + {match: '[)]+', name: 'string.regexp'}, + {match: '(\\.)+', name: 'punctuation.definition.tag'}, + {include: '#glimmer-supexp-content'} + ] + } + }, + end: '(~?}})', + name: 'entity.expression.ember-handlebars', + patterns: [{include: '#glimmer-supexp-content'}] + }, + 'glimmer-expression-property': { + begin: '({{~?)((@|this.)([a-zA-Z0-9_.-]+))', + captures: { + 1: {name: 'keyword.operator'}, + 2: {name: 'keyword.operator'}, + 3: { + name: 'support.function', + patterns: [ + {match: '(@|this)', name: 'variable.language'}, + {match: '(\\.)+', name: 'punctuation.definition.tag'} + ] + }, + 4: { + name: 'support.function', + patterns: [{match: '(\\.)+', name: 'punctuation.definition.tag'}] + } + }, + end: '(~?}})', + name: 'entity.expression.ember-handlebars', + patterns: [{include: '#glimmer-supexp-content'}] + }, + 'glimmer-parameter-name': { + captures: { + 1: {name: 'variable.parameter.name.ember-handlebars'}, + 2: {name: 'punctuation.definition.expression.ember-handlebars'} + }, + match: '\\b([a-zA-Z0-9_-]+)(\\s?=)' + }, + 'glimmer-parameter-value': { + captures: { + 1: { + name: 'support.function', + patterns: [{match: '(\\.)+', name: 'punctuation.definition.tag'}] + } + }, + match: '\\b([a-zA-Z0-9:_.-]+)\\b(?!=)' + }, + 'glimmer-special-block': { + captures: { + 0: {name: 'keyword.operator'}, + 1: {name: 'keyword.operator'}, + 2: {name: 'keyword.control'}, + 3: {name: 'keyword.operator'} + }, + match: '({{~?)(yield|outlet)(~?}})', + name: 'entity.expression.ember-handlebars' + }, + 'glimmer-subexp': { + begin: '(\\()([@a-zA-Z0-9.-]+)', + captures: {1: {name: 'keyword.other'}, 2: {name: 'keyword.control'}}, + end: '(\\))', + name: 'entity.subexpression.ember-handlebars', + patterns: [{include: '#glimmer-supexp-content'}] + }, + 'glimmer-supexp-content': { + patterns: [ + {include: '#glimmer-subexp'}, + {include: '#string-single-quoted-handlebars'}, + {include: '#string-double-quoted-handlebars'}, + {include: '#boolean'}, + {include: '#digit'}, + {include: '#param'}, + {include: '#glimmer-parameter-name'}, + {include: '#glimmer-parameter-value'} + ] + }, + 'glimmer-unescaped-expression': { + begin: '{{{', + captures: {0: {name: 'keyword.operator'}}, + end: '}}}', + name: 'entity.unescaped.expression.ember-handlebars', + patterns: [ + {include: '#string-single-quoted-handlebars'}, + {include: '#string-double-quoted-handlebars'}, + {include: '#glimmer-subexp'}, + {include: '#param'} + ] + }, + 'html-attribute': { + captures: { + 1: { + name: 'entity.other.attribute-name.ember-handlebars', + patterns: [{match: '(\\.\\.\\.attributes)', name: 'markup.bold'}] + }, + 2: {name: 'punctuation.separator.key-value.html.ember-handlebars'} + }, + match: '\\s([a-zA-Z0-9:_.-]+)(=)?' + }, + 'html-comment': { + begin: '|=>)', name: 'keyword.operator.arrow.julia'}, + { + match: + '\\.?(?:<-->|->|-->|<--|←|→|↔|↚|↛|↞|↠|↢|↣|↦|↤|↮|⇎|⇍|⇏|⇐|⇒|⇔|⇴|⇶|⇷|⇸|⇹|⇺|⇻|⇼|⇽|⇾|⇿|⟵|⟶|⟷|⟹|⟺|⟻|⟼|⟽|⟾|⟿|⤀|⤁|⤂|⤃|⤄|⤅|⤆|⤇|⤌|⤍|⤎|⤏|⤐|⤑|⤔|⤕|⤖|⤗|⤘|⤝|⤞|⤟|⤠|⥄|⥅|⥆|⥇|⥈|⥊|⥋|⥎|⥐|⥒|⥓|⥖|⥗|⥚|⥛|⥞|⥟|⥢|⥤|⥦|⥧|⥨|⥩|⥪|⥫|⥬|⥭|⥰|⧴|⬱|⬰|⬲|⬳|⬴|⬵|⬶|⬷|⬸|⬹|⬺|⬻|⬼|⬽|⬾|⬿|⭀|⭁|⭂|⭃|⥷|⭄|⥺|⭇|⭈|⭉|⭊|⭋|⭌|←|→|⇜|⇝|↜|↝|↩|↪|↫|↬|↼|↽|⇀|⇁|⇄|⇆|⇇|⇉|⇋|⇌|⇚|⇛|⇠|⇢|↷|↶|↺|↻|=>)', + name: 'keyword.operator.arrow.julia' + }, { match: '(?::=|\\+=|-=|\\*=|//=|/=|\\.//=|\\./=|\\.\\*=|\\\\=|\\.\\\\=|\\^=|\\.\\^=|%=|\\.%=|÷=|\\.÷=|\\|=|&=|\\.&=|⊻=|\\.⊻=|\\$=|<<=|>>=|>>>=|=(?!=))', @@ -224,7 +240,7 @@ const grammar = { }, { match: - '(?:===|∈|\\.∈|∉|\\.∉|∋|\\.∋|∌|\\.∌|≈|\\.≈|≉|\\.≉|≠|\\.≠|≡|\\.≡|≢|\\.≢|⊆|\\.⊆|⊇|\\.⊇|⊈|\\.⊈|⊉|\\.⊉|⊊|\\.⊊|⊋|\\.⊋|\\.==|!==|!=|\\.>=|\\.>|\\.<=|\\.<|\\.≤|\\.≥|==|\\.!=|\\.=|\\.!|<:|>:|:>|(?)>=|(?|<|≥|≤)', + '(\\.?((?)>=|>|<|≥|≤|===|==|≡|!=|≠|!==|≢|∈|∉|∋|∌|⊆|⊈|⊂|⊄|⊊|∝|∊|∍|∥|∦|∷|∺|∻|∽|∾|≁|≃|≂|≄|≅|≆|≇|≈|≉|≊|≋|≌|≍|≎|≐|≑|≒|≓|≖|≗|≘|≙|≚|≛|≜|≝|≞|≟|≣|≦|≧|≨|≩|≪|≫|≬|≭|≮|≯|≰|≱|≲|≳|≴|≵|≶|≷|≸|≹|≺|≻|≼|≽|≾|≿|⊀|⊁|⊃|⊅|⊇|⊉|⊋|⊏|⊐|⊑|⊒|⊜|⊩|⊬|⊮|⊰|⊱|⊲|⊳|⊴|⊵|⊶|⊷|⋍|⋐|⋑|⋕|⋖|⋗|⋘|⋙|⋚|⋛|⋜|⋝|⋞|⋟|⋠|⋡|⋢|⋣|⋤|⋥|⋦|⋧|⋨|⋩|⋪|⋫|⋬|⋭|⋲|⋳|⋴|⋵|⋶|⋷|⋸|⋹|⋺|⋻|⋼|⋽|⋾|⋿|⟈|⟉|⟒|⦷|⧀|⧁|⧡|⧣|⧤|⧥|⩦|⩧|⩪|⩫|⩬|⩭|⩮|⩯|⩰|⩱|⩲|⩳|⩵|⩶|⩷|⩸|⩹|⩺|⩻|⩼|⩽|⩾|⩿|⪀|⪁|⪂|⪃|⪄|⪅|⪆|⪇|⪈|⪉|⪊|⪋|⪌|⪍|⪎|⪏|⪐|⪑|⪒|⪓|⪔|⪕|⪖|⪗|⪘|⪙|⪚|⪛|⪜|⪝|⪞|⪟|⪠|⪡|⪢|⪣|⪤|⪥|⪦|⪧|⪨|⪩|⪪|⪫|⪬|⪭|⪮|⪯|⪰|⪱|⪲|⪳|⪴|⪵|⪶|⪷|⪸|⪹|⪺|⪻|⪼|⪽|⪾|⪿|⫀|⫁|⫂|⫃|⫄|⫅|⫆|⫇|⫈|⫉|⫊|⫋|⫌|⫍|⫎|⫏|⫐|⫑|⫒|⫓|⫔|⫕|⫖|⫗|⫘|⫙|⫷|⫸|⫹|⫺|⊢|⊣|⟂|⫪|⫫|<:|>:))', name: 'keyword.operator.relation.julia' }, { @@ -246,12 +262,12 @@ const grammar = { }, {match: '(?:\\|>)', name: 'keyword.operator.applies.julia'}, { - match: '(?:\\||\\.\\||\\&|\\.\\&|~|\\.~|⊻|\\.⊻)', + match: '(?:\\||\\.\\||\\&|\\.\\&|~|¬|\\.~|⊻|\\.⊻)', name: 'keyword.operator.bitwise.julia' }, { match: - '(?:\\+\\+|--|\\+|\\.\\+|-|\\.\\-|\\*|\\.\\*|//(?!=)|\\.//(?!=)|/|\\./|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^|÷|\\.÷|⋅|\\.⋅|∩|\\.∩|∪|\\.∪|×|√|∛)', + '\\.?(?:\\+\\+|\\-\\-|\\+|\\-|−|¦|\\||⊕|⊖|⊞|⊟|∪|∨|⊔|±|∓|∔|∸|≏|⊎|⊻|⊽|⋎|⋓|⟇|⧺|⧻|⨈|⨢|⨣|⨤|⨥|⨦|⨧|⨨|⨩|⨪|⨫|⨬|⨭|⨮|⨹|⨺|⩁|⩂|⩅|⩊|⩌|⩏|⩐|⩒|⩔|⩖|⩗|⩛|⩝|⩡|⩢|⩣|\\*|//?|⌿|÷|%|&|·|·|⋅|∘|×|\\\\|∩|∧|⊗|⊘|⊙|⊚|⊛|⊠|⊡|⊓|∗|∙|∤|⅋|≀|⊼|⋄|⋆|⋇|⋉|⋊|⋋|⋌|⋏|⋒|⟑|⦸|⦼|⦾|⦿|⧶|⧷|⨇|⨰|⨱|⨲|⨳|⨴|⨵|⨶|⨷|⨸|⨻|⨼|⨽|⩀|⩃|⩄|⩋|⩍|⩎|⩑|⩓|⩕|⩘|⩚|⩜|⩞|⩟|⩠|⫛|⊍|▷|⨝|⟕|⟖|⟗|⨟|\\^|↑|↓|⇵|⟰|⟱|⤈|⤉|⤊|⤋|⤒|⤓|⥉|⥌|⥍|⥏|⥑|⥔|⥕|⥘|⥙|⥜|⥝|⥠|⥡|⥣|⥥|⥮|⥯|↑|↓|√|∛|∜|⋆|±|∓)', name: 'keyword.operator.arithmetic.julia' }, {match: '(?:∘)', name: 'keyword.operator.compose.julia'}, @@ -264,7 +280,7 @@ const grammar = { name: 'keyword.operator.relation.in.julia' }, { - match: '(?:\\.(?=(?:@|_|\\p{L}))|\\.\\.+)', + match: '(?:\\.(?=(?:@|_|\\p{L}))|\\.\\.+|…|⁝|⋮|⋱|⋰|⋯)', name: 'keyword.operator.dots.julia' }, {match: '(?:\\$)(?=.+)', name: 'keyword.operator.interpolation.julia'}, @@ -299,10 +315,33 @@ const grammar = { 1: {name: 'meta.bracket.julia'}, 2: {name: 'keyword.operator.transpose.julia'} }, - patterns: [{include: '$self'}] + patterns: [{include: '#self_no_for_block'}] } ] }, + punctuation: { + patterns: [ + {match: ',', name: 'punctuation.separator.comma.julia'}, + {match: ';', name: 'punctuation.separator.semicolon.julia'} + ] + }, + self_no_for_block: { + patterns: [ + {include: '#operator'}, + {include: '#array'}, + {include: '#string'}, + {include: '#parentheses'}, + {include: '#bracket'}, + {include: '#function_decl'}, + {include: '#function_call'}, + {include: '#keyword'}, + {include: '#number'}, + {include: '#comment'}, + {include: '#type_decl'}, + {include: '#symbol'}, + {include: '#punctuation'} + ] + }, string: { patterns: [ { @@ -328,11 +367,14 @@ const grammar = { 1: {name: 'support.function.macro.julia'}, 2: {name: 'punctuation.definition.string.begin.julia'} }, - contentName: 'meta.embedded.inline.cpp', + contentName: 'source.cpp', end: '"""', endCaptures: {0: {name: 'punctuation.definition.string.end.julia'}}, name: 'embed.cxx.julia', - patterns: [{include: '#string_dollar_sign_interpolate'}] + patterns: [ + {include: 'source.c++'}, + {include: '#string_dollar_sign_interpolate'} + ] }, { begin: '(py)(""")', @@ -340,7 +382,7 @@ const grammar = { 1: {name: 'support.function.macro.julia'}, 2: {name: 'punctuation.definition.string.begin.julia'} }, - contentName: 'meta.embedded.inline.python', + contentName: 'source.python', end: '([\\s\\w]*)(""")', endCaptures: {2: {name: 'punctuation.definition.string.end.julia'}}, name: 'embed.python.julia', @@ -355,7 +397,7 @@ const grammar = { 1: {name: 'support.function.macro.julia'}, 2: {name: 'punctuation.definition.string.begin.julia'} }, - contentName: 'meta.embedded.inline.javascript', + contentName: 'source.js', end: '"""', endCaptures: {0: {name: 'punctuation.definition.string.end.julia'}}, name: 'embed.js.julia', @@ -370,7 +412,7 @@ const grammar = { 1: {name: 'support.function.macro.julia'}, 2: {name: 'punctuation.definition.string.begin.julia'} }, - contentName: 'meta.embedded.inline.r', + contentName: 'source.r', end: '"""', endCaptures: {0: {name: 'punctuation.definition.string.end.julia'}}, name: 'embed.R.julia', @@ -387,7 +429,8 @@ const grammar = { }, end: '"""', endCaptures: {0: {name: 'punctuation.definition.string.end.julia'}}, - name: 'string.quoted.other.julia' + name: 'string.quoted.other.julia', + patterns: [{include: '#string_escaped_char'}] }, { begin: '(raw)(")', @@ -397,7 +440,8 @@ const grammar = { }, end: '"', endCaptures: {0: {name: 'punctuation.definition.string.end.julia'}}, - name: 'string.quoted.other.julia' + name: 'string.quoted.other.julia', + patterns: [{include: '#string_escaped_char'}] }, { begin: '(sql)(""")', @@ -414,8 +458,18 @@ const grammar = { {include: '#string_dollar_sign_interpolate'} ] }, - {begin: 'var"""', end: '"""', name: 'constant.other.symbol.julia'}, - {begin: 'var"', end: '"', name: 'constant.other.symbol.julia'}, + { + begin: 'var"""', + end: '"""', + name: 'constant.other.symbol.julia', + patterns: [{include: '#string_escaped_char'}] + }, + { + begin: 'var"', + end: '"', + name: 'constant.other.symbol.julia', + patterns: [{include: '#string_escaped_char'}] + }, { begin: '^\\s?(doc)?(""")\\s?$', beginCaptures: { @@ -566,18 +620,16 @@ const grammar = { patterns: [ { match: - '\\$(?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*', + '\\$(?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿]|[^\\p{^Sc}$])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿]|[^\\p{^Sc}$])*', name: 'variable.interpolation.julia' }, { - begin: '\\$\\(', + begin: '\\$(\\()', + beginCaptures: {1: {name: 'meta.bracket.julia'}}, end: '\\)', + endCaptures: {0: {name: 'meta.bracket.julia'}}, name: 'variable.interpolation.julia', - patterns: [ - {match: '\\bfor\\b', name: 'keyword.control.julia'}, - {include: '#parentheses'}, - {include: '$self'} - ] + patterns: [{include: '#self_no_for_block'}] } ] }, diff --git a/lang/source.lean4.js b/lang/source.lean4.js index a524233..3c0e1b0 100644 --- a/lang/source.lean4.js +++ b/lang/source.lean4.js @@ -17,7 +17,7 @@ const grammar = { '\\b(? for more info. /** @type {import('../lib/index.js').Grammar} */ const grammar = { - extensions: [ - '.asd', - '.cl', - '.l', - '.l', - '.lfe', - '.lisp', - '.lisp', - '.lsp', - '.lsp', - '.nl', - '.nlogo', - '.ny', - '.podsl', - '.sexp', - '.srt' - ], + extensions: ['.lfe', '.nl', '.nlogo', '.srt'], extensionsWithDot: ['.md'], names: [ - 'common-lisp', 'gcc-machine-description', 'lfe', - 'lisp', 'netlogo', 'newlisp', 'picolisp', diff --git a/lang/source.lua.js b/lang/source.lua.js index 0a5dfd6..31401db 100644 --- a/lang/source.lua.js +++ b/lang/source.lua.js @@ -1,5 +1,7 @@ // This is a TextMate grammar distributed by `starry-night`. -// This grammar is licensed permissive. +// This grammar is developed at +// +// and licensed `mit`. // See for more info. /** @type {import('../lib/index.js').Grammar} */ const grammar = { @@ -16,165 +18,482 @@ const grammar = { names: ['lua'], patterns: [ { - begin: - '\\b(?:(local)\\s+)?(function)\\s*(?:\\s+([a-zA-Z_][a-zA-Z0-9_]*(?:([\\.:])[a-zA-Z_][a-zA-Z0-9_]*)?)\\s*)?(\\()', + begin: '\\b(?:(local)\\s+)?(function)\\b(?![,:])', beginCaptures: { - 1: {name: 'storage.modifier.local.lua'}, - 2: {name: 'keyword.control.lua'}, - 3: {name: 'entity.name.function.lua'}, - 4: {name: 'punctuation.separator.parameter.lua'}, - 5: {name: 'punctuation.definition.parameters.begin.lua'} + 1: {name: 'keyword.local.lua'}, + 2: {name: 'keyword.control.lua'} }, - end: '\\)', - endCaptures: {0: {name: 'punctuation.definition.parameters.end.lua'}}, + end: '(?<=[\\)\\-{}\\[\\]"\'])', name: 'meta.function.lua', patterns: [ + {include: '#comment'}, { - match: '[a-zA-Z_][a-zA-Z0-9_]*', - name: 'variable.parameter.function.lua' + begin: '(\\()', + beginCaptures: { + 1: {name: 'punctuation.definition.parameters.begin.lua'} + }, + end: '(\\))|(?=[\\-\\.{}\\[\\]"\'])', + endCaptures: { + 1: {name: 'punctuation.definition.parameters.finish.lua'} + }, + name: 'meta.parameter.lua', + patterns: [ + {include: '#comment'}, + { + match: '[a-zA-Z_][a-zA-Z0-9_]*', + name: 'variable.parameter.function.lua' + }, + {match: ',', name: 'punctuation.separator.arguments.lua'}, + { + begin: ':', + beginCaptures: {0: {name: 'punctuation.separator.arguments.lua'}}, + end: '(?=[\\),])', + patterns: [{include: '#emmydoc.type'}] + } + ] + }, + { + match: '\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=:)', + name: 'entity.name.class.lua' }, - {match: ',', name: 'punctuation.separator.arguments.lua'} + { + match: '\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b', + name: 'entity.name.function.lua' + } ] }, - { - match: '(?'}, + { + match: '\\<[a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*\\>', + name: 'storage.type.generic.lua' }, { match: - '\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|function|local|in)\\b', + '\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\\b', name: 'keyword.control.lua' }, + {match: '\\b(local|global)\\b', name: 'keyword.local.lua'}, + {match: '\\b(function)\\b(?![,:])', name: 'keyword.control.lua'}, { match: - '(?=?|(?=?|(?|\\<', name: 'keyword.operator.lua'} + ] + }, + { + beginCaptures: {0: {name: 'storage.type.annotation.lua'}}, + end: '(?=[\\n@#])', + patterns: [ + { + match: '\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)', + name: 'support.class.lua' + }, + {match: '#', name: 'keyword.operator.lua'} + ] + }, + { + beginCaptures: {0: {name: 'storage.type.annotation.lua'}}, + end: '(?=[\\n@#])', + patterns: [ + { + begin: '([a-zA-Z_\\-0-9]+)[ \\t]*(:)?', + beginCaptures: { + 1: {name: 'keyword.other.unit'}, + 2: {name: 'keyword.operator.unit'} + }, + end: '(?=\\n)', + patterns: [ + { + match: '\\b([a-zA-Z_\\*][a-zA-Z0-9_\\-]*)', + name: 'support.class.lua' + }, + {match: ',', name: 'keyword.operator.lua'} + ] + } + ] + }, + { + beginCaptures: {0: {name: 'storage.type.annotation.lua'}}, + end: '(?=[\\n@#])', + patterns: [{include: '#string'}] + }, + {name: 'storage.type.annotation.lua'}, + { + begin: '(?<=---)\\|\\s*[\\>\\+]?', + beginCaptures: {0: {name: 'storage.type.annotation.lua'}}, + end: '(?=[\\n@#])', + patterns: [{include: '#string'}] + } + ] + }, + 'emmydoc.type': { + patterns: [ + { + begin: '\\bfun\\b', + beginCaptures: {0: {name: 'keyword.control.lua'}}, + end: '(?=[\\s#])', + patterns: [ + {match: '[\\(\\),:\\?][ \\t]*', name: 'keyword.operator.lua'}, + { + match: + '([a-zA-Z_][a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]*)(?', + name: 'storage.type.generic.lua' + }, + {match: '\\basync\\b', name: 'entity.name.tag.lua'}, + {match: '[\\{\\}\\:\\,\\?\\|\\`][ \\t]*', name: 'keyword.operator.lua'}, + { + begin: '(?=[a-zA-Z_\\.\\*"\'\\[])', + end: '(?=[\\s\\)\\,\\?\\:\\}\\|#])', + patterns: [ + { + match: '([a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]+)(? )(\\b\\w+\\b)([^\\S\\n]+)(?# B> )((?!(\\+|-|\\*|\\.\\*|\\/|\\.\\/|\\\\|\\.\\\\|\\^|\\.\\^|==|~=|&|&&|\\||\\|\\||=|:|>|>=|<|<=|\\.\\.\\.)[^\\S\\n]?)[^\\s({=;%][^\\n;%]*)', + '(?<=^|[^.]\\n|;|,|=)([^\\S\\n]*)(?# A> )(\\b\\w+\\b)([^\\S\\n]+)(?# B> )((?!(\\+|-|\\*|\\.\\*|\\/|\\.\\/|\\\\|\\.\\\\|\\^|\\.\\^|==|~=|&|&&|\\||\\|\\||=|:|>|>=|<|<=|\\.{3})[^\\S\\n]?)[^\\s({=;%][^\\n;%]*)', name: 'meta.function-call.command.matlab' }, comment_block: { @@ -590,11 +590,10 @@ const grammar = { patterns: [ { begin: '\\G', - end: '(?<=[\\)\\n])', name: 'meta.function.declaration.matlab', patterns: [ { - begin: '\\G(?=.*?=)', + begin: '\\G(?=[^\\(]*?(?:=|\\[|\\.{3}))', contentName: 'meta.assignment.variable.output.matlab', end: '\\s*(=)\\s*', endCaptures: { @@ -611,7 +610,7 @@ const grammar = { name: 'punctuation.section.assignment.group.end.matlab' } }, - match: '(\\])\\s*\\z' + match: '(\\])\\s*' }, { match: '[a-zA-Z][a-zA-Z0-9_]*', @@ -621,12 +620,12 @@ const grammar = { match: ',', name: 'punctuation.separator.parameter.comma.matlab' }, - {include: '#comments'}, - {include: '#line_continuation'} + {include: '#line_continuation'}, + {include: '#comments'} ] }, { - match: '[a-zA-Z][a-zA-Z0-9_.]*(?=[^a-zA-Z0-9_.])', + match: '[a-zA-Z][a-zA-Z0-9_]*(?>\\.[a-zA-Z0-9_]+)*', name: 'entity.name.function.matlab', patterns: [ {match: '\\.', name: 'punctuation.accessor.dot.matlab'}, @@ -634,7 +633,7 @@ const grammar = { ] }, { - begin: '(?<=[a-zA-Z0-9_])\\s*\\(', + begin: '\\s*\\(', beginCaptures: { 0: {name: 'punctuation.definition.parameters.begin.matlab'} }, @@ -657,6 +656,7 @@ const grammar = { {include: '#line_continuation'} ] }, + {include: '#line_continuation'}, {include: '#comments'} ] }, @@ -764,7 +764,7 @@ const grammar = { 1: {name: 'punctuation.separator.continuation.line.matlab'}, 2: {name: 'comment.continuation.line.matlab'} }, - match: '(\\.\\.\\.)(.*)$', + match: '(\\.{3})(.*)$', name: 'meta.continuation.line.matlab' }, multiple_assignment: { @@ -820,12 +820,12 @@ const grammar = { }, { match: - '(?<=[a-zA-Z0-9\\s])(\\+|-|\\*|\\.\\*|/|\\./|\\\\|\\.\\\\|\\^|\\.\\^)(?=[a-zA-Z0-9\\s]|(?:\\.\\.\\.))', + '(?<=[a-zA-Z0-9\\s])(\\+|-|\\*|\\.\\*|/|\\./|\\\\|\\.\\\\|\\^|\\.\\^)(?=[a-zA-Z0-9\\s]|(?:\\.{3}))', name: 'keyword.operator.arithmetic.matlab' }, { match: - '(?<=[a-zA-Z0-9\\s])(==|~=|&|&&|\\||\\|\\|)(?=[a-zA-Z0-9\\s]|(?:\\.\\.\\.))', + '(?<=[a-zA-Z0-9\\s])(==|~=|&|&&|\\||\\|\\|)(?=[a-zA-Z0-9\\s]|(?:\\.{3}))', name: 'keyword.operator.logical.matlab' }, { @@ -834,12 +834,11 @@ const grammar = { }, { match: - '(?<=[a-zA-Z0-9_\\s(){,]|^):(?=[a-zA-Z0-9_\\s()},]|$||(?:\\.\\.\\.))', + '(?<=[a-zA-Z0-9_\\s(){,]|^):(?=[a-zA-Z0-9_\\s()},]|$||(?:\\.{3}))', name: 'keyword.operator.vector.colon.matlab' }, { - match: - '(?<=[a-zA-Z0-9\\s])(>|>=|<|<=)(?=[a-zA-Z0-9\\s]|(?:\\.\\.\\.))', + match: '(?<=[a-zA-Z0-9\\s])(>|>=|<|<=)(?=[a-zA-Z0-9\\s]|(?:\\.{3}))', name: 'keyword.operator.relational.matlab' } ] diff --git a/lang/source.mdx.js b/lang/source.mdx.js index 4448ed1..7f561ab 100644 --- a/lang/source.mdx.js +++ b/lang/source.mdx.js @@ -2625,7 +2625,7 @@ const grammar = { }, 'extension-gfm-table': { begin: '(?:^|\\G)[\\t ]*(?=\\|[^\\n\\r]+\\|[ \\t]*$)', - end: '^(?=[\\t ]*$)', + end: '^(?=[\\t ]*$)|$', patterns: [ { captures: {1: {patterns: [{include: '#markdown-text'}]}}, @@ -2700,7 +2700,7 @@ const grammar = { }, 'extension-mdx-esm': { begin: '(?:^|\\G)(?=(?i:export|import)[ ])', - end: '^(?=[\\t ]*$)', + end: '^(?=[\\t ]*$)|$', name: 'meta.embedded.tsx', patterns: [{include: 'source.tsx#statements'}] }, diff --git a/lang/source.modula2.js b/lang/source.modula2.js index 96d4c0a..815aebd 100644 --- a/lang/source.modula2.js +++ b/lang/source.modula2.js @@ -5,8 +5,8 @@ // See for more info. /** @type {import('../lib/index.js').Grammar} */ const grammar = { - extensions: [], - names: ['modula-2'], + extensions: ['.ob2'], + names: ['modula-2', 'oberon'], patterns: [ { captures: { diff --git a/lang/source.mojo.js b/lang/source.mojo.js new file mode 100644 index 0000000..69c3b7e --- /dev/null +++ b/lang/source.mojo.js @@ -0,0 +1,2414 @@ +// This is a TextMate grammar distributed by `starry-night`. +// This grammar is developed at +// +// and licensed `mit`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: ['.mojo'], + names: ['mojo'], + patterns: [{include: '#statement'}, {include: '#expression'}], + repository: { + 'annotated-parameter': { + begin: '(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n', + beginCaptures: { + 1: {name: 'variable.parameter.function.language.python'}, + 2: {name: 'punctuation.separator.annotation.python'} + }, + end: '(,)|(?=\\))', + endCaptures: {1: {name: 'punctuation.separator.parameters.python'}}, + patterns: [ + {include: '#expression'}, + {match: '=(?!=)', name: 'keyword.operator.assignment.python'} + ] + }, + 'assignment-operator': { + match: + '(?x)\n <<= | >>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =(?!=)\n', + name: 'keyword.operator.assignment.python' + }, + backticks: { + begin: '\\`', + end: '(?:\\`|(?))', + name: 'comment.typehint.punctuation.notation.python' + }, + { + match: '([[:alpha:]_]\\w*)', + name: 'comment.typehint.variable.notation.python' + } + ] + }, + {include: '#comments-base'} + ] + }, + 'comments-base': { + begin: '(\\#)', + beginCaptures: {1: {name: 'punctuation.definition.comment.python'}}, + end: '($)', + name: 'comment.line.number-sign.python', + patterns: [{include: '#codetags'}] + }, + 'comments-string-double-three': { + begin: '(\\#)', + beginCaptures: {1: {name: 'punctuation.definition.comment.python'}}, + end: '($|(?="""))', + name: 'comment.line.number-sign.python', + patterns: [{include: '#codetags'}] + }, + 'comments-string-single-three': { + begin: '(\\#)', + beginCaptures: {1: {name: 'punctuation.definition.comment.python'}}, + end: "($|(?='''))", + name: 'comment.line.number-sign.python', + patterns: [{include: '#codetags'}] + }, + 'curly-braces': { + begin: '\\{', + beginCaptures: {0: {name: 'punctuation.definition.dict.begin.python'}}, + end: '\\}', + endCaptures: {0: {name: 'punctuation.definition.dict.end.python'}}, + patterns: [ + {match: ':', name: 'punctuation.separator.dict.python'}, + {include: '#expression'} + ] + }, + decorator: { + begin: '(?x)\n ^\\s*\n ((@)) \\s* (?=[[:alpha:]_]\\w*)\n', + beginCaptures: { + 1: {name: 'entity.name.function.decorator.python'}, + 2: {name: 'punctuation.definition.decorator.python'} + }, + end: '(?x)\n ( \\) )\n # trailing whitespace and comments are legal\n (?: (.*?) (?=\\s*(?:\\#|$)) )\n | (?=\\n|\\#)\n', + endCaptures: { + 1: {name: 'punctuation.definition.arguments.end.python'}, + 2: {name: 'invalid.illegal.decorator.python'} + }, + name: 'meta.function.decorator.python', + patterns: [{include: '#decorator-name'}, {include: '#function-arguments'}] + }, + 'decorator-name': { + patterns: [ + {include: '#builtin-callables'}, + {include: '#illegal-object-name'}, + { + captures: {2: {name: 'punctuation.separator.period.python'}}, + match: '(?x)\n ([[:alpha:]_]\\w*) | (\\.)\n', + name: 'entity.name.function.decorator.python' + }, + {include: '#line-continuation'}, + { + captures: {1: {name: 'invalid.illegal.decorator.python'}}, + match: '(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n', + name: 'invalid.illegal.decorator.python' + } + ] + }, + 'double-one-regexp-character-set': { + patterns: [ + {match: '(?x)\n \\[ \\^? \\] (?! .*?\\])\n'}, + { + begin: '(\\[)(\\^)?(\\])?', + beginCaptures: { + 1: { + name: 'punctuation.character.set.begin.regexp constant.other.set.regexp' + }, + 2: {name: 'keyword.operator.negation.regexp'}, + 3: {name: 'constant.character.set.regexp'} + }, + end: '(\\]|(?="))|((?=(?)\n', + beginCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp' + }, + 2: {name: 'entity.name.tag.named.group.regexp'} + }, + end: '(\\)|(?="))|((?=(?)\n', + beginCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp' + }, + 2: {name: 'entity.name.tag.named.group.regexp'} + }, + end: '(\\)|(?="""))', + endCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp' + }, + 2: {name: 'invalid.illegal.newline.python'} + }, + name: 'meta.named.regexp', + patterns: [ + {include: '#double-three-regexp-expression'}, + {include: '#comments-string-double-three'} + ] + }, + 'double-three-regexp-parentheses': { + begin: '\\(', + beginCaptures: { + 0: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp' + } + }, + end: '(\\)|(?="""))', + endCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.end.regexp' + }, + 2: {name: 'invalid.illegal.newline.python'} + }, + patterns: [ + {include: '#double-three-regexp-expression'}, + {include: '#comments-string-double-three'} + ] + }, + 'double-three-regexp-parentheses-non-capturing': { + begin: '\\(\\?:', + beginCaptures: { + 0: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp' + } + }, + end: '(\\)|(?="""))', + endCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp' + }, + 2: {name: 'invalid.illegal.newline.python'} + }, + patterns: [ + {include: '#double-three-regexp-expression'}, + {include: '#comments-string-double-three'} + ] + }, + ellipsis: {match: '\\.\\.\\.', name: 'constant.other.ellipsis.python'}, + 'escape-sequence': { + match: + '(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | [0-7]{1,3}\n | [\\\\"\'abfnrtv]\n )\n', + name: 'constant.character.escape.python' + }, + 'escape-sequence-unicode': { + patterns: [ + { + match: + '(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n | N\\{[\\w\\s]+?\\}\n )\n', + name: 'constant.character.escape.python' + } + ] + }, + expression: { + patterns: [ + {include: '#expression-base'}, + {include: '#member-access'}, + {match: '(?x) \\b ([[:alpha:]_]\\w*) \\b'} + ] + }, + 'expression-bare': { + patterns: [ + {include: '#backticks'}, + {include: '#illegal-anno'}, + {include: '#literal'}, + {include: '#regexp'}, + {include: '#string'}, + {include: '#lambda'}, + {include: '#generator'}, + {include: '#illegal-operator'}, + {include: '#operator'}, + {include: '#curly-braces'}, + {include: '#item-access'}, + {include: '#list'}, + {include: '#odd-function-call'}, + {include: '#round-braces'}, + {include: '#function-call'}, + {include: '#builtin-functions'}, + {include: '#builtin-types'}, + {include: '#builtin-exceptions'}, + {include: '#magic-names'}, + {include: '#special-names'}, + {include: '#illegal-names'}, + {include: '#special-variables'}, + {include: '#ellipsis'}, + {include: '#punctuation'}, + {include: '#line-continuation'} + ] + }, + 'expression-base': { + patterns: [ + {include: '#comments'}, + {include: '#expression-bare'}, + {include: '#line-continuation'} + ] + }, + 'f-expression': { + patterns: [ + {include: '#expression-bare'}, + {include: '#member-access'}, + {match: '(?x) \\b ([[:alpha:]_]\\w*) \\b'} + ] + }, + 'fregexp-base-expression': { + patterns: [ + {include: '#fregexp-quantifier'}, + {include: '#fstring-formatting-braces'}, + {match: '\\{.*?\\}'}, + {include: '#regexp-base-common'} + ] + }, + 'fregexp-quantifier': { + match: '(?x)\n \\{\\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\\}\n', + name: 'keyword.operator.quantifier.regexp' + }, + 'fstring-fnorm-quoted-multi-line': { + begin: '(\\b[fF])([bBuU])?(\'\'\'|""")', + beginCaptures: { + 1: { + name: 'string.interpolated.python string.quoted.multi.python storage.type.string.python' + }, + 2: {name: 'invalid.illegal.prefix.python'}, + 3: { + name: 'punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python' + } + }, + end: '(\\3)', + endCaptures: { + 1: { + name: 'punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python' + }, + 2: {name: 'invalid.illegal.newline.python'} + }, + name: 'meta.fstring.python', + patterns: [ + {include: '#fstring-guts'}, + {include: '#fstring-illegal-multi-brace'}, + {include: '#fstring-multi-brace'}, + {include: '#fstring-multi-core'} + ] + }, + 'fstring-fnorm-quoted-single-line': { + begin: '(\\b[fF])([bBuU])?(([\'"]))', + beginCaptures: { + 1: { + name: 'string.interpolated.python string.quoted.single.python storage.type.string.python' + }, + 2: {name: 'invalid.illegal.prefix.python'}, + 3: { + name: 'punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python' + } + }, + end: '(\\3)|((?=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n' + }, + {include: '#fstring-terminator-multi-tail'} + ] + }, + 'fstring-terminator-multi-tail': { + begin: '((?:=?)(?:![rsa])?)(:)(?=.*?{)', + beginCaptures: { + 1: {name: 'storage.type.format.python'}, + 2: {name: 'storage.type.format.python'} + }, + end: '(?=})', + patterns: [ + {include: '#fstring-illegal-multi-brace'}, + {include: '#fstring-multi-brace'}, + {match: '([bcdeEfFgGnosxX%])(?=})', name: 'storage.type.format.python'}, + {match: '(\\.\\d+)', name: 'storage.type.format.python'}, + {match: '(,)', name: 'storage.type.format.python'}, + {match: '(\\d+)', name: 'storage.type.format.python'}, + {match: '(\\#)', name: 'storage.type.format.python'}, + {match: '([-+ ])', name: 'storage.type.format.python'}, + {match: '([<>=^])', name: 'storage.type.format.python'}, + {match: '(\\w)', name: 'storage.type.format.python'} + ] + }, + 'fstring-terminator-single': { + patterns: [ + {match: '(=(![rsa])?)(?=})', name: 'storage.type.format.python'}, + {match: '(=?![rsa])(?=})', name: 'storage.type.format.python'}, + { + captures: { + 1: {name: 'storage.type.format.python'}, + 2: {name: 'storage.type.format.python'} + }, + match: + '(?x)\n ( (?: =?) (?: ![rsa])? )\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n' + }, + {include: '#fstring-terminator-single-tail'} + ] + }, + 'fstring-terminator-single-tail': { + begin: '((?:=?)(?:![rsa])?)(:)(?=.*?{)', + beginCaptures: { + 1: {name: 'storage.type.format.python'}, + 2: {name: 'storage.type.format.python'} + }, + end: '(?=})|(?=\\n)', + patterns: [ + {include: '#fstring-illegal-single-brace'}, + {include: '#fstring-single-brace'}, + {match: '([bcdeEfFgGnosxX%])(?=})', name: 'storage.type.format.python'}, + {match: '(\\.\\d+)', name: 'storage.type.format.python'}, + {match: '(,)', name: 'storage.type.format.python'}, + {match: '(\\d+)', name: 'storage.type.format.python'}, + {match: '(\\#)', name: 'storage.type.format.python'}, + {match: '([-+ ])', name: 'storage.type.format.python'}, + {match: '([<>=^])', name: 'storage.type.format.python'}, + {match: '(\\w)', name: 'storage.type.format.python'} + ] + }, + 'function-arguments': { + begin: '(\\()', + beginCaptures: { + 1: {name: 'punctuation.definition.arguments.begin.python'} + }, + contentName: 'meta.function-call.arguments.python', + end: '(?=\\))(?!\\)\\s*\\()', + patterns: [ + {match: '(,)', name: 'punctuation.separator.arguments.python'}, + { + captures: {1: {name: 'keyword.operator.unpacking.arguments.python'}}, + match: '(?x)\n (?:(?<=[,(])|^) \\s* (\\*{1,2})\n' + }, + {include: '#lambda-incomplete'}, + {include: '#illegal-names'}, + { + captures: { + 1: {name: 'variable.parameter.function-call.python'}, + 2: {name: 'keyword.operator.assignment.python'} + }, + match: '\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)' + }, + {match: '=(?!=)', name: 'keyword.operator.assignment.python'}, + {include: '#expression'}, + { + captures: { + 1: {name: 'punctuation.definition.arguments.end.python'}, + 2: {name: 'punctuation.definition.arguments.begin.python'} + }, + match: '\\s*(\\))\\s*(\\()' + } + ] + }, + 'function-call': { + begin: '(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n', + end: '(\\))', + endCaptures: {1: {name: 'punctuation.definition.arguments.end.python'}}, + name: 'meta.function-call.python', + patterns: [ + {include: '#special-variables'}, + {include: '#function-name'}, + {include: '#function-arguments'} + ] + }, + 'function-declaration': { + begin: + '(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def|fn)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* [\\(\\[]\n )\n', + beginCaptures: { + 1: {name: 'storage.type.function.async.python'}, + 2: {name: 'storage.type.function.python'} + }, + end: '(:|(?=[#\'"\\n]))', + endCaptures: {1: {name: 'punctuation.section.function.begin.python'}}, + name: 'meta.function.python', + patterns: [ + {include: '#raises-modifier'}, + {include: '#function-def-name'}, + {include: '#parameters'}, + {include: '#meta_parameters'}, + {include: '#line-continuation'}, + {include: '#return-annotation'} + ] + }, + 'function-def-name': { + patterns: [ + {include: '#illegal-object-name'}, + {include: '#builtin-possible-callables'}, + { + match: '(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n', + name: 'entity.name.function.python' + } + ] + }, + 'function-name': { + patterns: [ + {include: '#builtin-possible-callables'}, + { + match: '(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n', + name: 'meta.function-call.generic.python' + } + ] + }, + generator: { + begin: '\\bfor\\b', + beginCaptures: {0: {name: 'keyword.control.flow.python'}}, + end: '\\bin\\b', + endCaptures: {0: {name: 'keyword.control.flow.python'}}, + patterns: [{include: '#expression'}] + }, + 'illegal-anno': {match: '->', name: 'invalid.illegal.annotation.python'}, + 'illegal-names': { + captures: { + 1: {name: 'keyword.control.flow.python'}, + 2: {name: 'keyword.control.import.python'} + }, + match: + '(?x)\n \\b(?:\n (\n and | assert | async | await | break | class | struct | trait | continue | def\n | fn\n | del | elif | else | except | finally | for | from | global\n | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n ) | (\n as | import\n )\n )\\b\n' + }, + 'illegal-object-name': { + match: '\\b(True|False|None)\\b', + name: 'keyword.illegal.name.python' + }, + 'illegal-operator': { + patterns: [ + {match: '&&|\\|\\||--|\\+\\+', name: 'invalid.illegal.operator.python'}, + {match: '[?$]', name: 'invalid.illegal.operator.python'}, + {match: '!\\b', name: 'invalid.illegal.operator.python'} + ] + }, + import: { + patterns: [ + { + begin: '\\b(?> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n\n | (:=) (?# 6)\n' + }, + 'parameter-special': { + captures: { + 1: {name: 'variable.parameter.function.language.python'}, + 2: {name: 'variable.parameter.function.language.special.self.python'}, + 3: {name: 'variable.parameter.function.language.special.cls.python'}, + 4: {name: 'punctuation.separator.parameters.python'} + }, + match: '(?x)\n \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n' + }, + parameters: { + begin: '(\\()', + beginCaptures: { + 1: {name: 'punctuation.definition.parameters.begin.python'} + }, + end: '(\\))', + endCaptures: {1: {name: 'punctuation.definition.parameters.end.python'}}, + name: 'meta.function.parameters.python', + patterns: [ + {match: '\\b(owned|borrowed|inout)\\b', name: 'storage.modifier'}, + {match: '/', name: 'keyword.operator.positional.parameter.python'}, + { + match: '(\\*\\*|\\*)', + name: 'keyword.operator.unpacking.parameter.python' + }, + {include: '#lambda-incomplete'}, + {include: '#illegal-names'}, + {include: '#illegal-object-name'}, + {include: '#parameter-special'}, + { + captures: { + 1: {name: 'variable.parameter.function.language.python'}, + 2: {name: 'punctuation.separator.parameters.python'} + }, + match: + '(?x)\n ([[:alpha:]_]\\w*)\n \\s* (?: (,) | (?=[)#\\n=]))\n' + }, + {include: '#comments'}, + {include: '#loose-default'}, + {include: '#annotated-parameter'} + ] + }, + punctuation: { + patterns: [ + {match: ':', name: 'punctuation.separator.colon.python'}, + {match: ',', name: 'punctuation.separator.element.python'} + ] + }, + 'raises-modifier': {match: '(raises)', name: 'storage.modifier'}, + regexp: { + patterns: [ + {include: '#regexp-single-three-line'}, + {include: '#regexp-double-three-line'}, + {include: '#regexp-single-one-line'}, + {include: '#regexp-double-one-line'} + ] + }, + 'regexp-backreference': { + captures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp' + }, + 2: {name: 'entity.name.tag.named.backreference.regexp'}, + 3: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp' + } + }, + match: '(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n', + name: 'meta.backreference.named.regexp' + }, + 'regexp-backreference-number': { + captures: {1: {name: 'entity.name.tag.backreference.regexp'}}, + match: '(\\\\[1-9]\\d?)', + name: 'meta.backreference.regexp' + }, + 'regexp-base-common': { + patterns: [ + {match: '\\.', name: 'support.other.match.any.regexp'}, + {match: '\\^', name: 'support.other.match.begin.regexp'}, + {match: '\\$', name: 'support.other.match.end.regexp'}, + {match: '[+*?]\\??', name: 'keyword.operator.quantifier.regexp'}, + {match: '\\|', name: 'keyword.operator.disjunction.regexp'}, + {include: '#regexp-escape-sequence'} + ] + }, + 'regexp-base-expression': { + patterns: [ + {include: '#regexp-quantifier'}, + {include: '#regexp-base-common'} + ] + }, + 'regexp-charecter-set-escapes': { + patterns: [ + {match: '\\\\[abfnrtv\\\\]', name: 'constant.character.escape.regexp'}, + {include: '#regexp-escape-special'}, + {match: '\\\\([0-7]{1,3})', name: 'constant.character.escape.regexp'}, + {include: '#regexp-escape-character'}, + {include: '#regexp-escape-unicode'}, + {include: '#regexp-escape-catchall'} + ] + }, + 'regexp-double-one-line': { + begin: '\\b(([uU]r)|([bB]r)|(r[bB]?))(")', + beginCaptures: { + 2: {name: 'invalid.deprecated.prefix.python'}, + 3: {name: 'storage.type.string.python'}, + 4: {name: 'storage.type.string.python'}, + 5: {name: 'punctuation.definition.string.begin.python'} + }, + end: '(")|(?)', + beginCaptures: { + 1: {name: 'punctuation.separator.annotation.result.python'} + }, + end: '(?=:)', + patterns: [{include: '#expression'}] + }, + 'round-braces': { + begin: '\\(', + beginCaptures: {0: {name: 'punctuation.parenthesis.begin.python'}}, + end: '\\)', + endCaptures: {0: {name: 'punctuation.parenthesis.end.python'}}, + patterns: [{include: '#expression'}] + }, + semicolon: { + patterns: [{match: '\\;$', name: 'invalid.deprecated.semicolon.python'}] + }, + 'single-one-regexp-character-set': { + patterns: [ + {match: '(?x)\n \\[ \\^? \\] (?! .*?\\])\n'}, + { + begin: '(\\[)(\\^)?(\\])?', + beginCaptures: { + 1: { + name: 'punctuation.character.set.begin.regexp constant.other.set.regexp' + }, + 2: {name: 'keyword.operator.negation.regexp'}, + 3: {name: 'constant.character.set.regexp'} + }, + end: "(\\]|(?=\\'))|((?=(?)\n', + beginCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp' + }, + 2: {name: 'entity.name.tag.named.group.regexp'} + }, + end: "(\\)|(?=\\'))|((?=(?)\n', + beginCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp' + }, + 2: {name: 'entity.name.tag.named.group.regexp'} + }, + end: "(\\)|(?=\\'\\'\\'))", + endCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp' + }, + 2: {name: 'invalid.illegal.newline.python'} + }, + name: 'meta.named.regexp', + patterns: [ + {include: '#single-three-regexp-expression'}, + {include: '#comments-string-single-three'} + ] + }, + 'single-three-regexp-parentheses': { + begin: '\\(', + beginCaptures: { + 0: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp' + } + }, + end: "(\\)|(?=\\'\\'\\'))", + endCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.end.regexp' + }, + 2: {name: 'invalid.illegal.newline.python'} + }, + patterns: [ + {include: '#single-three-regexp-expression'}, + {include: '#comments-string-single-three'} + ] + }, + 'single-three-regexp-parentheses-non-capturing': { + begin: '\\(\\?:', + beginCaptures: { + 0: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp' + } + }, + end: "(\\)|(?=\\'\\'\\'))", + endCaptures: { + 1: { + name: 'support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp' + }, + 2: {name: 'invalid.illegal.newline.python'} + }, + patterns: [ + {include: '#single-three-regexp-expression'}, + {include: '#comments-string-single-three'} + ] + }, + 'special-names': { + match: + '(?x)\n \\b\n # we want to see "enough", meaning 2 or more upper-case\n # letters in the beginning of the constant\n #\n # for more details refer to:\n # https://github.com/MagicStack/MagicPython/issues/42\n (\n _* [[:upper:]] [_\\d]* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n', + name: 'constant.other.caps.python' + }, + 'special-variables': { + captures: { + 1: {name: 'variable.language.special.self.python'}, + 2: {name: 'variable.language.special.cls.python'} + }, + match: '(?x)\n \\b (?=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n', + name: 'meta.format.brace.python' + }, + { + captures: { + 1: {name: 'constant.character.format.placeholder.other.python'}, + 3: {name: 'storage.type.format.python'}, + 4: {name: 'storage.type.format.python'} + }, + match: + '(?x)\n (\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]\'"]+\\])*\n (![rsa])?\n (:)\n [^\'"{}\\n]* (?:\n \\{ [^\'"}\\n]*? \\} [^\'"{}\\n]*\n )*\n }\n )\n', + name: 'meta.format.brace.python' + } + ] + }, + 'string-consume-escape': {match: '\\\\[\'"\\n\\\\]'}, + 'string-entity': { + patterns: [ + {include: '#escape-sequence'}, + {include: '#string-line-continuation'}, + {include: '#string-formatting'} + ] + }, + 'string-formatting': { + captures: { + 1: {name: 'constant.character.format.placeholder.other.python'} + }, + match: + '(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsab%]\n )\n', + name: 'meta.format.percent.python' + }, + 'string-line-continuation': { + match: '\\\\$', + name: 'constant.language.python' + }, + 'string-mojo-code-block': { + begin: '^(\\s*\\`{3,})(mojo)$', + beginCaptures: { + 1: {name: 'string.quoted.single.python'}, + 2: {name: 'string.quoted.single.python'} + }, + contentName: 'source.mojo', + end: '^(\\1)$', + endCaptures: {1: {name: 'string.quoted.single.python'}}, + name: 'meta.embedded.block.mojo', + patterns: [{include: 'source.mojo'}] + }, + 'string-multi-bad-brace1-formatting-raw': { + begin: + '(?x)\n (?= \\{%\n ( .*? (?!\'\'\'|""") )\n %\\}\n )\n', + end: '(?=\'\'\'|""")', + patterns: [{include: '#string-consume-escape'}] + }, + 'string-multi-bad-brace1-formatting-unicode': { + begin: + '(?x)\n (?= \\{%\n ( .*? (?!\'\'\'|""") )\n %\\}\n )\n', + end: '(?=\'\'\'|""")', + patterns: [ + {include: '#escape-sequence-unicode'}, + {include: '#escape-sequence'}, + {include: '#string-line-continuation'} + ] + }, + 'string-multi-bad-brace2-formatting-raw': { + begin: + '(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!\'\'\'|""") [^!:\\.\\[}\\w]\n )\n .*?(?!\'\'\'|""")\n \\}\n )\n', + end: '(?=\'\'\'|""")', + patterns: [ + {include: '#string-consume-escape'}, + {include: '#string-formatting'} + ] + }, + 'string-multi-bad-brace2-formatting-unicode': { + begin: + '(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!\'\'\'|""") [^!:\\.\\[}\\w]\n )\n .*?(?!\'\'\'|""")\n \\}\n )\n', + end: '(?=\'\'\'|""")', + patterns: [ + {include: '#escape-sequence-unicode'}, + {include: '#string-entity'} + ] + }, + 'string-quoted-multi-line': { + begin: '(?:\\b([rR])(?=[uU]))?([uU])?(\'\'\'|""")', + beginCaptures: { + 1: {name: 'invalid.illegal.prefix.python'}, + 2: {name: 'storage.type.string.python'}, + 3: {name: 'punctuation.definition.string.begin.python'} + }, + end: '(\\3)', + endCaptures: { + 1: {name: 'punctuation.definition.string.end.python'}, + 2: {name: 'invalid.illegal.newline.python'} + }, + name: 'string.quoted.multi.python', + patterns: [ + {include: '#string-multi-bad-brace1-formatting-unicode'}, + {include: '#string-multi-bad-brace2-formatting-unicode'}, + {include: '#string-unicode-guts'} + ] + }, + 'string-quoted-single-line': { + begin: '(?:\\b([rR])(?=[uU]))?([uU])?(([\'"]))', + beginCaptures: { + 1: {name: 'invalid.illegal.prefix.python'}, + 2: {name: 'storage.type.string.python'}, + 3: {name: 'punctuation.definition.string.begin.python'} + }, + end: '(\\3)|((?', name: 'keyword.operator.nushell'}, + {include: '#function-multiple-inout'} + ] + }, + 'function-multiple-inout': { beginCaptures: { 1: {name: 'punctuation.definition.in-out.nushell'}, - 2: {name: 'meta.brace.square.end.nushell'} + 2: {name: 'meta.brace.square.begin.nushell'} }, end: '\\]', endCaptures: {0: {name: 'meta.brace.square.end.nushell'}}, patterns: [ - {include: '#inout'}, - {match: ',', name: 'punctuation.separator.nushell'} + {include: '#types'}, + { + captures: {1: {name: 'punctuation.separator.nushell'}}, + match: '\\s*(,)\\s*' + }, + { + captures: {1: {name: 'keyword.operator.nushell'}}, + match: '\\s+(->)\\s+' + } ] }, 'function-parameter': { patterns: [ - {include: '#function-parameter-declare'}, - {include: '#function-parameter-default-value'} + { + captures: {1: {name: 'keyword.control.nushell'}}, + match: '(-{0,2}|\\.{3})[\\w-]+(?:\\((-[\\w?])\\))?', + name: 'variable.parameter.nushell' + }, + { + begin: '\\??:\\s*', + end: '(?=(?:\\s+(?:-{0,2}|\\.{3})[\\w-]+)|(?:\\s*(?:,|\\]|\\||@|=|#|$)))', + patterns: [{include: '#types'}] + }, + { + begin: '@(?="|\')', + end: '(?<="|\')', + patterns: [{include: '#string'}] + }, + { + begin: '=\\s*', + end: '(?=(?:\\s+-{0,2}[\\w-]+)|(?:\\s*(?:,|\\]|\\||#|$)))', + name: 'default.value.nushell', + patterns: [{include: '#value'}] + } ] }, - 'function-parameter-declare': { - captures: { - 1: {name: 'variable.parameter.nushell'}, - 2: {name: 'variable.parameter.nushell'}, - 3: {name: 'keyword.operator.nushell'}, - 4: {name: 'entity.name.type.nushell'}, - 5: {name: 'string.quoted.nushell'} - }, - match: - '(-{0,2}[\\w-]+|\\.{3})(?:\\((-[\\w?])\\))?(?:\\s*(\\??:)\\s*(\\w+)(?:@((?:"[^"]+")|(?:\'[^\']+\')))?)?' - }, - 'function-parameter-default-value': { - begin: '=\\s*', - captures: { - 1: {name: 'variable.parameter.nushell'}, - 2: {name: 'variable.parameter.nushell'}, - 3: {name: 'keyword.operator.nushell'}, - 4: {name: 'entity.name.type.nushell'} - }, - end: '(?=\\])|,|$', - patterns: [{include: '#value'}] - }, 'function-parameters': { begin: '\\[', beginCaptures: {0: {name: 'meta.brace.square.begin.nushell'}}, @@ -255,21 +303,13 @@ const grammar = { name: 'meta.function.parameters.nushell', patterns: [{include: '#function-parameter'}, {include: '#comment'}] }, - inout: { - captures: { - 1: {name: 'entity.name.type.nushell'}, - 2: {name: 'entity.name.type.nushell'}, - 3: {name: 'punctuation.separator.nushell'} - }, - match: '(\\w+|\\w+<\\w+>)\\s*->\\s*(\\w+|\\w+<\\w+>)\\s*(,)?\\s*' - }, 'internal-variables': { match: '\\$(?:nu|env)\\b', name: 'variable.language.nushell' }, keyword: {match: '(?:def(?:-env)?)', name: 'keyword.other.nushell'}, module: { - begin: '(module)\\s+([\\w\\-]+)\\s*\\{', + begin: '((?:export\\s+)?module)\\s+([\\w\\-]+)\\s*\\{', beginCaptures: { 1: {name: 'entity.name.function.nushell'}, 2: {name: 'entity.name.namespace.nushell'} @@ -297,7 +337,7 @@ const grammar = { }, 'operators-symbols': { match: - '(?<= )(?:\\+|\\-|\\*|\\/|\\/\\/|\\*\\*|!=|[<>=]=?|[!=]~|&&|\\|\\||\\||\\+\\+=?)(?= |$)', + '(?<= )(?:(?:\\+|\\-|\\*|\\/)=?|\\/\\/|\\*\\*|!=|[<>=]=?|[!=]~|\\+\\+=?)(?= |$)', name: 'keyword.control.nushell' }, 'operators-word': { @@ -305,7 +345,11 @@ const grammar = { '(?<= |\\()(?:mod|in|not-in|not|and|or|xor|bit-or|bit-and|bit-xor|bit-shl|bit-shr|starts-with|ends-with)(?= |\\)|$)', name: 'keyword.control.nushell' }, - parameters: {match: '\\b-{1,2}[\\w-]*', name: 'variable.parameter.nushell'}, + parameters: { + captures: {1: {name: 'keyword.control.nushell'}}, + match: '(?<=\\s)(-{1,2})[\\w-]+', + name: 'variable.parameter.nushell' + }, 'paren-expression': { begin: '\\(', beginCaptures: {0: {name: 'meta.brace.round.begin.nushell'}}, @@ -323,7 +367,8 @@ const grammar = { end: '(?=\\s+)', patterns: [{include: '#value'}] }, - ranges: {match: '\\.\\.', + name: 'meta.list.nushell', + patterns: [{include: '#types'}] + }, + { + begin: '\\b(record)\\s*<', + beginCaptures: {1: {name: 'entity.name.type.nushell'}}, + end: '>', + name: 'meta.record.nushell', + patterns: [ + { + captures: {1: {name: 'variable.parameter.nushell'}}, + match: "([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+')\\s*:\\s*" + }, + {include: '#types'} + ] + }, + {match: '\\b(\\w+)\\b', name: 'entity.name.type.nushell'} ] }, 'use-module': { @@ -479,7 +549,6 @@ const grammar = { {include: '#control-keywords'}, {include: '#constant-value'}, {include: '#table'}, - {include: '#parameters'}, {include: '#operators'}, {include: '#paren-expression'}, {include: '#braced-expression'}, diff --git a/lang/source.p4.js b/lang/source.p4.js index 807e431..5bb6643 100644 --- a/lang/source.p4.js +++ b/lang/source.p4.js @@ -30,21 +30,26 @@ const grammar = { }, { match: - '\\b(header_type|header|metadata|field_list|field_list_calculation|parser|parser_exception|parser_value_set|counter|meter|register|action|action_profile|table|control|extern)\\b', + '\\b(struct|package|header|metadata|parser|transition|state|actions|action|table|key|control|extern|verify)\\b', name: 'storage.type.object.p4' }, - {match: '\\b(bool|bit|varbit|int)\\b', name: 'storage.data.type.p4'}, + { + match: '\\b(void|const|bool|varbit|int|typedef|tuple|enum)\\b', + name: 'storage.data.type.p4' + }, + {match: 'bit(<\\d+>)', name: 'support.type.bit.p4'}, { match: '\\b(hit|miss|latest|return|default)\\b', name: 'variable.language.p4' }, { - match: '\\b(if|else if|else|return|hit|miss|true|false)\\b', + match: + '\\b(if|else if|else|return|hit|miss|true|false|inout|in|out|exit)\\b', name: 'keyword.control.p4' }, {match: '\\b(and|or)\\b', name: 'keyword.operator.p4'}, { - match: '\\b(exact|ternary|lpm|range|valid|mask)\\b', + match: '\\b(exact|ternary|lpm|range|valid|mask|match_kind)\\b', name: 'entity.name.type.p4' }, { @@ -60,15 +65,21 @@ const grammar = { }, {match: '\\b(length|fields|max_length)\\b', name: 'entity.name.type.p4'}, {match: '\\#include', name: 'meta.preprocessor.include.p4'}, + { + match: '\\#ifndef|\\#ifdef|\\#if|\\#else|\\#endif|\\#elif', + name: 'meta.preprocessor.p4' + }, {match: '\\#define', name: 'meta.preprocessor.define.p4'}, { match: '\\b(apply|valid|select|current|extract|add_header|copy_header|remove_header|modify_field|add_to_field|add|set_field_to_hash_index|truncate|drop|no_op|push|pop|count|meter|generate_digest|resubmit|recirculate|clone_ingress_pkt_to_ingress|clone_egress_pkt_to_ingress|clone_ingress_pkt_to_egress|clone_egress_pkt_to_egress|register_write|register_read)\\b', name: 'support.function.primitive.p4' }, + {match: '@\\w+', name: 'storage.type.annotation.p4'}, {match: '[a-zA-Z_][0-9a-zA-Z_]*', name: 'support.any-method.p4'}, {match: "[\\+|-]?[0-9]+'[0-9]+", name: 'constant.numeric.p4'}, {match: '0(x|X)[0-9a-fA-F]+', name: 'constant.numeric.p4'}, + {match: '\\dw\\d+', name: 'constant.numeric.p4'}, {match: '0(b|B)[01]+', name: 'constant.numeric.p4'}, {match: '[0-9]+', name: 'constant.numeric.p4'}, {match: '\\b(true|false)\\b', name: 'constant.language.p4'} diff --git a/lang/source.pip-requirements.js b/lang/source.pip-requirements.js new file mode 100644 index 0000000..81d6519 --- /dev/null +++ b/lang/source.pip-requirements.js @@ -0,0 +1,41 @@ +// This is a TextMate grammar distributed by `starry-night`. +// This grammar is developed at +// +// and licensed `mit`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: [], + names: ['pip-requirements'], + patterns: [ + {match: '\\s*\\\\s*$', name: 'constant.character.escape'}, + {match: '#.*', name: 'comment.line.number-sign'}, + {begin: "'", end: "'", name: 'string.quoted.single'}, + {begin: '"', end: '"', name: 'string.quoted.double'}, + {match: '/?(\\S+/)+\\S*', name: 'string.path'}, + { + captures: {1: {name: 'entity.name.class'}}, + match: '^\\s*([A-Za-z0-9][A-Za-z0-9._-]*[A-Za-z0-9]|[A-Za-z0-9])' + }, + {captures: {1: {name: 'entity.name.tag'}}, match: '\\[([^\\]]+)\\]'}, + { + captures: { + 1: {name: 'keyword.operator.comparison'}, + 2: {name: 'constant.numeric'} + }, + match: '(<|<=|!=|==|>=|>|~=|===)\\s*([\\w.*+!-]+)' + }, + { + captures: { + 1: {name: 'entity.name.selector'}, + 2: {name: 'keyword.operator.comparison'} + }, + match: + ';\\s*(python_version|python_full_version|os_name|sys_platform|platform_release|platform_system|platform_version|platform_machine|platform_python_implementation|implementation_name|implementation_version|extra)\\s*(<|<=|!=|==|>=|>|~=|===)' + }, + {match: '-[^\\s=]+', name: 'entity.other.attribute-name'} + ], + scopeName: 'source.pip-requirements' +} + +export default grammar diff --git a/lang/source.praat.js b/lang/source.praat.js index a49b2d7..f2c7e58 100644 --- a/lang/source.praat.js +++ b/lang/source.praat.js @@ -43,7 +43,7 @@ const grammar = { }, control: { match: - '\\b(for|while|end(for|while|if|form|proc)|from|to|repeat|until|if|then|fi|else|elsif|elif|nowarn|noprogress|nocheck|assert|form|call|procedure|Edit)\\b', + '\\b(for|while|end(for|while|if|form|proc|editor)|from|to|repeat|until|if|then|fi|else|elsif|elif|nowarn|noprogress|nocheck|assert|form|call|procedure|Edit|editor)\\b', name: 'keyword.control.praat' }, 'file-function': { diff --git a/lang/source.r.js b/lang/source.r.js index fd71f4e..828a0ed 100644 --- a/lang/source.r.js +++ b/lang/source.r.js @@ -4,7 +4,7 @@ /** @type {import('../lib/index.js').Grammar} */ const grammar = { extensions: ['.r', '.rd', '.rsx'], - names: ['r', 'r', 'rscript', 'splus'], + names: ['r', 'rscript', 'splus'], patterns: [ { captures: { diff --git a/lang/source.rascal.js b/lang/source.rascal.js index 8879d6a..085484e 100644 --- a/lang/source.rascal.js +++ b/lang/source.rascal.js @@ -49,7 +49,6 @@ const grammar = { regex: { patterns: [ { - begin: '/(?!/|\\*)', end: '/([dims]*)', endCaptures: {1: {name: 'storage.modifier.regex.rascal'}}, name: 'string.regexp.rascal', diff --git a/lang/source.rescript.js b/lang/source.rescript.js index 67bf469..60d60e9 100644 --- a/lang/source.rescript.js +++ b/lang/source.rescript.js @@ -20,7 +20,6 @@ const grammar = { {include: '#attribute'}, {include: '#function'}, {include: '#list'}, - {include: '#bracketAccess'}, {include: '#jsx'}, {include: '#operator'}, {include: '#number'}, @@ -29,7 +28,7 @@ const grammar = { {include: '#moduleAccess'}, {include: '#constructor'}, {include: '#keyword'}, - {include: '#punctuations'}, + {include: '#punctuation'}, {include: '#defaultIdIsVariable'} ], repository: { @@ -88,12 +87,6 @@ const grammar = { } ] }, - bracketAccess: { - patterns: [ - {match: '\\[', name: 'punctuation.section.brackets.begin'}, - {match: '\\]', name: 'punctuation.section.brackets.end'} - ] - }, character: { patterns: [{match: "'[\\x00-\\x7F]'", name: 'string.quoted.single'}] }, @@ -281,7 +274,7 @@ const grammar = { {match: '\\|>', name: 'invalid.deprecated'} ] }, - punctuations: { + punctuation: { patterns: [ {match: '~', name: 'punctuation.definition.keyword'}, {match: ';', name: 'punctuation.terminator'}, @@ -291,6 +284,8 @@ const grammar = { {match: '\\|(?!\\|)', name: 'punctuation.separator'}, {match: '\\{', name: 'punctuation.section.braces.begin'}, {match: '\\}', name: 'punctuation.section.braces.end'}, + {match: '\\[', name: 'punctuation.section.brackets.begin'}, + {match: '\\]', name: 'punctuation.section.brackets.end'}, {match: '\\(', name: 'punctuation.section.parens.begin'}, {match: '\\)', name: 'punctuation.section.parens.end'} ] @@ -303,12 +298,12 @@ const grammar = { end: '"', endCaptures: {1: {name: 'punctuation.definition.string.end'}}, name: 'string.quoted.double', - patterns: [{match: '\\\\.', name: 'constant.character.escape'}] + patterns: [{include: '#string-character-escape'}] }, { begin: '([a-z_][0-9a-zA-Z_]*)?(`)', beginCaptures: { - 1: {name: 'variables.annotation'}, + 1: {name: 'entity.name.function'}, 2: {name: 'punctuation.definition.string.template.begin'} }, end: '(? +// and licensed `mit`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: ['.roc'], + names: ['roc'], + patterns: [ + {match: '(\\b_[a-zA-Z0-9_]*\\b)', name: 'keyword.unused.roc'}, + { + match: + '\\b(dbg|if|then|else|when|is|app|packages|imports?|provides|to|as|expect|exposes)\\s+', + name: 'keyword.control.roc' + }, + {include: '#comments'}, + {include: '#strings'}, + {include: '#numbers'}, + {include: '#punctuation'}, + {include: '#module-member-access'}, + {include: '#language-components'}, + {include: '#infix_op'}, + {include: '#type-signature'} + ], + repository: { + arrow: {match: '->', name: 'punctuation.separator.arrow.roc'}, + brackets: {match: '(\\}|\\{)', name: 'punctuation.bracket.roc'}, + comma: {match: '(,)', name: 'punctuation.separator.comma.roc'}, + comments: { + patterns: [ + { + begin: '#', + captures: {1: {name: 'punctuation.definition.comment.roc'}}, + end: '$', + name: 'comment.line.number-sign.roc' + }, + { + begin: '##', + captures: {1: {name: 'punctuation.definition.comment.roc'}}, + end: '$', + name: 'comment.block.documentation.roc' + } + ] + }, + constructor: { + match: '\\b[A-Z][a-zA-Z0-9_]*\\b', + name: 'entity.name.type.roc' + }, + infix_op: { + match: + '(|<\\?>|<\\||<=|\\|\\||&&|>=|\\|>|\\|=|\\|\\.|\\+\\+|::|/=|==|//|>>|<<|<|>|\\^|\\+|-|/|\\*)', + name: 'keyword.operator.roc' + }, + 'language-components': { + patterns: [ + {include: '#constructor'}, + {include: '#unit'}, + {include: '#top-level-value'}, + {include: '#record-accessor'} + ] + }, + 'module-member-access': { + begin: '([A-Z][a-zA-Z0-9_]*)(\\.)', + beginCaptures: { + 1: {name: 'support.class.roc'}, + 2: {name: 'keyword.other.period.roc'} + }, + end: '\\s', + name: 'meta.module.access.roc', + patterns: [ + {include: '#module-member-access'}, + {include: '#constructor'}, + {match: "\\b[a-z][a-zA-Z0-9_']*\\b", name: 'support.function.roc'} + ] + }, + numbers: { + patterns: [{include: '#numbers_float'}, {include: '#numbers_int'}] + }, + numbers_float: { + match: + '\\b([0-9][0-9_]*\\.[0-9_]+(e-?[0-9_]+)?|[0-9][0-9_]*e-?[0-9][0-9_]*)\\b', + name: 'constant.numeric.float.roc' + }, + numbers_int: {match: '\\b([0-9][0-9_]*)\\b', name: 'constant.numeric.roc'}, + parens: {match: '(\\(|\\))', name: 'punctuation.parens.roc'}, + period: {match: '[.]', name: 'keyword.other.period.roc'}, + punctuation: { + patterns: [ + {include: '#brackets'}, + {include: '#sq_brackets'}, + {include: '#parens'}, + {include: '#comma'}, + {include: '#arrow'} + ] + }, + 'record-accessor': { + captures: { + 1: {name: 'keyword.other.period.roc'}, + 2: {name: 'entity.name.function.record-field.roc'} + }, + match: '(\\.)([a-z][a-zA-Z0-9_]*)', + name: 'meta.record.accessor' + }, + sq_brackets: {match: '(\\]|\\[)', name: 'punctuation.bracket.roc'}, + strings: { + patterns: [ + { + begin: '"', + beginCaptures: {0: {name: 'punctuation.definition.string.begin.roc'}}, + end: '"', + endCaptures: {0: {name: 'punctuation.definition.string.end.roc'}}, + name: 'string.quoted.double.roc', + patterns: [ + { + begin: '\\\\u\\(', + beginCaptures: {0: {name: 'constant.character.escape.roc'}}, + end: '\\)', + endCaptures: {0: {name: 'constant.character.escape.roc'}}, + name: 'invalid.illegal', + patterns: [{match: '[0-9a-fA-F]+', name: 'constant.numeric.roc'}] + }, + { + match: '\\\\[nrt\\\\\\"\\\\]', + name: 'constant.character.escape.roc' + }, + { + begin: '\\$\\(', + beginCaptures: {0: {name: 'constant.character.escape.roc'}}, + end: '\\)', + endCaptures: {0: {name: 'constant.character.escape.roc'}}, + name: 'source.roc', + patterns: [ + { + match: '\\b(dbg|expect|if|then|else|when|is|as)\\s+', + name: 'keyword.control.roc' + }, + {include: '#comments'}, + {include: '#strings'}, + {include: '#numbers'}, + {include: '#punctuation'}, + {include: '#module-member-access'}, + {include: '#language-components'}, + {include: '#infix_op'}, + {include: '#type-signature'} + ] + } + ] + }, + { + begin: "'", + beginCaptures: {0: {name: 'punctuation.definition.string.begin.roc'}}, + end: "'", + endCaptures: {0: {name: 'punctuation.definition.string.end.roc'}}, + name: 'string.quoted.single.roc', + patterns: [ + {match: "\\\\[nrt\\\\'\\\\]", name: 'constant.character.escape.roc'} + ] + } + ] + }, + 'top-level-value': { + match: "^[a-z][a-zA-Z0-9_']*\\b", + name: 'entity.name.function.top_level.roc' + }, + 'type-record': { + begin: '(\\{)', + beginCaptures: {1: {name: 'punctuation.section.braces.begin'}}, + end: '(\\})', + endCaptures: {1: {name: 'punctuation.section.braces.end'}}, + name: 'meta.function.type-record.roc', + patterns: [ + {match: '\\s+', name: 'punctuation.spaces.roc'}, + {match: '->', name: 'keyword.operator.arrow.roc'}, + { + captures: { + 1: {name: 'entity.name.record.field.roc'}, + 2: {name: 'keyword.other.roc'} + }, + match: '([a-z][a-zA-Z0-9_]*)\\s+(\\:)', + name: 'meta.record.field.roc' + }, + {match: '\\,', name: 'punctuation.separator.comma.roc'}, + {match: '\\b[a-z][a-zA-Z0-9_]*\\b', name: 'variable.type.roc'}, + {match: '\\b[A-Z][a-zA-Z0-9_]*\\b', name: 'storage.type.roc'}, + {include: '#comments'}, + {include: '#type-record'} + ] + }, + 'type-signature': { + begin: "^([a-z_][a-zA-Z0-9_']*)\\s+(\\:)", + beginCaptures: { + 1: {name: 'entity.name.function.roc'}, + 2: {name: 'keyword.other.colon.roc'} + }, + end: '((^(?=[a-z]))|^$)', + name: 'meta.function.type-declaration.roc', + patterns: [ + {match: '\\s+', name: 'punctuation.spaces.roc'}, + {include: '#module-member-access'}, + {match: '\\b[a-z][a-zA-Z0-9_]*\\b', name: 'variable.type.roc'}, + {match: '\\b[A-Z][a-zA-Z0-9_]*\\b', name: 'storage.type.class.roc'}, + {include: '#arrow'}, + {include: '#unit'}, + {include: '#comma'}, + {include: '#parens'}, + {include: '#comments'}, + {include: '#type-record'} + ] + }, + unit: {match: '\\(\\)', name: 'constant.unit.roc'} + }, + scopeName: 'source.roc' +} + +export default grammar diff --git a/lang/source.rust.js b/lang/source.rust.js index 60b87e7..9fbe015 100644 --- a/lang/source.rust.js +++ b/lang/source.rust.js @@ -156,8 +156,16 @@ const grammar = { }, comments: { patterns: [ - {match: '^\\s*///.*', name: 'comment.line.documentation.rust'}, - {match: '\\s*//.*', name: 'comment.line.double-slash.rust'} + { + captures: {1: {name: 'punctuation.definition.comment.rust'}}, + match: '(///).*$', + name: 'comment.line.documentation.rust' + }, + { + captures: {1: {name: 'punctuation.definition.comment.rust'}}, + match: '(//).*$', + name: 'comment.line.double-slash.rust' + } ] }, constants: { @@ -351,7 +359,7 @@ const grammar = { {match: '\\b(abstract|static)\\b', name: 'storage.modifier.rust'}, { match: - '\\b(as|async|become|box|dyn|move|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b', + '\\b(as|async|become|box|dyn|move|final|gen|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b', name: 'keyword.other.rust' }, {match: '\\bfn\\b', name: 'keyword.other.fn.rust'}, diff --git a/lang/source.scala.js b/lang/source.scala.js index abb7ddc..f71b688 100644 --- a/lang/source.scala.js +++ b/lang/source.scala.js @@ -64,26 +64,43 @@ const grammar = { ] }, 'char-literal': { - begin: "'", - beginCaptures: { - 0: {name: 'punctuation.definition.character.begin.scala'} - }, - end: "'|$", - endCaptures: {0: {name: 'punctuation.definition.character.end.scala'}}, - name: 'string.quoted.other constant.character.literal.scala', patterns: [ { - match: '\\\\(?:[btnfr\\\\"\']|[0-7]{1,3}|u[0-9A-Fa-f]{4})', - name: 'constant.character.escape.scala' - }, - { - match: '\\\\.', - name: 'invalid.illegal.unrecognized-character-escape.scala' + captures: { + 1: {name: 'punctuation.definition.character.begin.scala'}, + 2: {name: 'punctuation.definition.character.end.scala'} + }, + match: "(')'(')", + name: 'string.quoted.other constant.character.literal.scala' }, - {match: "[^']{2,}", name: 'invalid.illegal.character-literal-too-long'}, { - match: "(?=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?' + '\\b(val)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?(?!")' }, { captures: { @@ -220,11 +241,11 @@ const grammar = { 2: {name: 'variable.volatile.declaration.scala'} }, match: - '\\b(var)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?' + '\\b(var)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?(?!")' }, { captures: { - 1: {name: 'keyword.other.scoping.scala'}, + 1: {name: 'keyword.other.package.scala'}, 2: {name: 'keyword.declaration.scala'}, 3: {name: 'entity.name.class.declaration'} }, @@ -233,7 +254,7 @@ const grammar = { }, { begin: '\\b(package)\\s+', - beginCaptures: {1: {name: 'keyword.other.import.scala'}}, + beginCaptures: {1: {name: 'keyword.other.package.scala'}}, end: '(?<=[\\n;])', name: 'meta.package.scala', patterns: [ @@ -329,6 +350,7 @@ const grammar = { patterns: [ {include: '#comments'}, {match: '\\b(given)\\b', name: 'keyword.other.import.given.scala'}, + {match: '\\s(as)\\s', name: 'keyword.other.import.as.scala'}, { match: '[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?', diff --git a/lang/source.slice.js b/lang/source.slice.js index e954658..7f015bc 100644 --- a/lang/source.slice.js +++ b/lang/source.slice.js @@ -1,975 +1,2 @@ -// This is a TextMate grammar distributed by `starry-night`. -// This grammar is developed at -// -// and licensed `bsd-3-clause`. -// See for more info. -/** @type {import('../lib/index.js').Grammar} */ -const grammar = { - extensions: [], - names: ['slice'], - patterns: [{include: '#slice'}], - repository: { - attribute: { - patterns: [{include: '#attribute.file'}, {include: '#attribute.local'}] - }, - 'attribute.directive': { - begin: '[\\w]+(?:(::)\\w+)*', - beginCaptures: { - 0: {name: 'entity.name.function.attribute.slice'}, - 1: {name: 'punctuation.separator.double-colon.slice'} - }, - end: '(?=\\])|$', - patterns: [ - {include: '#comment'}, - { - begin: '\\(', - beginCaptures: { - 0: {name: 'punctuation.parenthesis.open.attribute.slice'} - }, - end: '(?=\\])|$', - name: 'meta.attribute.arguments.slice', - patterns: [ - {include: '#comment'}, - {include: '#string-literal'}, - { - match: '\\b\\w+\\b', - name: 'variable.other.constant.attribute.slice' - }, - {match: ',', name: 'punctuation.separator.comma.slice'}, - { - begin: '\\)', - beginCaptures: { - 0: {name: 'punctuation.parenthesis.close.attribute.slice'} - }, - end: '(?=\\])|$', - patterns: [{include: '#comment'}, {include: '#error'}] - }, - {include: '#error'} - ] - }, - {include: '#error'} - ] - }, - 'attribute.file': { - begin: '\\[\\[', - beginCaptures: { - 0: {name: 'punctuation.double-bracket.open.attribute.slice'} - }, - end: '(\\]\\])|$', - endCaptures: { - 1: {name: 'punctuation.double-bracket.close.attribute.slice'} - }, - name: 'meta.attribute.file.slice', - patterns: [ - {include: '#comment'}, - {include: '#attribute.directive'}, - {include: '#error'} - ] - }, - 'attribute.local': { - begin: '\\[', - beginCaptures: {0: {name: 'punctuation.bracket.open.attribute.slice'}}, - end: '(\\]|$)', - endCaptures: {1: {name: 'punctuation.bracket.close.attribute.slice'}}, - name: 'meta.attribute.local.slice', - patterns: [ - {include: '#comment'}, - {include: '#attribute.directive'}, - {include: '#error'} - ] - }, - class: { - begin: '(?', name: 'punctuation.definition.returns.slice'}, - {match: ',', name: 'punctuation.separator.comma.slice'}, - { - begin: '\\(', - beginCaptures: {0: {name: 'punctuation.parenthesis.open.slice'}}, - end: '\\)', - endCaptures: {0: {name: 'punctuation.parenthesis.close.slice'}}, - name: 'meta.parameter-list.slice', - patterns: [ - {include: '#tag'}, - {include: '#parameter'}, - {match: ',', name: 'punctuation.separator.comma.slice'}, - {include: '#slice'} - ] - }, - { - captures: { - 0: { - name: 'entity.name.function.slice', - patterns: [{include: '#field.identifier'}] - } - }, - match: '\\\\?\\w+(?=\\s*\\()' - }, - {include: '#slice'} - ] - }, - parameter: { - begin: '\\\\?\\w+', - beginCaptures: { - 0: { - name: 'entity.name.variable.slice', - patterns: [{include: '#field.identifier'}] - } - }, - end: '(?=[,\\)])|$', - name: 'meta.parameter.slice', - patterns: [ - {include: '#standard'}, - { - begin: ':', - beginCaptures: {0: {name: 'punctuation.separator.colon.slice'}}, - end: '(?=[,\\)])|$', - patterns: [ - {include: '#standard'}, - {match: '\\bstream\\b', name: 'storage.modifier.stream.slice'}, - {include: '#type.identifier'}, - {include: '#error'} - ] - }, - {include: '#error'} - ] - }, - preprocessor: { - patterns: [ - {include: '#preprocessor.define'}, - {include: '#preprocessor.undef'}, - {include: '#preprocessor.if'}, - {include: '#preprocessor.elif'}, - {include: '#preprocessor.else'}, - {include: '#preprocessor.endif'}, - {include: '#preprocessor.unknown'}, - {include: '#preprocessor.unknown'} - ] - }, - 'preprocessor.define': { - begin: '^\\s*((#)\\s*define)\\b', - beginCaptures: { - 1: {name: 'keyword.control.preprocessor.undef.slice'}, - 2: {name: 'punctuation.definition.preprocessor.slice'} - }, - end: '$', - name: 'meta.preprocessor.define.slice', - patterns: [ - {include: '#comment.line'}, - {include: '#preprocessor.single-identifier'}, - {include: '#error'} - ] - }, - 'preprocessor.elif': { - begin: '^\\s*((#)\\s*elif)\\b', - beginCaptures: { - 1: {name: 'keyword.control.preprocessor.elif.slice'}, - 2: {name: 'punctuation.definition.preprocessor.slice'} - }, - end: '$', - name: 'meta.preprocessor.elif.slice', - patterns: [{include: '#preprocessor.expression'}] - }, - 'preprocessor.else': { - begin: '^\\s*((#)\\s*else)\\b', - beginCaptures: { - 1: {name: 'keyword.control.preprocessor.else.slice'}, - 2: {name: 'punctuation.definition.preprocessor.slice'} - }, - end: '$', - name: 'meta.preprocessor.else.slice', - patterns: [{include: '#comment.line'}, {include: '#error'}] - }, - 'preprocessor.endif': { - begin: '^\\s*((#)\\s*endif)\\b', - beginCaptures: { - 1: {name: 'keyword.control.preprocessor.endif.slice'}, - 2: {name: 'punctuation.definition.preprocessor.slice'} - }, - end: '$', - name: 'meta.preprocessor.endif.slice', - patterns: [{include: '#comment.line'}, {include: '#error'}] - }, - 'preprocessor.expression': { - patterns: [ - {include: '#comment.line'}, - { - captures: { - 1: {name: 'keyword.operator.logical.not.slice'}, - 2: {name: 'keyword.operator.logical.and.slice'}, - 3: {name: 'keyword.operator.logical.or.slice'}, - 4: {name: 'punctuation.parenthesis.open.slice'}, - 5: {name: 'punctuation.parenthesis.close.slice'} - }, - match: '(!)|(&&)|(\\|\\|)|(\\()|(\\))' - }, - {include: '#preprocessor.identifier'}, - {include: '#error'} - ] - }, - 'preprocessor.identifier': { - patterns: [ - { - match: '\\b[a-zA-Z_]\\w*\\b', - name: 'constant.other.symbol.preprocessor.slice' - }, - {include: '#error'} - ] - }, - 'preprocessor.if': { - begin: '^\\s*((#)\\s*if)\\b', - beginCaptures: { - 1: {name: 'keyword.control.preprocessor.if.slice'}, - 2: {name: 'punctuation.definition.preprocessor.slice'} - }, - end: '$', - name: 'meta.preprocessor.if.slice', - patterns: [{include: '#preprocessor.expression'}] - }, - 'preprocessor.single-identifier': { - begin: '\\b\\w+\\b', - beginCaptures: {0: {patterns: [{include: '#preprocessor.identifier'}]}}, - end: '$', - patterns: [{include: '#comment.line'}, {include: '#error'}] - }, - 'preprocessor.undef': { - begin: '^\\s*((#)\\s*undef)\\b', - beginCaptures: { - 1: {name: 'keyword.control.preprocessor.undef.slice'}, - 2: {name: 'punctuation.definition.preprocessor.slice'} - }, - end: '$', - name: 'meta.preprocessor.undef.slice', - patterns: [ - {include: '#comment.line'}, - {include: '#preprocessor.single-identifier'}, - {include: '#error'} - ] - }, - 'preprocessor.unknown': { - begin: '^\\s*((#)\\s*\\w*)\\b', - beginCaptures: { - 1: {name: 'invalid.illegal.slice'}, - 2: {name: 'punctuation.definition.preprocessor.slice'} - }, - end: '$', - name: 'meta.preprocessor.unknown.slice', - patterns: [{include: '#comment.line'}, {include: '#error'}] - }, - 'reserved-identifiers': { - match: - '(?)\\s*(\\?)?', - endCaptures: { - 1: {name: 'punctuation.angle.close.slice'}, - 2: {name: 'punctuation.definition.optional.slice'} - }, - name: 'meta.generic.parameters.slice', - patterns: [ - {include: '#standard'}, - {match: ',', name: 'punctuation.separator.comma.slice'}, - {include: '#type.identifier'}, - {include: '#error'} - ] - }, - { - captures: { - 1: {patterns: [{include: '#type-name'}]}, - 2: {name: 'punctuation.definition.optional.slice'} - }, - match: '(?=\\b|\\W)([\\\\\\w:]+)\\s*(\\?)?(?<=\\b|\\W)' - } - ] - } - }, - scopeName: 'source.slice' -} - -export default grammar +// This is an alias, please use `source.ice.js` instead. +export {default} from './source.ice.js' diff --git a/lang/source.slint.js b/lang/source.slint.js new file mode 100644 index 0000000..46d5500 --- /dev/null +++ b/lang/source.slint.js @@ -0,0 +1,163 @@ +// This is a TextMate grammar distributed by `starry-night`. +// This grammar is developed at +// +// and licensed `mit`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: ['.slint'], + names: ['slint'], + patterns: [{include: '#document'}], + repository: { + 'block-comments': { + patterns: [ + { + begin: '/\\*', + end: '\\*/', + name: 'comment.block', + patterns: [{include: '#block-comments'}] + } + ] + }, + document: { + patterns: [ + {include: '#general'}, + {match: '(?' + }, + { + captures: { + 1: {name: 'entity.name.function'}, + 2: {name: 'entity.name.type'} + }, + match: '(?)', + patterns: [ + { + captures: {1: {name: 'entity.name.type'}}, + match: '<([a-zA-Z_][a-zA-Z0-9_-]*)>' + }, + {match: '[a-zA-Z_][a-zA-Z0-9_-]*', name: 'variable.parameter'}, + {match: '\\b(<=>|:)\\b', name: 'keyword.operator'} + ] + } + ] + } + }, + scopeName: 'source.slint' +} + +export default grammar diff --git a/lang/source.sourcepawn.js b/lang/source.sourcepawn.js index 759076c..441d936 100644 --- a/lang/source.sourcepawn.js +++ b/lang/source.sourcepawn.js @@ -1,6 +1,6 @@ // This is a TextMate grammar distributed by `starry-night`. // This grammar is developed at -// +// // and licensed `mit`. // See for more info. /** @type {import('../lib/index.js').Grammar} */ @@ -8,672 +8,641 @@ const grammar = { extensions: ['.sp'], names: ['sourcepawn', 'sourcemod'], patterns: [ - {include: '#keywords'}, - {include: '#strings'}, + {include: '#line_continuation_character'}, + {include: '#literals'}, {include: '#comments'}, - {include: '#builtIns'}, + {include: '#operators'}, + {include: '#preproc'}, { captures: { - 1: {name: 'keyword.other.sourcepawn'}, - 2: {name: 'string.sourcepawn'} + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type'}]} }, - match: '(\\#include|\\#tryinclude)\\s([<"](.+)[>"])', - name: 'meta.include.sourcepawn' + match: '(new)\\s+(\\w+)\\s*\\(' }, { captures: { - 1: {name: 'keyword.other.sourcepawn'}, - 2: {name: 'support.constant.core.sourcepawn'} + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type'}, {include: '#old-type'}]} }, - match: '(\\#define)\\s(\\w+)', - name: 'meta.define.sourcepawn' + match: '(view_as)\\s*<\\s*(\\w+)\\s*>' }, { - match: - '#(if|else|endif|emit|pragma|deprecated|undef|endinput|endscript|assert|define|error|warning|file)', - name: 'keyword.other.sourcepawn' + captures: { + 1: {patterns: [{include: '#old-type'}]}, + 2: {patterns: [{include: '#literals'}, {include: '#variable_name'}]} + }, + match: '(\\w+)\\:\\s*(\\w+)' }, { - match: '\\b(?:bool|char|const|float|int|void|any)\\b', - name: 'support.type.core.sourcepawn' + captures: { + 1: {patterns: [{include: '#type_name'}]}, + 2: {patterns: [{include: '#variable_name'}]} + }, + match: '(\\w+)\\:\\:(\\w*)' }, { - captures: {1: {name: 'entity.name.function.sourcepawn'}}, - match: '\\b([A-Za-z_][A-Za-z0-9_]*)\\s*\\(' + match: + '\\b(?:if|else|for|while|do|switch|case|default|return|break|continue)\\b', + name: 'keyword.control.statement.sourcepawn' }, - {match: '\\b\\[.+]\\b', name: 'meta.brackets.sourcepawn'}, - {match: '\\b[0-9]+\\.[0-9]+\\b', name: 'constant.numeric.float.sourcepawn'}, - {match: '\\b[0-9]+\\b', name: 'constant.numeric.integer.sourcepawn'}, - {match: '\\b0b[0-1]+\\b', name: 'constant.numeric.sourcepawn'}, - {match: '\\b0o[0-7]+\\b', name: 'constant.numeric.sourcepawn'}, - {match: '\\b0x[0-9a-fA-F]+\\b', name: 'constant.numeric.sourcepawn'}, + {include: '#other-keywords'}, + {include: '#methodmap'}, + {include: '#typedef'}, + {include: '#typeset'}, + {include: '#functag'}, + {include: '#funcenum'}, + {include: '#enum_struct'}, + {include: '#enum'}, + {include: '#struct'}, + {include: '#old-function-declaration'}, + {include: '#function-declaration'}, + {include: '#old-variable-declaration'}, + {include: '#variable-declaration'}, + {include: '#function-call'}, + {match: '\\bthis\\b', name: 'variable.language.sourcepawn'}, { - match: '\\b(?:true|false)\\b', - name: 'constant.language.boolean.sourcepawn' + captures: {1: {patterns: [{include: '#variable_name'}]}}, + match: '\\b(\\w+)\\b' } ], repository: { - builtIns: { + 'array-indexed-access': { patterns: [ - {include: '#constants'}, - { - match: - '\\b(?:Action|AmbientSHook|NormalSHook|Timer|AdminId|GroupId|AdminFlag|OverrideType|OverrideRule|AdminCachePart|AdmAccessMode|CookieAccess|CookieMenu|CookieMenuAction|CookieMenuHandler|AuthIdType|NetFlow|QueryCookie|Extension|SharedPlugin|ReplySource|CommandListener|ConCmd|SrvCmd|ConVarBounds|ConVar_Bounds|ConVarQueryResult|ConVarChanged|ConVarQueryFinished|Identity|ImmunityType|PluginInfo|PluginStatus|CSRoundEndReason|CSWeaponID|EventHook|DataPackPos|DBBindType|DBPriority|DBResult|PropFieldType|PropType|MoveType|RenderFx|RenderMode|EventHookMode|FileTimeMode|FileType|PathType|ExecType|ParamType|ClientRangeType|DialogType|EngineVersion|FindMapResult|KvDataTypes|MapChange|NominateResult|MenuAction|MenuSource|SQLConnectCallback|SQLQueryCallback|SQLTCallback|SQLTxnFailure|SQLTxnSuccess|GameLogHook|EntityOutput|MenuStyle|SDKHookCB|MenuHandler|VoteHandler|MultiTargetFilter|PlVers|RegexError|SDKHookType|UseType|SDKCallType|SDKFuncConfSource|TEHook|SortFunc1D|SortFunc2D|SortFuncADTArray|SDKLibrary|TraceEntityFilter|SDKPassMethod|SDKType|RoundState|RayType|ListenOverride|SortOrder|SortType|Address|APLRes|FeatureStatus|FeatureType|NumberType|TopMenuHandler|MsgHook|MsgPostHook|NativeCall|RequestFrameCallback|SMC_EndSection|SMC_KeyValue|SMC_NewSection|SMC_ParseEnd|SMC_ParseStart|SMC_RawLine|SMCError|SMCResult|TFClassType|TFCond|TFHoliday|TFObjectMode|TFObjectType|TFTeam|TFResourceType|TopMenuAction|TopMenuObject|TopMenuObjectType|TopMenuPosition|UserMessageType|UserMsg)\\b', - name: 'support.type.core.sourcepawn' - }, - { - match: - '\\b(?:ArrayList|ArrayStack|StringMap|StringMapSnapshot|BfRead|BfWrite|DataPack)\\b', - name: 'support.type.core.sourcepawn' - }, { - match: - '\\b(?:Plugin|Handle|ConVar|Cookie|Database|DBDriver|DBResultSet|DBStatement|GameData|Transaction|Event|File|DirectoryListing|KeyValues|Menu|Panel|Protobuf|Regex|SMCParser|TopMenu|Timer|FrameIterator|GlobalForward|PrivateForward|Profiler)\\b', - name: 'support.type.core.sourcepawn' + captures: { + 1: { + patterns: [ + {include: '#literals'}, + {include: '#other-keywords'}, + {include: '#function-call'}, + {include: '#variable_name'} + ] + } + }, + match: '\\[([^\\]]+)\\]' } ] }, - comments: { + 'boolean-literal': { patterns: [ - {match: '\\/\\/.*', name: 'comment.sourcepawn'}, { - begin: '/\\*', - captures: {0: {name: 'comment.sourcepawn'}}, - end: '\\*/', - name: 'comment.block.sourcepawn' + match: '\\b(?:true|false)\\b', + name: 'constant.language.boolean.sourcepawn' } ] }, - constants: { + comments: { patterns: [ { - match: - '\\b(?:MAXPLAYERS|MaxClients|REQUIRE_PLUGIN|REQUIRE_EXTENSIONS|MAX_NAME_LENGTH|MAX_TARGET_LENGTH|INVALID_FCVAR_FLAGS|NULL_VECTOR|NULL_STRING|AUTOLOAD_EXTENSIONS|PLATFORM_MAX_PATH|Path_SM|SP_PARAMFLAG_BYREF|INVALID_ENT_REFERENCE|INVALID_HANDLE|null|LANG_SERVER|PB_FIELD_NOT_REPEATED|MAX_LIGHTSTYLES|FEATURECAP_PLAYERRUNCMD_11PARAMS|INVALID_STRING_TABLE|INVALID_STRING_INDEX|INVALID_TOPMENUOBJECT|INVALID_MESSAGE_ID|QUERYCOOKIE_FAILED)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bADMFLAG_(?:RESERVATION|GENERIC|KICK|BAN|UNBAN|SLAY|CHANGEMAP|CONVARS|CONFIG|CHAT|VOTE|PASSWORD|RCON|CHEATS|ROOT|CUSTOM1|CUSTOM2|CUSTOM3|CUSTOM4|CUSTOM5|CUSTOM6)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bAUTHMETHOD_(?:STEAM|IP|NAME)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bINVALID_(?:GROUP_ID|ADMIN_ID)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bADMINMENU_(?:PLAYERCOMMANDS|SERVERCOMMANDS|VOTINGCOMMANDS)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bBANFLAG_(?:AUTO|IP|AUTHID|NOKICK)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bCOMMAND_FILTER_(?:ALIVE|DEAD|CONNECTED|NO_IMMUNITY|NO_MULTI|NO_BOTS)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bCOMMAND_TARGET_(?:NONE|NOT_ALIVE|NOT_DEAD|NOT_IN_GAME|IMMUNE|EMPTY_FILTER|NOT_HUMAN|AMBIGUOUS)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bFL_(?:EDICT_CHANGED|EDICT_FREE|EDICT_FULL|EDICT_FULLCHECK|EDICT_ALWAYS|EDICT_DONTSEND|EDICT_PVSCHECK|EDICT_PENDING_DORMANT_CHECK|EDICT_DIRTY_PVS_INFORMATION|FULL_EDICT_CHANGED)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\b(?:MOVETYPE_NONE|MOVETYPE_ISOMETRIC|MOVETYPE_WALK|MOVETYPE_STEP|MOVETYPE_FLY|MOVETYPE_FLYGRAVITY|MOVETYPE_VPHYSICS|MOVETYPE_PUSH|MOVETYPE_NOCLIP|MOVETYPE_LADDER|MOVETYPE_OBSERVER|MOVETYPE_CUSTOM)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bRENDER_(?:NORMAL|TRANSCOLOR|TRANSTEXTURE|GLOW|TRANSALPHA|TRANSADD|ENVIRONMENTAL|TRANSADDFRAMEBLEND|TRANSALPHAADD|WORLDGLOW|NONE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bRENDERFX_(?:NONE|PULSE_SLOW|PULSE_FAST|PULSE_SLOW_WIDE|PULSE_FAST_WIDE|FADE_SLOW|FADE_FAST|SOLID_SLOW|SOLID_FAST|STROBE_SLOW|STROBE_FAST|STROBE_FASTER|FLICKER_SLOW|FLICKER_FAST|NO_DISSIPATION|DISTORT|HOLOGRAM|EXPLODE|GLOWSHELL|CLAMP_MIN_SCALE|ENV_RAIN|ENV_SNOW|SPOTLIGHT|RAGDOLL|PULSE_FAST_WIDER|MAX)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bIN_(?:ATTACK|JUMP|DUCK|FORWARD|BACK|USE|CANCEL|LEFT|RIGHT|MOVELEFT|MOVERIGHT|ATTACK2|RUN|RELOAD|ALT1|ALT2|SCORE|SPEED|WALK|ZOOM|WEAPON1|WEAPON2|BULLRUSH|GRENADE1|GRENADE2|ATTACK3)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bFL_(?:ONGROUND|DUCKING|WATERJUMP|ONTRAIN|INRAIN|FROZEN|ATCONTROLS|CLIENT|FAKECLIENT|PLAYER_FLAG_BITS|INWATER|FLY|SWIM|CONVEYOR|NPC|GODMODE|NOTARGET|AIMTARGET|PARTIALGROUND|STATICPROP|GRAPHED|GRENADE|STEPMOVEMENT|DONTTOUCH|BASEVELOCITY|WORLDBRUSH|OBJECT|KILLME|ONFIRE|DISSOLVING|TRANSRAGDOLL|UNBLOCKABLE_BY_PLAYER|FREEZING|EP2V_UNKNOWN1)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bSEEK_(?:SET|CUR|END)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bSM_PARAM_(?:COPYBACK|STRING_UTF8|STRING_COPY|STRING_BINARY)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bSP_ERROR_(?:NONE|FILE_FORMAT|DECOMPRESSOR|HEAPLOW|PARAM|INVALID_ADDRESS|NOT_FOUND|INDEX|STACKLOW|NOTDEBUGGING|INVALID_INSTRUCTION|MEMACCESS|STACKMIN|HEAPMIN|DIVIDE_BY_ZERO|ARRAY_BOUNDS|INSTRUCTION_PARAM|STACKLEAK|HEAPLEAK|ARRAY_TOO_BIG|TRACKER_BOUNDS|INVALID_NATIVE|PARAMS_MAX|NATIVE|NOT_RUNNABLE|ABORTED)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bSOURCE_SDK_(?:UNKNOWN|ORIGINAL|DARKMESSIAH|EPISODE1|EPISODE2|BLOODYGOODTIME|EYE|CSS|EPISODE2VALVE|LEFT4DEAD|LEFT4DEAD2|ALIENSWARM|CSGO|DOTA)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bMOTDPANEL_(?:TYPE_TEXT|TYPE_INDEX|TYPE_URL|TYPE_FILE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bMENU_(?:ACTIONS_DEFAULT|ACTIONS_ALL|NO_PAGINATION|TIME_FOREVER)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bITEMDRAW_(?:DEFAULT|DISABLED|RAWLINE|NOTEXT|SPACER|IGNORE|CONTROL)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bMENUFLAG_(?:BUTTON_EXIT|BUTTON_EXITBACK|NO_SOUND|BUTTON_NOVOTE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bVOTEINFO_(?:CLIENT_INDEX|CLIENT_ITEM|ITEM_INDEX|ITEM_VOTES)|VOTEFLAG_NO_REVOTES\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bPCRE_(?:CASELESS|MULTILINE|DOTALL|EXTENDED|ANCHORED|DOLLAR_ENDONLY|UNGREEDY|NOTEMPTY|UTF8|NO_UTF8_CHECK|UCP)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bVDECODE_FLAG_(?:ALLOWNULL|ALLOWNOTINGAME|ALLOWWORLD|BYREF)|VENCODE_FLAG_COPYBACK\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bSOUND_FROM_(?:PLAYER|LOCAL_PLAYER|WORLD)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bSNDCHAN_(?:REPLACE|AUTO|WEAPON|VOICE|ITEM|BODY|STREAM|STATIC|VOICE_BASE|USER_BASE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bSND_(?:NOFLAGS|CHANGEVOL|CHANGEPITCH|STOP|SPAWNING|DELAY|STOPLOOPING|SPEAKER|SHOULDPAUSE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bSNDLEVEL_(?:NONE|RUSTLE|WHISPER|LIBRARY|FRIDGE|HOME|CONVO|DRYER|DISHWASHER|CAR|NORMAL|TRAFFIC|MINIBIKE|SCREAMING|TRAIN|HELICOPTER|SNOWMOBILE|AIRCRAFT|RAIDSIREN|GUNFIRE|ROCKET)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\b(?:SNDVOL_NORMAL|SNDPITCH_NORMAL|SNDPITCH_LOW|SNDPITCH_HIGH|SNDATTN_NONE|SNDATTN_NORMAL|SNDATTN_STATIC|SNDATTN_RICOCHET|SNDATTN_IDLE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bTE_EXPLFLAG_(?:NONE|NOADDITIVE|NODLIGHTS|NOSOUND|NOPARTICLES|DRAWALPHA|ROTATE|NOFIREBALL|NOFIREBALLSMOKE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bFBEAM_(?:STARTENTITY|ENDENTITY|FADEIN|FADEOUT|SINENOISE|SOLID|SHADEIN|SHADEOUT|ONLYNOISEONCE|NOTILE|USE_HITBOXES|STARTVISIBLE|ENDVISIBLE|ISACTIVE|FOREVER|HALOBEAM)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bCONTENTS_(?:EMPTY|SOLID|WINDOW|AUX|GRATE|SLIME|WATER|MIST|OPAQUE|LAST_VISIBLE_CONTENTS|ALL_VISIBLE_CONTENTS|TESTFOGVOLUME|UNUSED5|UNUSED6|TEAM1|TEAM2|IGNORE_NODRAW_OPAQUE|MOVEABLE|AREAPORTAL|PLAYERCLIP|MONSTERCLIP|CURRENT_0|CURRENT_90|CURRENT_180|CURRENT_270|CURRENT_UP|CURRENT_DOWN|ORIGIN|MONSTER|DEBRIS|DETAIL|TRANSLUCENT|LADDER|HITBOX)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bMASK_(?:ALL|SOLID|PLAYERSOLID|NPCSOLID|WATER|OPAQUE|OPAQUE_AND_NPCS|VISIBLE|VISIBLE_AND_NPCS|SHOT|SHOT_HULL|SHOT_PORTAL|SOLID_BRUSHONLY|PLAYERSOLID_BRUSHONLY|NPCSOLID_BRUSHONLY|NPCWORLDSTATIC|SPLITAREAPORTAL)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bVOICE_(?:NORMAL|MUTED|SPEAKALL|LISTENALL|TEAM|LISTENTEAM)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bTF_STUNFLAG(?:_SLOWDOWN|_BONKSTUCK|_LIMITMOVEMENT|_CHEERSOUND|_NOSOUNDOREFFECT|_THIRDPERSON|_GHOSTEFFECT|S_LOSERSTATE|S_GHOSTSCARE|S_SMALLBONK|S_NORMALBONK|S_BIGBONK)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bTF_CONDFLAG_(?:NONE|SLOWED|ZOOMED|DISGUISING|DISGUISED|CLOAKED|UBERCHARGED|TELEPORTGLOW|TAUNTING|UBERCHARGEFADE|CLOAKFLICKER|TELEPORTING|KRITZKRIEGED|DEADRINGERED|BONKED|DAZED|BUFFED|CHARGING|DEMOBUFF|CRITCOLA|INHEALRADIUS|HEALING|ONFIRE|OVERHEALED|JARATED|BLEEDING|DEFENSEBUFFED|MILKED|MEGAHEAL|REGENBUFFED|MARKEDFORDEATH)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bTF_DEATHFLAG_(?:KILLERDOMINATION|ASSISTERDOMINATION|KILLERREVENGE|ASSISTERREVENGE|FIRSTBLOOD|DEADRINGER|INTERRUPTED|GIBBED|PURGATORY)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bUSERMSG_(?:RELIABLE|INITMSG|BLOCKHOOKS)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bSOURCEMOD_(?:V_TAG|V_REV|V_CSET|V_MAJOR|V_MINOR|V_RELEASE|VERSION)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bDBPrio_(?:High|Normal|Low)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\b(?:TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE|TIMER_HNDL_CLOSE|TIMER_DATA_HNDL_CLOSE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bDMG_(?:GENERIC|CRUSH|BULLET|SLASH|BURN|VEHICLE|FALL|BLAST|CLUB|SHOCK|SONIC|ENERGYBEAM|PREVENT_PHYSICS_FORCE|NEVERGIB|ALWAYSGIB|DROWN|PARALYZE|NERVEGAS|POISON|RADIATION|DROWNRECOVER|ACID|SLOWBURN|REMOVENORAGDOLL|PHYSGUN|PLASMA|AIRBOAT|DISSOLVE|BLAST_SURFACE|DIRECT|BUCKSHOT|CRIT)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bCS_(?:TEAM_NONE|TEAM_SPECTATOR|TEAM_T|TEAM_CT|SLOT_PRIMARY|SLOT_SECONDARY|SLOT_KNIFE|SLOT_GRENADE|SLOT_C4|DMG_HEADSHOT)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bFCVAR_(?:PLUGIN|LAUNCHER|NONE|UNREGISTERED|DEVELOPMENTONLY|GAMEDLL|CLIENTDLL|MATERIAL_SYSTEM|HIDDEN|PROTECTED|SPONLY|ARCHIVE|NOTIFY|USERINFO|PRINTABLEONLY|UNLOGGED|FCVAR_NEVER_AS_STRING|REPLICATED|CHEAT|SS|DEMO|DONTRECORD|SS_ADDED|RELEASE|RELOAD_MATERIALS|RELOAD_TEXTURES|NOT_CONNECTED|MATERIAL_SYSTEM_THREAD|ARCHIVE_XBOX|ARCHIVE_GAMECONSOLE|ACCESSIBLE_FROM_THREADS|SERVER_CAN_EXECUTE|SERVER_CANNOT_QUERY|CLIENTCMD_CAN_EXECUTE)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bPlugin_(?:Handled|Continue|Stop|Changed)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\b(?:Identity_Core|Identity_Extension|Identity_Plugin)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bPlugin_(?:Running|Paused|Error|Loaded|Failed|Created|Uncompiled|BadLoad|Evicted)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bAdmin_(?:Reservation|Generic|Kick|Ban|Unban|Slay|Changemap|Convars|Config|Chat|Vote|Password|RCON|Cheats|Root|Custom1|Custom2|Custom3|Custom4|Custom5|Custom6)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bAccess_(?:Real|Effective)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\b(?:AdminCache_Overrides|AdminCache_Groups|AdminCache_Admins)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\b(?:CookieAccess_Public|CookieAccess_Protected|CookieAccess_Private)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bCookieMenu_(?:YesNo|YesNo_Int|OnOff|OnOff_Int)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bCookieMenuAction_(?:DisplayOption|SelectOption)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bSM_REPLY_TO_(?:CONSOLE|CHAT)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bConVarBound_(?:Upper|Lower)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bConVarQuery_(?:Okay|NotFound|NotValid|Protected)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bPlInfo_(?:Name|Author|Description|Version|URL)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bDBVal_(?:Error|TypeMismatch|Null|Data)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bDBBind_(?:Int|Float|String)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bProp_(?:Send|Data)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bPropField_(?:Unsupported|Integer|Float|Entity|Vector|String|String_T)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bEventHookMode_(?:Pre|Post|PostNoCopy)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bFileType_(?:Unknown|Directory|File)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bFileTime_(?:LastAccess|Created|LastChange)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bParam_(?:Any|Cell|Float|String|Array|VarArgs|CellByRef|FloatByRef)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bET_(?:Ignore|Single|Event|Hook)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bDialogType_(?:Msg|Menu|Text|Entry|AskConnect)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bEngine_(?:Unknown|Original|SourceSDK2006|SourceSDK2007|Left4Dead|DarkMessiah|Left4Dead2|AlienSwarm|BloodyGoodTime|EYE|Portal2|CSGO|CSS|DOTA|HL2DM|DODS|TF2|NuclearDawn|SDK2013|Blade|Insurgency|Contagion|BlackMesa)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bFindMap_(?:Found|NotFound|FuzzyMatch|NonCanonical|PossiblyAvailable)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bKvData_(?:None|String|Int|Float|Ptr|WString|Color|UInt64|NUMTYPES)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bNominate_(?:Added|Replaced|AlreadyInVote|InvalidMap|VoteFull)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bMapChange_(?:Instant|RoundEnd|MapEnd)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bMenuStyle_(?:Default|Valve|Radio)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: - '\\bMenuCancel_(?:Disconnected|Interrupted|Exit|NoDisplay|Timeout|ExitBack)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bVoteCancel_(?:Generic|NoVotes)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'comment.sourcepawn'}, + 2: {name: 'storage.type.class.single-line.spdoc'}, + 3: {name: 'support.variable.single-line.spdoc'}, + 4: {name: 'comment.sourcepawn'} + }, + match: '(\\/\\/)\\s*(@param)\\s+([\\w\\.]+)\\s+(.*)' }, { - match: - '\\bMenuEnd_(?:Selected|VotingDone|VotingCancelled|Cancelled|Exit|ExitBack)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'comment.sourcepawn'}, + 2: {name: 'keyword.control.single-line.spdoc'}, + 3: {name: 'comment.sourcepawn'} + }, + match: '(\\/\\/)\\s*(@return|@noreturn)\\s+(.*)' }, { - match: '\\bMenuSource_(?:None|External|Normal|RawPanel)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'comment.sourcepawn'}, + 2: {name: 'string.regexp.single-line.spdoc'}, + 3: {name: 'comment.sourcepawn'} + }, + match: '(\\/\\/)\\s*(@error)\\s+(.*)' }, { - match: - '\\bREGEX_ERROR_(?:NONE|NOMATCH|NULL|BADOPTION|BADMAGIC|UNKNOWN_OPCODE|NOMEMORY|NOSUBSTRING|MATCHLIMIT|CALLOUT|BADUTF8|BADUTF8_OFFSET|PARTIAL|BADPARTIAL|INTERNAL|BADCOUNT|DFA_UITEM|DFA_UCOND|DFA_UMLIMIT|DFA_WSSIZE|DFA_RECURSE|RECURSIONLIMIT|NULLWSLIMIT|BADNEWLINE|BADOFFSET|SHORTUTF8|RECURSELOOP|JIT_STACKLIMIT|BADMODE|BADENDIANNESS|DFA_BADRESTART|JIT_BADOPTION|BADLENGTH)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'comment.sourcepawn'}, + 2: {name: 'support.function.single-line.spdoc'}, + 3: {name: 'comment.sourcepawn'} + }, + match: '(\\/\\/)\\s*(@(?:note|deprecated))\\s+(.*)' }, + {match: '\\/\\/.*', name: 'comment.sourcepawn'}, { - match: '\\bUse_(?:Off|On|Set|Toggle)\\b', - name: 'support.constant.core.sourcepawn' - }, + begin: '/\\*', + captures: {0: {name: 'comment.sourcepawn'}}, + end: '\\*/', + name: 'comment.block.sourcepawn' + } + ] + }, + enum: { + begin: '(enum)\\s+(?:(\\w+(?:\\:)?)?(?:\\s*(\\([^\\(]*\\)))?)?', + beginCaptures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type_name'}]}, + 3: {patterns: [{include: '#literals'}]} + }, + end: '(?<=\\})', + patterns: [ + {include: '#literals'}, + {include: '#comments'}, + {include: '#preproc'}, { - match: - '\\bSDKCall_(?:Static|Entity|Player|GameRules|EntityList|Raw)\\b', - name: 'support.constant.core.sourcepawn' - }, + captures: {1: {patterns: [{include: '#variable_name'}]}}, + match: '(\\w+)' + } + ] + }, + enum_struct: { + captures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type_name'}]} + }, + match: '(enum\\s+struct\\s+)(\\w+)' + }, + funcenum: { + begin: '(funcenum)\\s+(\\w+)', + beginCaptures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {name: 'support.type.core.funcenum.sourcepawn'} + }, + end: '(?<=\\})', + patterns: [ { - match: '\\bSDKLibrary_(?:Server|Engine)\\b', - name: 'support.constant.core.sourcepawn' + begin: '(?:(\\w+)\\:)?\\s*(public)\\s*\\(', + beginCaptures: { + 1: {patterns: [{include: '#old-type'}]}, + 2: {patterns: [{include: '#keywords'}]} + }, + end: '\\)', + patterns: [{include: '#parameters'}] }, + {include: '#comments'}, + {include: '#preproc'} + ] + }, + functag: { + begin: + '(functag)\\s+(\\w+)\\s+(?:([a-zA-Z_]\\w*)\\:\\s*)?(?:(public|stock)\\s*)?\\(', + beginCaptures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type_name'}]}, + 3: {patterns: [{include: '#old-type'}]}, + 4: {patterns: [{include: '#keywords'}]} + }, + end: '\\)', + patterns: [ + {include: '#comments'}, + {include: '#preproc'}, + {include: '#parameters'} + ] + }, + 'function-call': { + captures: {1: {name: 'entity.name.function.function_call.sourcepawn'}}, + match: '\\b([A-Za-z_][A-Za-z0-9_]*)\\s*\\(' + }, + 'function-declaration': { + patterns: [ { - match: '\\bSDKConf_(?:Virtual|Signature|Address)\\b', - name: 'support.constant.core.sourcepawn' - }, + begin: + '(?:(stock|public|static)\\s+)?(?:(native|forward)\\s+)?(\\w+)(\\s*(?:\\[[^\\]]*\\]\\s*)*)\\s+([a-zA-Z_]\\w*)\\(', + beginCaptures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#keywords'}]}, + 3: {patterns: [{include: '#type'}]}, + 4: {patterns: [{include: '#array-indexed-access'}]}, + 5: {name: 'entity.name.function.sourcepawn'} + }, + end: '\\)', + patterns: [ + {include: '#parameters'}, + {include: '#comments'}, + {include: '#preproc'} + ] + } + ] + }, + keywords: { + patterns: [ + {match: '\\b(public|stock)\\b', name: 'keyword.visibility.sourcepawn'}, { - match: - '\\bSDKType_(?:CBaseEntity|CBasePlayer|Vector|QAngle|PlainOldData|Float|Edict|String|Bool)\\b', - name: 'support.constant.core.sourcepawn' + match: '\\b(const|static)\\b', + name: 'keyword.storage_class.sourcepawn' }, { - match: '\\bSDKPass_(?:Pointer|Plain|ByValue|ByRef)\\b', - name: 'support.constant.core.sourcepawn' + match: '\\b(typeset|typedef|funcenum|functag)\\b', + name: 'keyword.type_declarator.sourcepawn' }, + {match: '\\b(view_as)\\b', name: 'keyword.view_as.sourcepawn'}, { - match: - '\\bRoundState_(?:Init|Pregame|StartGame|Preround|RoundRunning|TeamWin|Restart|Stalemate|GameOver|Bonus|BetweenRounds)\\b', - name: 'support.constant.core.sourcepawn' + match: '\\b(new|decl)\\b', + name: 'keyword.variable_declarator.sourcepawn' }, + {match: '\\b(function)\\b', name: 'keyword.function.sourcepawn'}, + {match: '\\b(enum)\\b', name: 'keyword.enum.sourcepawn'}, + {match: '\\b(struct)\\b', name: 'keyword.struct.sourcepawn'}, + {match: '\\b(methodmap)\\b', name: 'keyword.methodmap.sourcepawn'} + ] + }, + line_continuation_character: { + patterns: [ { - match: '\\bSMCParse_(?:Continue|Halt|HaltFail)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'constant.character.escape.line-continuation.sourcepawn'} + }, + match: '(\\\\)\\n' + } + ] + }, + literals: { + patterns: [ + {include: '#boolean-literal'}, + {include: '#null-literal'}, + {include: '#numeric-literal'}, + {include: '#string-literal'} + ] + }, + methodmap: { + captures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: { + patterns: [ + {match: '[A-Z]\\w*', name: 'support.type.core.sourcepawn'}, + { + captures: { + 1: {name: 'invalid.illegal.constant.sourcepawn'}, + 2: {name: 'support.type.core.sourcepawn'} + }, + match: '([^A-Z])(\\w*)' + } + ] }, - { - match: - '\\bSMCError_(?:Okay|StreamOpen|StreamError|Custom|InvalidSection1|InvalidSection2|InvalidSection3|InvalidSection4|InvalidSection5|InvalidTokens|TokenOverflow|InvalidProperty1)\\b', - name: 'support.constant.core.sourcepawn' + 3: { + patterns: [ + {match: '[A-Z]\\w*', name: 'support.type.core.sourcepawn'}, + { + captures: { + 1: {name: 'invalid.illegal.constant.sourcepawn'}, + 2: {name: 'support.type.core.sourcepawn'} + }, + match: '([^A-Z])(\\w*)' + } + ] }, + 4: {name: 'keyword.__nullable__.sourcepawn'} + }, + match: + '(methodmap)\\s+([a-zA-Z_]\\w*)\\s*(?:(?:\\<\\s*([a-zA-Z_]\\w*)|(__nullable__)))?' + }, + 'null-literal': { + patterns: [{match: '\\bnull\\b', name: 'constant.language.sourcepawn'}] + }, + 'numeric-literal': { + patterns: [ + {match: '[0-9]+\\.[0-9]+', name: 'constant.numeric.float.sourcepawn'}, + {match: '\\b0b[0-1]+\\b', name: 'constant.numeric.sourcepawn'}, + {match: '\\b0o[0-7]+\\b', name: 'constant.numeric.sourcepawn'}, { - match: - '\\bTFHoliday_(?:Invalid|Birthday|Halloween|Christmas|EndOfTheLine|CommunityUpdate|ValentinesDay|MeetThePyro|SpyVsEngyWar|FullMoon|HalloweenOrFullMoon|HalloweenOrFullMoonOrValentines|AprilFools)\\b', - name: 'support.constant.core.sourcepawn' + match: '\\b(0x(?:(?:(?:[0-9a-fA-F]{2}_?)+)|(?:[0-9a-fA-F]+)))\\b', + name: 'constant.numeric.sourcepawn' }, { - match: - '\\bTF_CUSTOM_(?:HEADSHOT|BACKSTAB|BURNING|WRENCH_FIX|MINIGUN|SUICIDE|TAUNT_HADOUKEN|BURNING_FLARE|TAUNT_HIGH_NOON|TAUNT_GRAND_SLAM|PENETRATE_MY_TEAM|PENETRATE_ALL_PLAYERS|TAUNT_FENCING|PENETRATE_HEADSHOT|TAUNT_ARROW_STAB|TELEFRAG|BURNING_ARROW|FLYINGBURN|PUMPKIN_BOMB|DECAPITATION|TAUNT_GRENADE|BASEBALL|CHARGE_IMPACT|TAUNT_BARBARIAN_SWING|AIR_STICKY_BURST|DEFENSIVE_STICKY|PICKAXE|ROCKET_DIRECTHIT|TAUNT_UBERSLICE|PLAYER_SENTRY|STANDARD_STICKY|SHOTGUN_REVENGE_CRIT|TAUNT_ENGINEER_SMASH|BLEEDING|GOLD_WRENCH|CARRIED_BUILDING|COMBO_PUNCH|TAUNT_ENGINEER_ARM|FISH_KILL|TRIGGER_HURT|DECAPITATION_BOSS|STICKBOMB_EXPLOSION|AEGIS_ROUND|FLARE_EXPLOSION|BOOTS_STOMP|PLASMA|PLASMA_CHARGED|PLASMA_GIB|PRACTICE_STICKY|EYEBALL_ROCKET|HEADSHOT_DECAPITATION|TAUNT_ARMAGEDDON|FLARE_PELLET|CLEAVER|CLEAVER_CRIT|SAPPER_RECORDER_DEATH|MERASMUS_PLAYER_BOMB|MERASMUS_GRENADE|MERASMUS_ZAP|MERASMUS_DECAPITATION|CANNONBALL_PUSH|TAUNT_ALLCLASS_GUITAR_RIFF|THROWABLE|THROWABLE_KILL|SPELL_TELEPORT|SPELL_SKELETON|SPELL_MIRV|SPELL_METEOR|SPELL_LIGHTNING|SPELL_FIREBALL|SPELL_MONOCULUS|SPELL_BLASTJUMP|SPELL_BATS|SPELL_TINY|KART|GIANT_HAMMER|RUNE_REFLECT)\\b', - name: 'support.constant.core.sourcepawn' + match: '\\b((?:\\d|_)+)\\b', + name: 'constant.numeric.integer.sourcepawn' }, + {match: '\\b\\d+\\w+\\b', name: 'invalid.illegal.constant.sourcepawn'} + ] + }, + 'old-function-declaration': { + patterns: [ { - match: - '\\bTF_WEAPON_(?:NONE|BAT|BAT_WOOD|BOTTLE|FIREAXE|CLUB|CROWBAR|KNIFE|FISTS|SHOVEL|WRENCH|BONESAW|SHOTGUN_PRIMARY|SHOTGUN_SOLDIER|SHOTGUN_HWG|SHOTGUN_PYRO|SCATTERGUN|SNIPERRIFLE|MINIGUN|SMG|SYRINGEGUN_MEDIC|TRANQ|ROCKETLAUNCHER|GRENADELAUNCHER|PIPEBOMBLAUNCHER|FLAMETHROWER|GRENADE_NORMAL|GRENADE_CONCUSSION|GRENADE_NAIL|GRENADE_MIRV|GRENADE_MIRV_DEMOMAN|GRENADE_NAPALM|GRENADE_GAS|GRENADE_EMP|GRENADE_CALTROP|GRENADE_PIPEBOMB|GRENADE_SMOKE_BOMB|GRENADE_HEAL|GRENADE_STUNBALL|GRENADE_JAR|GRENADE_JAR_MILK|PISTOL|PISTOL_SCOUT|REVOLVER|NAILGUN|PDA|PDA_ENGINEER_BUILD|PDA_ENGINEER_DESTROY|PDA_SPY|BUILDER|MEDIGUN|GRENADE_MIRVBOMB|FLAMETHROWER_ROCKET|GRENADE_DEMOMAN|SENTRY_BULLET|SENTRY_ROCKET|DISPENSER|INVIS|FLAREGUN|LUNCHBOX|JAR|COMPOUND_BOW|BUFF_ITEM|PUMPKIN_BOMB|SWORD|DIRECTHIT|LIFELINE|LASER_POINTER|DISPENSER_GUN|SENTRY_REVENGE|JAR_MILK|HANDGUN_SCOUT_PRIMARY|BAT_FISH|CROSSBOW|STICKBOMB|HANDGUN_SCOUT_SEC|SODA_POPPER|SNIPERRIFLE_DECAP|RAYGUN|PARTICLE_CANNON|MECHANICAL_ARM|DRG_POMSON|BAT_GIFTWRAP|GRENADE_ORNAMENT|RAYGUN_REVENGE|PEP_BRAWLER_BLASTER|CLEAVER|GRENADE_CLEAVER|STICKY_BALL_LAUNCHER|GRENADE_STICKY_BALL|SHOTGUN_BUILDING_RESCUE|CANNON|THROWABLE|GRENADE_THROWABLE|PDA_SPY_BUILD|GRENADE_WATERBALLOON|HARVESTER_SAW|SPELLBOOK|SPELLBOOK_PROJECTILE|SNIPERRIFLE_CLASSIC|PARACHUTE|GRAPPLINGHOOK|PASSTIME_GUN|CHARGED_SMG)\\b', - name: 'support.constant.core.sourcepawn' - }, + begin: + '(?:(stock|public|static)\\s+)?(?:(native|forward)\\s+)?(\\w+)\\:\\s*([a-zA-Z_]\\w*)\\(', + beginCaptures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#keywords'}]}, + 3: {patterns: [{include: '#old-type'}]}, + 4: {name: 'entity.name.function.sourcepawn'} + }, + end: '\\)', + patterns: [ + {include: '#parameters'}, + {include: '#comments'}, + {include: '#preproc'} + ] + } + ] + }, + 'old-parameter-declaration': { + patterns: [ { - match: - '\\bTFWeaponSlot_(?:Primary|Secondary|Melee|Grenade|Building|PDA|Item1|Item2)\\b', - name: 'support.constant.core.sourcepawn' - }, + captures: { + 1: {patterns: [{include: '#old-type'}]}, + 2: {patterns: [{include: '#variable_name'}]}, + 3: {patterns: [{include: '#array-indexed-access'}]} + }, + match: '(?:(\\w+)\\:\\s*)?(\\w+)\\s*((?:\\[[^\\]]*\\]\\s*)+)?' + } + ] + }, + 'old-type': { + patterns: [ { - match: - '\\bTF_FLAGEVENT_(?:PICKEDUP|CAPTURED|DEFENDED|DROPPED|RETURNED)\\b', - name: 'support.constant.core.sourcepawn' - }, + captures: { + 1: {name: 'storage.type.old.built-in.primitive.sourcepawn'}, + 2: {patterns: [{include: '#type_name'}]} + }, + match: '(bool|any|String|Float)|(\\w+)' + } + ] + }, + 'old-variable-declaration': { + patterns: [ { + captures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#keywords'}]}, + 3: {patterns: [{include: '#keywords'}]}, + 4: {patterns: [{include: '#old-type'}]}, + 5: {patterns: [{include: '#variable_name'}]}, + 6: {patterns: [{include: '#array-indexed-access'}]} + }, match: - '\\bTFResource_(?:Ping|Score|Deaths|TotalScore|Captures|Defenses|Dominations|Revenge|BuildingsDestroyed|Headshots|Backstabs|HealPoints|Invulns|Teleports|ResupplyPoints|KillAssists|MaxHealth|PlayerClass)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bUM_(?:BitBuf|Protobuf)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bCommand_(?:Deny|Allow)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bOverride_(?:Command|CommandGroup)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bAPLRes_(?:Success|Failure|SilentFailure)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bAddress_(?:Null|MinimumValid)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bSort_(?:Ascending|Descending|Random)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bSort_(?:Integer|Float|String)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bListen_(?:Default|Yes|No)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bRayType_(?:Infinite|EndPoint)\\b', - name: 'support.constant.core.sourcepawn' - }, + '(?:(stock|public)\\s+)?((?:(?:const|static)\\s+)*)(new|decl)\\s+(?:(\\w+)\\:\\s*)?(\\w+)(\\s*(?:\\[[^\\]]*\\]\\s*)*)' + } + ] + }, + operators: { + patterns: [ { - match: - '\\bCSRoundEnd_(?:TargetBombed|VIPEscaped|VIPKilled|TerroristsEscaped|CTStoppedEscape|TerroristsStopped|BombDefused|CTWin|TerroristWin|Draw|HostagesRescued|TargetSaved|HostagesNotRescued|TerroristsNotEscaped|VIPNotEscaped|GameStart|TerroristsSurrender|CTSurrender|TerroristsPlanted|CTsReachedHostage)\\b', - name: 'support.constant.core.sourcepawn' - }, + match: '%|&|\\*|/(?!\\*|/)|\\+|\\-|~|=|<|>|!|\\||\\?|:|\\^', + name: 'keyword.operator.sourcepawn' + } + ] + }, + 'other-keywords': { + match: + '\\b(?:decl|delete|forward|native|public|const|stock|this|sizeof|static|property)\\b', + name: 'keyword.sourcepawn' + }, + 'parameter-declaration': { + patterns: [ { + captures: { + 1: {patterns: [{include: '#type'}]}, + 2: {patterns: [{include: '#variable_name'}]}, + 3: {patterns: [{include: '#array-indexed-access'}]} + }, match: - '\\bCSWeapon_(?:NONE|P228|GLOCK|SCOUT|HEGRENADE|XM1014|C4|MAC10|AUG|SMOKEGRENADE|ELITE|FIVESEVEN|UMP45|SG550|GALIL|FAMAS|USP|AWP|MP5NAVY|M249|M3|M4A1|TMP|G3SG1|FLASHBANG|DEAGLE|SG552|AK47|KNIFE|P90|SHIELD|KEVLAR|ASSAULTSUIT|NIGHTVISION|GALILAR|BIZON|MAG7|NEGEV|SAWEDOFF|TEC9|TASER|HKP2000|MP7|MP9|NOVA|P250|SCAR17|SCAR20|SG556|SSG08|KNIFE_GG|MOLOTOV|DECOY|INCGRENADE|DEFUSER|HEAVYASSAULTSUIT|CUTTERS|HEALTHSHOT|KNIFE_T|M4A1_SILENCER|USP_SILENCER|CZ75A|REVOLVER|TAGGRENADE|FISTS|BREACHCHARGE|TABLET|MELEE|AXE|HAMMER|SPANNER|KNIFE_GHOST|FIREBOMB|DIVERSION|FRAGGRENADE|SNOWBALL|MAX_WEAPONS_NO_KNIFES|BAYONET|KNIFE_FLIP|KNIFE_GUT|KNIFE_KARAMBIT|KNIFE_M9_BAYONET|KNIFE_TATICAL|KNIFE_FALCHION|KNIFE_SURVIVAL_BOWIE|KNIFE_BUTTERFLY|KNIFE_PUSH|KNIFE_URSUS|KNIFE_GYPSY_JACKKNIFE|KNIFE_STILETTO|KNIFE_WIDOWMAKER|MAX_WEAPONS)\\b', - name: 'support.constant.core.sourcepawn' - }, - { - match: '\\bAuthId_(?:Engine|Steam2|Steam3|SteamID64)\\b', - name: 'support.constant.core.sourcepawn' - }, + '(\\w+)(?:\\s+|(?:\\s*(?:&|(?:\\[\\s*\\])+)\\s*))(\\w+)(?:\\s*((?:\\[[^\\]]*\\]\\s*)+))?' + } + ] + }, + parameters: { + patterns: [ + {include: '#keywords'}, + {include: '#literals'}, + {include: '#parameter-declaration'}, + {include: '#old-parameter-declaration'} + ] + }, + preproc: { + patterns: [ { - match: '\\bNetFlow_(?:Outgoing|Incoming|Both)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'keyword.control.sourcepawn'}, + 2: {name: 'string.sourcepawn'} + }, + match: '(\\#include|\\#tryinclude)\\s*((?:\\<|").+(?:\\>|"))', + name: 'meta.include.sourcepawn' }, { - match: - '\\bMenuAction_(?:Start|Display|Select|Cancel|End|VoteEnd|VoteStart|VoteCancel|DrawItem|DisplayItem)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'keyword.control.pragma.sourcepawn'}, + 2: {name: 'entity.other.attribute-name.sourcepawn'} + }, + match: '(\\#pragma)\\s+(.+?(?=//))', + name: 'meta.pragma.line-comment.sourcepawn' }, { - match: - '\\bTopMenuAction_(?:DisplayOption|DisplayTitle|SelectOption|DrawOption|RemoveObject)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'keyword.control.pragma.sourcepawn'}, + 2: {name: 'entity.other.attribute-name.sourcepawn'}, + 3: {name: 'string.deprecated.sourcepawn'} + }, + match: '(\\#pragma)\\s+(deprecated)(.*)', + name: 'meta.pragma.deprecated.sourcepawn' }, { - match: '\\bTopMenuObject_(?:Category|Item)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'keyword.control.pragma.sourcepawn'}, + 2: {name: 'entity.other.attribute-name.sourcepawn'} + }, + match: '(\\#pragma)\\s+([A-Za-z _0-9]+)', + name: 'meta.pragma.block-comment.sourcepawn' }, { - match: '\\bTopMenuPosition_(?:Start|LastRoot|LastCategory)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'keyword.control.define.sourcepawn'}, + 2: {name: 'meta.preprocessor.macro.sourcepawn'} + }, + match: '(\\#define)\\s*(\\w*)', + name: 'meta.define.sourcepawn' }, { - match: - '\\bTFClass_(?:Unknown|Scout|Sniper|Soldier|DemoMan|Medic|Heavy|Pyro|Spy|Engineer)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'keyword.control.undef.sourcepawn'}, + 2: {name: 'meta.preprocessor.macro.sourcepawn'} + }, + match: '(\\#undef)\\s*(\\w*)', + name: 'meta.undef.sourcepawn' }, { - match: - '\\bTFCond_(?:Slowed|Zoomed|Disguising|Disguised|Cloaked|Ubercharged|TeleportedGlow|Taunting|UberchargeFading|Unknown1|CloakFlicker|Teleporting|Kritzkrieged|Unknown2|TmpDamageBonus|DeadRingered|Bonked|Dazed|Buffed|Charging|DemoBuff|CritCola|InHealRadius|Healing|OnFire|Overhealed|Jarated|Bleeding|DefenseBuffed|Milked|MegaHeal|RegenBuffed|MarkedForDeath|NoHealingDamageBuff|SpeedBuffAlly|HalloweenCritCandy|CritCanteen|CritDemoCharge|CritHype|CritOnFirstBlood|CritOnWin|CritOnFlagCapture|CritOnKill|RestrictToMelee|DefenseBuffNoCritBlock|Reprogrammed|CritMmmph|DefenseBuffMmmph|FocusBuff|DisguiseRemoved|MarkedForDeathSilent|DisguisedAsDispenser|Sapped|UberchargedHidden|UberchargedCanteen|HalloweenBombHead|HalloweenThriller|RadiusHealOnDamage|CritOnDamage|UberchargedOnTakeDamage|UberBulletResist|UberBlastResist|UberFireResist|SmallBulletResist|SmallBlastResist|SmallFireResist|Stealthed|MedigunDebuff|StealthedUserBuffFade|BulletImmune|BlastImmune|FireImmune|PreventDeath|MVMBotRadiowave|HalloweenSpeedBoost|HalloweenQuickHeal|HalloweenGiant|HalloweenTiny|HalloweenInHell|HalloweenGhostMode|DodgeChance|Parachute|BlastJumping|HalloweenKart|HalloweenKartDash|BalloonHead|MeleeOnly|SwimmingCurse|HalloweenKartNoTurn|HalloweenKartCage|HasRune|RuneStrength|RuneHaste|RuneRegen|RuneResist|RuneVampire|RuneWarlock|RunePrecision|RuneAgility|MiniCritOnKill|ObscuredSmoke|FreezeInput|GrapplingHook|GrapplingHookSafeFall|GrapplingHookLatched|GrapplingHookBleeding|AfterburnImmune|RuneKnockout|RuneImbalance|CritRuneTemp|PasstimeInterception|SwimmingNoEffects|EyeaductUnderworld|KingRune|PlagueRune|SupernovaRune|Plague|KingAura|SpawnOutline|KnockedIntoAir|CompetitiveWinner|CompetitiveLoser|NoTaunting|TFCondDuration_Infinite)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'keyword.control.misc.sourcepawn'}, + 2: {name: 'string.warning.sourcepawn'} + }, + match: '(#\\b(?:warning|error)\\b)\\s*(.+?)(?=/(?:/|\\*))', + name: 'meta.undef.sourcepawn' }, { - match: '\\bTFObjectMode_(?:None|Entrance|Exit)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'keyword.control.misc.sourcepawn'}, + 2: {name: 'string.warning.sourcepawn'} + }, + match: '(#\\b(?:warning|error)\\b)\\s*(.*)', + name: 'meta.undef.sourcepawn' }, { match: - '\\bTFObject_(?:CartDispenser|Dispenser|Teleporter|Sentry|Sapper)\\b', - name: 'support.constant.core.sourcepawn' + '#\\b(if|else|endif|emit|deprecated|undef|endinput|endscript|assert|define|file)\\b\\s*', + name: 'keyword.control.misc.sourcepawn' }, { - match: '\\bTFTeam_(?:Unassigned|Spectator|Red|Blue)\\b', - name: 'support.constant.core.sourcepawn' - }, + captures: { + 1: {name: 'meta.preprocessor.conditional.sourcepawn'}, + 2: {name: 'meta.preprocessor.macro.sourcepawn'} + }, + match: '(defined)\\s+([A-Za-z_]\\w*)' + } + ] + }, + 'string-literal': { + patterns: [ { - match: '\\bFeatureStatus_(?:Available|Unavailable|Unknown)\\b', - name: 'support.constant.core.sourcepawn' + begin: '"', + beginCaptures: { + 0: {name: 'punctuation.definition.string.begin.sourcepawn'} + }, + end: '(")|((?:[^\\\\\\n])$)', + endCaptures: { + 1: {name: 'punctuation.definition.string.end.sourcepawn'}, + 2: {name: 'invalid.illegal.newline.sourcepawn'} + }, + name: 'string.quoted.double.sourcepawn', + patterns: [ + {include: '#string_escaped_char'}, + {include: '#string_format_char'}, + {include: '#string_placeholder'}, + {include: '#line_continuation_character'} + ] }, { - match: '\\bNumberType_(?:Int8|Int16|Int32)\\b', - name: 'support.constant.core.sourcepawn' - }, + begin: "'", + beginCaptures: { + 0: {name: 'punctuation.definition.string.begin.sourcepawn'} + }, + end: "(\\')|((?:[^\\\\\\n])$)", + endCaptures: { + 1: {name: 'punctuation.definition.string.end.sourcepawn'}, + 2: {name: 'invalid.illegal.newline.sourcepawn'} + }, + name: 'string.quoted.single.c', + patterns: [ + {include: '#string_escaped_char'}, + {include: '#string_format_char'}, + {include: '#string_placeholder'}, + {include: '#line_continuation_character'} + ] + } + ] + }, + string_escaped_char: { + patterns: [ { - match: '\\bFeatureType_(?:Native|Capability)\\b', - name: 'support.constant.core.sourcepawn' + match: '\\\\(?:[abefnrt\'"\\\\]|(?:x[a-zA-Z0-9]{0,2}|\\d+);?)', + name: 'constant.character.escape.sourcepawn' }, + {match: '\\\\.', name: 'invalid.illegal.unknown-escape.sourcepawn'} + ] + }, + string_format_char: { + match: + '%(?:a|A|b|B|c|C|d|D|e|F|g|G|h|H|I|j|m|M|n|i|p|r|R|S|t|T|u|U|V|u|w|W|x|X|y|Y|z|Z|f|L|N|s|T|t|%|(?:\\d+)?\\.?\\d*(?:b|d|i|u|f|s|X|x))', + name: 'constant.character.format.sourcepawn' + }, + string_placeholder: { + captures: {1: {name: 'constant.character.escape.sp-translations'}}, + match: '\\{(\\w+)\\}', + name: 'constant.character.sp-translations' + }, + struct: { + captures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type_name'}]} + }, + match: '(struct)\\s+(\\w+)' + }, + type: { + patterns: [ { - match: - '\\bSDKHook_(?:EndTouch|FireBulletsPost|OnTakeDamage|OnTakeDamagePost|PreThink|PostThink|SetTransmit|Spawn|StartTouch|Think|Touch|TraceAttack|TraceAttackPost|WeaponCanSwitchTo|WeaponCanUse|WeaponDrop|WeaponEquip|WeaponSwitch|ShouldCollide|PreThinkPost|PostThinkPost|ThinkPost|EndTouchPost|GroundEntChangedPost|SpawnPost|StartTouchPost|TouchPost|VPhysicsUpdate|VPhysicsUpdatePost|WeaponCanSwitchToPost|WeaponCanUsePost|WeaponDropPost|WeaponEquipPost|WeaponSwitchPost|Use|UsePost|Reload|ReloadPost|GetMaxHealth|Blocked|BlockedPost|OnTakeDamageAlive|OnTakeDamageAlivePost|CanBeAutobalanced)\\b', - name: 'support.constant.core.sourcepawn' + captures: { + 1: {name: 'storage.type.built-in.primitive.sourcepawn'}, + 2: {patterns: [{include: '#type_name'}]} + }, + match: '(bool|float|int|char|any|void)|(\\w+)' } ] }, - keywords: { + type_name: { + patterns: [ + {match: '\\b\\d\\b', name: 'constant.numeric.integer.sourcepawn'}, + {match: '[a-zA-Z_]\\w*', name: 'support.type.core.sourcepawn'}, + { + captures: { + 1: {name: 'invalid.illegal.constant.sourcepawn'}, + 2: {name: 'support.type.core.sourcepawn'} + }, + match: '([0-9])(\\w*)' + } + ] + }, + typedef: { + begin: + '(typedef)\\s+(\\w+)\\s*\\=\\s*(function)\\s*(\\w+)\\s*((?:\\[[^\\]]*\\]\\s*)*)\\(', + beginCaptures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type_name'}]}, + 3: {patterns: [{include: '#keywords'}]}, + 4: {patterns: [{include: '#type'}]}, + 5: {patterns: [{include: '#array-indexed-access'}]} + }, + end: '\\)', + patterns: [ + {include: '#parameters'}, + {include: '#comments'}, + {include: '#preproc'} + ] + }, + typeset: { + begin: '(typeset)\\s+(\\w+)', + beginCaptures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type_name'}]} + }, + end: '(?<=\\})', patterns: [ { - match: '%|&|\\*|/[^(?:\\*|/)]|\\-|\\+|~|=|<|>|!|\\||\\?|\\:|\\^', - name: 'keyword.operator.sourcepawn' - }, - { - match: '\\b(?:if|else|for|while|do|switch|case|default)\\b', - name: 'keyword.control.statement.sourcepawn' - }, + begin: '(function)\\s+(\\w+)\\s*((?:\\[[^\\]]*\\]\\s*)*)\\(', + beginCaptures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#type'}]}, + 3: {patterns: [{include: '#array-indexed-access'}]} + }, + end: '\\)', + patterns: [{include: '#parameters'}] + }, + {include: '#comments'}, + {include: '#preproc'} + ] + }, + 'variable-declaration': { + patterns: [ { + captures: { + 1: {patterns: [{include: '#keywords'}]}, + 2: {patterns: [{include: '#keywords'}]}, + 3: {patterns: [{include: '#type'}]}, + 4: {patterns: [{include: '#array-indexed-access'}]}, + 5: {patterns: [{include: '#variable_name'}]}, + 6: {patterns: [{include: '#array-indexed-access'}]} + }, match: - '\\b(?:return|break|continue|new|static|decl|delete|forward|native|property|public|stock|enum|funcenum|functag|methodmap|struct|typedef|typeset|this|view_as|sizeof)\\b', - name: 'keyword.sourcepawn' + '(?:(stock|public)\\s+)?((?:(?:const|static)\\s+)*)(\\w+)(\\s*(?:\\[[^\\]]*\\]\\s*)*)\\s+(\\w+)\\s*(\\s*(?:\\[[^\\]]*\\]\\s*)*)' } ] }, - strings: { + variable_name: { patterns: [ - { - begin: "'", - end: "'|\\n", - name: 'string.quoted.single.sourcepawn', - patterns: [ - {match: '\\\\.', name: 'constant.character.escape.sourcepawn'} - ] - }, - { - begin: '"', - end: '"', - name: 'string.quoted.double.sourcepawn', - patterns: [ - { - match: - '\\\\.|%(?:c|b|d|i|u|f|L|N|s|T|t|X|x|%|\\.\\d+(?:b|d|i|u|f|s|X|x))', - name: 'constant.character.escape.sourcepawn' - } - ] + {match: '\\b\\d\\b', name: 'constant.numeric.integer.sourcepawn'}, + {match: '[a-zA-Z_]\\w*', name: 'variable.sourcepawn'}, + { + captures: { + 1: {name: 'invalid.illegal.constant.sourcepawn'}, + 2: {name: 'variable.sourcepawn'} + }, + match: '([0-9])(\\w*)' } ] } diff --git a/lang/source.swift.js b/lang/source.swift.js index 24d2e86..0aae333 100644 --- a/lang/source.swift.js +++ b/lang/source.swift.js @@ -1756,7 +1756,7 @@ const grammar = { 1: {name: 'invalid.illegal.try-must-precede-await.swift'}, 2: {name: 'keyword.control.await.swift'} }, - match: '(? +// and licensed `mit`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: ['.textgrid'], + names: ['textgrid'], + patterns: [ + { + match: + '((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)', + name: 'constant.numeric.textgrid' + }, + { + begin: '"', + beginCaptures: { + 0: {name: 'punctuation.definition.string.begin.textgrid'} + }, + contentName: 'meta.string-contents.quoted.double.textgrid', + end: '"', + endCaptures: {0: {name: 'punctuation.definition.string.end.textgrid'}}, + name: 'string.quoted.double.textgrid' + }, + { + match: '(x(min|max)|class|name|text|size)', + name: 'constant.language.textgrid' + }, + {match: '(intervals|item)', name: 'entity.name.type.module.textgrid'}, + { + match: '(File type|Object class|\\)', + name: 'keyword.control.language.textgrid' + }, + {match: '=', name: 'keyword.operator.key.textgrid'}, + { + captures: { + 0: {name: 'constant.language.textgrid'}, + 1: {name: 'entity.name.type.module.textgrid'} + }, + match: 'tiers(\\?)' + } + ], + scopeName: 'source.textgrid' +} + +export default grammar diff --git a/lang/source.toit.js b/lang/source.toit.js index abecc76..277b7fb 100644 --- a/lang/source.toit.js +++ b/lang/source.toit.js @@ -169,7 +169,7 @@ const grammar = { name: 'constant.language.import-export-all.show.toit' }, { - match: '\\b(?) *(?=[\\p{L}_])', beginCaptures: {1: {name: 'keyword.control.return_type.toit'}}, - end: '(?=[^\\w-.?])', + end: '(?=[^\\w\\-.?])', name: 'entity.name.type.annotation.toit' } ] @@ -503,19 +503,19 @@ const grammar = { 'type-name': { patterns: [ { - match: '\\b(? +// and licensed `mit`. +// See for more info. +/** @type {import('../lib/index.js').Grammar} */ +const grammar = { + extensions: ['.edge'], + injections: { + 'text.html.edge - (meta.embedded | meta.tag | comment.block.edge), L:(text.html.edge meta.tag - (comment.block.edge | meta.embedded.block.edge)), L:(source.ts.embedded.html - (comment.block.edge | meta.embedded.block.edge))': + { + patterns: [ + {include: '#comment'}, + {include: '#escapedMustache'}, + {include: '#safeMustache'}, + {include: '#mustache'}, + {include: '#nonSeekableTag'}, + {include: '#tag'} + ] + } + }, + names: ['edge'], + patterns: [{include: 'text.html.basic'}], + repository: { + comment: { + begin: '\\{{--', + beginCaptures: {0: {name: 'punctuation.definition.comment.begin.edge'}}, + end: '\\--}}', + endCaptures: {0: {name: 'punctuation.definition.comment.end.edge'}}, + name: 'comment.block' + }, + escapedMustache: { + begin: '\\@{{', + beginCaptures: {0: {name: 'punctuation.definition.comment.begin.edge'}}, + end: '\\}}', + endCaptures: {0: {name: 'punctuation.definition.comment.end.edge'}}, + name: 'comment.block' + }, + mustache: { + begin: '\\{{', + beginCaptures: {0: {name: 'punctuation.mustache.begin'}}, + end: '\\}}', + endCaptures: {0: {name: 'punctuation.mustache.end'}}, + name: 'meta.embedded.block.javascript', + patterns: [{include: 'source.ts#expression'}] + }, + nonSeekableTag: { + captures: {2: {name: 'support.function.edge'}}, + match: '^(\\s*)((@{1,2})(!)?([a-zA-Z._]+))(~)?$', + name: 'meta.embedded.block.javascript', + patterns: [{include: 'source.ts#expression'}] + }, + safeMustache: { + begin: '\\{{{', + beginCaptures: {0: {name: 'punctuation.mustache.begin'}}, + end: '\\}}}', + endCaptures: {0: {name: 'punctuation.mustache.end'}}, + name: 'meta.embedded.block.javascript', + patterns: [{include: 'source.ts#expression'}] + }, + tag: { + begin: '^(\\s*)((@{1,2})(!)?([a-zA-Z._]+)(\\s{0,2}))(\\()', + beginCaptures: { + 2: {name: 'support.function.edge'}, + 7: {name: 'punctuation.paren.open'} + }, + end: '\\)', + endCaptures: {0: {name: 'punctuation.paren.close'}}, + name: 'meta.embedded.block.javascript', + patterns: [{include: 'source.ts#expression'}] + } + }, + scopeName: 'text.html.edge' +} + +export default grammar diff --git a/lang/text.md.js b/lang/text.md.js index 3430141..2c33bfc 100644 --- a/lang/text.md.js +++ b/lang/text.md.js @@ -2368,21 +2368,21 @@ const grammar = { { begin: '(?=(?:^|\\G)[ ]{0,3}]|\\/>|$))', - end: '^(?=[\\\\t ]*$)', + end: '^(?=[\\t ]*$)|$', name: 'text.html.basic', patterns: [{include: '#whatwg-html'}] }, { begin: '(?=(?:^|\\G)[ ]{0,3}(?:[\\t ]*$))', - end: '^(?=[\\t ]*$)', + end: '^(?=[\\t ]*$)|$', name: 'text.html.basic', patterns: [{include: '#whatwg-html'}] }, { begin: '(?=(?:^|\\G)[ ]{0,3}<[A-Za-z][-0-9A-Za-z]*(?:[\\t\\n\\r ]+[:A-Z_a-z][\\-\\.0-9:A-Z_a-z]*(?:[\\t\\n\\r ]*=[\\t\\n\\r ]*(?:"[^"]*"|\'[^\']*\'|[^\\t\\n\\r "\'\\/<=>`]+))?)*(?:[\\t\\n\\r ]*\\/)?[\\t\\n\\r ]*>(?:[\\t ]*$))', - end: '^(?=[\\t ]*$)', + end: '^(?=[\\t ]*$)|$', name: 'text.html.basic', patterns: [{include: '#whatwg-html'}] } @@ -2850,7 +2850,7 @@ const grammar = { }, 'extension-gfm-table': { begin: '(?:^|\\G)[ ]{0,3}(?=\\|[^\\n\\r]+\\|[ \\t]*$)', - end: '^(?=[\\t ]*$)', + end: '^(?=[\\t ]*$)|$', patterns: [ { captures: {1: {patterns: [{include: '#markdown-text'}]}}, diff --git a/lang/text.srt.js b/lang/text.srt.js index 21bd16c..c7e954f 100644 --- a/lang/text.srt.js +++ b/lang/text.srt.js @@ -30,6 +30,16 @@ const grammar = { } ] }, + align: { + captures: { + 1: {name: 'punctuation.definition.tag.begin.srt'}, + 2: {name: 'entity.name.tag.srt'}, + 3: {name: 'invalid.deprecated.syntax.tag.srt'}, + 4: {name: 'punctuation.definition.tag.end.srt'} + }, + match: '({)(\\\\a(?:n[1-9]|(10|11|(?!4|8)\\d)))(})', + name: 'meta.tag.override.line-alignment.srt' + }, arrow: { captures: {0: {name: 'punctuation.definition.separator.srt'}}, match: '-->', @@ -98,7 +108,8 @@ const grammar = { {include: '#italic'}, {include: '#underline'}, {include: '#strike'}, - {include: '#font'} + {include: '#font'}, + {include: '#align'} ] }, italic: { diff --git a/lib/all.js b/lib/all.js index 8672f95..3c16384 100644 --- a/lib/all.js +++ b/lib/all.js @@ -11,6 +11,7 @@ import injectionsEtc from '@wooorm/starry-night/injections.etc' import objdumpX6asm from '@wooorm/starry-night/objdump.x86asm' import source2da from '@wooorm/starry-night/source.2da' import source4dm from '@wooorm/starry-night/source.4dm' +import source8xp from '@wooorm/starry-night/source.8xp' import sourceAbap from '@wooorm/starry-night/source.abap' import sourceAbapcds from '@wooorm/starry-night/source.abapcds' import sourceAbl from '@wooorm/starry-night/source.abl' @@ -45,10 +46,12 @@ import sourceAwk from '@wooorm/starry-night/source.awk' import sourceBallerina from '@wooorm/starry-night/source.ballerina' import sourceBasic from '@wooorm/starry-night/source.basic' import sourceBatchfile from '@wooorm/starry-night/source.batchfile' +import sourceBb from '@wooorm/starry-night/source.bb' import sourceBdf from '@wooorm/starry-night/source.bdf' import sourceBefunge from '@wooorm/starry-night/source.befunge' import sourceBerry from '@wooorm/starry-night/source.berry' import sourceBf from '@wooorm/starry-night/source.bf' +import sourceBh from '@wooorm/starry-night/source.bh' import sourceBicep from '@wooorm/starry-night/source.bicep' import sourceBlitzmax from '@wooorm/starry-night/source.blitzmax' import sourceBoo from '@wooorm/starry-night/source.boo' @@ -84,6 +87,7 @@ import sourceClojure from '@wooorm/starry-night/source.clojure' import sourceCmake from '@wooorm/starry-night/source.cmake' import sourceCobol from '@wooorm/starry-night/source.cobol' import sourceCoffee from '@wooorm/starry-night/source.coffee' +import sourceCommonlisp from '@wooorm/starry-night/source.commonlisp' import sourceCool from '@wooorm/starry-night/source.cool' import sourceCoq from '@wooorm/starry-night/source.coq' import sourceCrystal from '@wooorm/starry-night/source.crystal' @@ -182,6 +186,7 @@ import sourceGremlin from '@wooorm/starry-night/source.gremlin' import sourceGroovy from '@wooorm/starry-night/source.groovy' import sourceGroovyGradle from '@wooorm/starry-night/source.groovy.gradle' import sourceGsc from '@wooorm/starry-night/source.gsc' +import sourceGts from '@wooorm/starry-night/source.gts' import sourceHack from '@wooorm/starry-night/source.hack' import sourceHaproxyConfig from '@wooorm/starry-night/source.haproxy-config' import sourceHarbour from '@wooorm/starry-night/source.harbour' @@ -197,6 +202,7 @@ import sourceHttpspec from '@wooorm/starry-night/source.httpspec' import sourceHx from '@wooorm/starry-night/source.hx' import sourceHxml from '@wooorm/starry-night/source.hxml' import sourceHy from '@wooorm/starry-night/source.hy' +import sourceIce from '@wooorm/starry-night/source.ice' import sourceIdeal from '@wooorm/starry-night/source.ideal' import sourceIdl from '@wooorm/starry-night/source.idl' import sourceIdris from '@wooorm/starry-night/source.idris' @@ -290,6 +296,7 @@ import sourceMo from '@wooorm/starry-night/source.mo' import sourceModelica from '@wooorm/starry-night/source.modelica' import sourceModula3 from '@wooorm/starry-night/source.modula-3' import sourceModula2 from '@wooorm/starry-night/source.modula2' +import sourceMojo from '@wooorm/starry-night/source.mojo' import sourceMonkey from '@wooorm/starry-night/source.monkey' import sourceMoonscript from '@wooorm/starry-night/source.moonscript' import sourceMove from '@wooorm/starry-night/source.move' @@ -351,6 +358,7 @@ import sourcePhpZephir from '@wooorm/starry-night/source.php.zephir' import sourcePic from '@wooorm/starry-night/source.pic' import sourcePigLatin from '@wooorm/starry-night/source.pig_latin' import sourcePike from '@wooorm/starry-night/source.pike' +import sourcePipRequirements from '@wooorm/starry-night/source.pip-requirements' import sourcePlist from '@wooorm/starry-night/source.plist' import sourcePo from '@wooorm/starry-night/source.po' import sourcePogoscript from '@wooorm/starry-night/source.pogoscript' @@ -403,6 +411,7 @@ import sourceRescript from '@wooorm/starry-night/source.rescript' import sourceRexx from '@wooorm/starry-night/source.rexx' import sourceRez from '@wooorm/starry-night/source.rez' import sourceRing from '@wooorm/starry-night/source.ring' +import sourceRoc from '@wooorm/starry-night/source.roc' import sourceRpgle from '@wooorm/starry-night/source.rpgle' import sourceRpmSpec from '@wooorm/starry-night/source.rpm-spec' import sourceRuby from '@wooorm/starry-night/source.ruby' @@ -425,7 +434,7 @@ import sourceShellcheckrc from '@wooorm/starry-night/source.shellcheckrc' import sourceShen from '@wooorm/starry-night/source.shen' import sourceSieve from '@wooorm/starry-night/source.sieve' import sourceSingularity from '@wooorm/starry-night/source.singularity' -import sourceSlice from '@wooorm/starry-night/source.slice' +import sourceSlint from '@wooorm/starry-night/source.slint' import sourceSmali from '@wooorm/starry-night/source.smali' import sourceSmalltalk from '@wooorm/starry-night/source.smalltalk' import sourceSmithy from '@wooorm/starry-night/source.smithy' @@ -456,6 +465,7 @@ import sourceTcl from '@wooorm/starry-night/source.tcl' import sourceTea from '@wooorm/starry-night/source.tea' import sourceTerra from '@wooorm/starry-night/source.terra' import sourceTerraform from '@wooorm/starry-night/source.terraform' +import sourceTextgrid from '@wooorm/starry-night/source.textgrid' import sourceTextproto from '@wooorm/starry-night/source.textproto' import sourceThrift from '@wooorm/starry-night/source.thrift' import sourceTl from '@wooorm/starry-night/source.tl' @@ -540,6 +550,7 @@ import textHtmlCshtml from '@wooorm/starry-night/text.html.cshtml' import textHtmlDjango from '@wooorm/starry-night/text.html.django' import textHtmlEcmarkup from '@wooorm/starry-night/text.html.ecmarkup' import textHtmlEcr from '@wooorm/starry-night/text.html.ecr' +import textHtmlEdge from '@wooorm/starry-night/text.html.edge' import textHtmlElixir from '@wooorm/starry-night/text.html.elixir' import textHtmlErb from '@wooorm/starry-night/text.html.erb' import textHtmlFtl from '@wooorm/starry-night/text.html.ftl' @@ -606,6 +617,7 @@ export const grammars = [ objdumpX6asm, source2da, source4dm, + source8xp, sourceAbap, sourceAbapcds, sourceAbl, @@ -640,10 +652,12 @@ export const grammars = [ sourceBallerina, sourceBasic, sourceBatchfile, + sourceBb, sourceBdf, sourceBefunge, sourceBerry, sourceBf, + sourceBh, sourceBicep, sourceBlitzmax, sourceBoo, @@ -679,6 +693,7 @@ export const grammars = [ sourceCmake, sourceCobol, sourceCoffee, + sourceCommonlisp, sourceCool, sourceCoq, sourceCrystal, @@ -777,6 +792,7 @@ export const grammars = [ sourceGroovy, sourceGroovyGradle, sourceGsc, + sourceGts, sourceHack, sourceHaproxyConfig, sourceHarbour, @@ -792,6 +808,7 @@ export const grammars = [ sourceHx, sourceHxml, sourceHy, + sourceIce, sourceIdeal, sourceIdl, sourceIdris, @@ -886,6 +903,7 @@ export const grammars = [ sourceModelica, sourceModula3, sourceModula2, + sourceMojo, sourceMonkey, sourceMoonscript, sourceMove, @@ -947,6 +965,7 @@ export const grammars = [ sourcePic, sourcePigLatin, sourcePike, + sourcePipRequirements, sourcePlist, sourcePo, sourcePogoscript, @@ -999,6 +1018,7 @@ export const grammars = [ sourceRexx, sourceRez, sourceRing, + sourceRoc, sourceRpgle, sourceRpmSpec, sourceRuby, @@ -1021,7 +1041,7 @@ export const grammars = [ sourceShen, sourceSieve, sourceSingularity, - sourceSlice, + sourceSlint, sourceSmali, sourceSmalltalk, sourceSmithy, @@ -1052,6 +1072,7 @@ export const grammars = [ sourceTea, sourceTerra, sourceTerraform, + sourceTextgrid, sourceTextproto, sourceThrift, sourceTl, @@ -1136,6 +1157,7 @@ export const grammars = [ textHtmlDjango, textHtmlEcmarkup, textHtmlEcr, + textHtmlEdge, textHtmlElixir, textHtmlErb, textHtmlFtl, diff --git a/notice b/notice index c22c19d..404e784 100644 --- a/notice +++ b/notice @@ -7028,6 +7028,35 @@ If not otherwise specified (see below), files in this repository fall under the An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. +========================================================================================================= +Files in `starry-night`: lang/source.commonlisp.js +From source: +SPDX: mit +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE + +MIT License + +Copyright (c) 2020 Qingpeng Li + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + ========================================================================================================= Files in `starry-night`: lang/text.conllu.js From source: <> @@ -8213,6 +8242,24 @@ Apache License See the License for the specific language governing permissions and limitations under the License. +========================================================================================================= +Files in `starry-night`: lang/text.html.edge.js +From source: +SPDX: mit +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE.md + +# The MIT License + +Copyright 2022 Harminder Virk, contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ========================================================================================================= Files in `starry-night`: lang/source.edgeql.js From source: @@ -8329,7 +8376,7 @@ All source files use the BSD 2-clause license (see [LICENSE](LICENSE)), except for the following: - Files in [pkg/diff](pkg/diff) and [pkg/rpc](pkg/rpc) are released under the - BSD 3-clause license, since they are copied from + BSD 3-clause license, since they are derived from [Go's source code](https://github.com/golang/go). See [pkg/diff/LICENSE](pkg/diff/LICENSE) and [pkg/rpc/LICENSE](pkg/rpc/LICENSE). @@ -10030,6 +10077,46 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================================================================================= +Files in `starry-night`: lang/source.bh.js +From source: +SPDX: bsd-3-clause +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE + +Copyright (c) 2023 Thomas Bourgeat +Copyright (c) 2017 Justus Adam + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Justus Adam nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ========================================================================================================= Files in `starry-night`: lang/text.html.php.blade.js From source: <> @@ -12862,7 +12949,7 @@ SPDX: isc --------------------------------------------------------------------------------------------------------- License from source file: LICENSE.md -Copyright (c) 2022, John Gardner +Copyright (c) 2022-2024, John Gardner Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -12929,6 +13016,44 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================================================================================= +Files in `starry-night`: lang/source.8xp.js +From source: +SPDX: bsd-3-clause +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE + +BSD 3-Clause License + +Copyright (c) 2023 - 2024, TIny_Hacker +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ========================================================================================================= Files in `starry-night`: lang/source.toc.js From source: @@ -13387,19 +13512,33 @@ An exception is made for files in readable text which contain their own license ========================================================================================================= Files in `starry-night`: lang/source.lua.js -From source: <> -SPDX: permissive +From source: +SPDX: mit --------------------------------------------------------------------------------------------------------- -License from source file: ? +License from source file: LICENSE -If not otherwise specified (see below), files in this repository fall under the following license: +MIT License - Permission to copy, use, modify, sell and distribute this - software is granted. This software is provided "as is" without - express or implied warranty, and with no claim as to its - suitability for any purpose. +Copyright (c) 2022 最萌小汐 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. ========================================================================================================= Files in `starry-night`: lang/source.modula-3.js @@ -14078,6 +14217,38 @@ License from source file: LICENSE limitations under the License. +========================================================================================================= +Files in `starry-night`: lang/source.mojo.js +From source: +SPDX: mit +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE + +The MIT License + +Copyright (c) 2022-present Modular Inc. https://www.modular.com +Copyright (c) 2015-present MagicStack Inc. http://magic.io +Copyright (c) 2015-present Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + ========================================================================================================= Files in `starry-night`: lang/source.monkey.js From source: <> @@ -15057,7 +15228,7 @@ This extension is [licensed under the MIT License](LICENSE). Please see the source of the TextMate definition that we use. ========================================================================================================= -Files in `starry-night`: lang/source.praat.js +Files in `starry-night`: lang/source.praat.js, lang/source.textgrid.js From source: SPDX: mit --------------------------------------------------------------------------------------------------------- @@ -15319,6 +15490,36 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================================================================================= +Files in `starry-night`: lang/source.roc.js +From source: +SPDX: mit +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE + +MIT License + +Copyright (c) 2023 Ivan Demchenko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ========================================================================================================= Files in `starry-night`: lang/text.slim.js From source: <> @@ -15694,6 +15895,24 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================================================================================= +Files in `starry-night`: lang/source.slint.js +From source: +SPDX: mit +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE + +MIT License + +Copyright (c) 2024 SixtyFPS GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ========================================================================================================= Files in `starry-night`: lang/source.smali.js From source: @@ -15939,14 +16158,14 @@ License from source file: LICENSE ========================================================================================================= Files in `starry-night`: lang/source.sourcepawn.js -From source: +From source: SPDX: mit --------------------------------------------------------------------------------------------------------- License from source file: LICENSE MIT License -Copyright (c) 2017-Present Dreae +Copyright (c) 2021 Sarrus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18686,7 +18905,7 @@ If not otherwise specified (see below), files in this repository fall under the An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. ========================================================================================================= -Files in `starry-night`: lang/source.gjs.js +Files in `starry-night`: lang/source.gjs.js, lang/source.gts.js From source: SPDX: mit --------------------------------------------------------------------------------------------------------- @@ -18783,6 +19002,44 @@ License from source file: README.md Antlers Toolbox is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). +========================================================================================================= +Files in `starry-night`: lang/source.bb.js +From source: +SPDX: mit +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE + +MIT License + +Copyright (c) 2023 Savoir-faire Linux. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +The syntax settings used in this project are forked from + +https://github.com/mholo65/vscode-bitbake + +Original work Copyright (c) 2016 Richard Leitner +Modified work Copyright (c) 2017 Martin Björkström +Modified work Copyright (c) 2018 Eugen Wiens + + ========================================================================================================= Files in `starry-night`: lang/source.brs.js From source: @@ -21205,26 +21462,26 @@ Files in `starry-night`: lang/source.procfile.js From source: SPDX: bsd-3-clause --------------------------------------------------------------------------------------------------------- -License from source file: LICENSE +License from source file: LICENSE.txt BSD 3-Clause License -Copyright (c) 2020, Ben Spaulding. +Copyright (c) 2024, Ben Spaulding. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. + list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -21267,6 +21524,36 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================================================================================= +Files in `starry-night`: lang/source.pip-requirements.js +From source: +SPDX: mit +--------------------------------------------------------------------------------------------------------- +License from source file: LICENSE + +Copyright (c) Microsoft Corporation. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ========================================================================================================= Files in `starry-night`: lang/source.rbs.js From source: @@ -21362,7 +21649,7 @@ SOFTWARE. ========================================================================================================= -Files in `starry-night`: lang/source.slice.js +Files in `starry-night`: lang/source.ice.js From source: SPDX: bsd-3-clause --------------------------------------------------------------------------------------------------------- @@ -21783,9 +22070,9 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice License from source file: README.md -Source code and grammars are licensed under the [Mozilla Public License (MPL-2.0)](LICENSE.txt). +Source code, grammars and snippets are provided under the [Mozilla Public License (MPL-2.0)](LICENSE.txt). -The icon is licensed under the [Creative Commons ShareAlike](images/LICENSE) license. +The icon is provided under [CC-BY-4.0](images/LICENSE.txt), courtesy of the GitHub Explore authors. @@ -21799,7 +22086,7 @@ The icon is licensed under the [Creative Commons ShareAlike](images/LICENSE) lic [discussions]: https://github.com/serkonda7/vscode-vba/discussions -[gh-linguist]: https://github.com/DecimalTurn/linguist/blob/master/vendor/licenses/git_submodule/vscode-vba-json.dep.yml +[gh-linguist]: https://github.com/github-linguist/linguist/tree/master/vendor [sponsors-badge]: https://img.shields.io/badge/Sponsor-GitHub-blue.svg [sponsors-profile]: https://github.com/sponsors/serkonda7 diff --git a/readme.md b/readme.md index cbbffb6..350b439 100644 --- a/readme.md +++ b/readme.md @@ -1054,7 +1054,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [x] [`source.js`](lang/source.js.js) (mit) — [upstream](https://github.com/atom/language-javascript) * [x] [`source.json`](lang/source.json.js) (isc) — [upstream](https://github.com/Nixinova/NovaGrammars) * [x] [`source.kotlin`](lang/source.kotlin.js) (apache-2.0) — [upstream](https://github.com/nishtahir/language-kotlin) -* [x] [`source.lua`](lang/source.lua.js) +* [x] [`source.lua`](lang/source.lua.js) (mit) — [upstream](https://github.com/LuaLS/lua.tmbundle) * [x] [`source.makefile`](lang/source.makefile.js) — [upstream](https://github.com/textmate/make.tmbundle) — needs: `source.shell` * [x] [`source.objc`](lang/source.objc.js) — needs: `source.c`, `source.c.platform`, `source.objc.platform` * [x] [`source.objc.platform`](lang/source.objc.platform.js) @@ -1083,6 +1083,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`objdump.x86asm`](lang/objdump.x86asm.js) (mit) — needs: `source.c`, `source.c++` * [ ] [`source.2da`](lang/source.2da.js) (isc) — [upstream](https://github.com/Alhadis/language-etc) * [ ] [`source.4dm`](lang/source.4dm.js) (mit) +* [ ] [`source.8xp`](lang/source.8xp.js) (bsd-3-clause) — [upstream](https://github.com/TIny-Hacker/language-ti-basic) * [ ] [`source.abap`](lang/source.abap.js) — [upstream](https://github.com/pvl/abap.tmbundle) * [ ] [`source.abapcds`](lang/source.abapcds.js) (unlicense) — [upstream](https://github.com/FreHu/abap-cds-grammar) * [ ] [`source.abl`](lang/source.abl.js) (mit) — [upstream](https://github.com/chriscamicas/abl-tmlanguage) @@ -1117,10 +1118,12 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.ballerina`](lang/source.ballerina.js) (apache-2.0) — [upstream](https://github.com/ballerina-platform/ballerina-grammar) * [ ] [`source.basic`](lang/source.basic.js) (apache-2.0) — [upstream](https://github.com/telnet23/language-basic) * [ ] [`source.batchfile`](lang/source.batchfile.js) (mit) — [upstream](https://github.com/mmims/language-batchfile) +* [ ] [`source.bb`](lang/source.bb.js) (mit) — [upstream](https://github.com/yoctoproject/vscode-bitbake) * [ ] [`source.bdf`](lang/source.bdf.js) (isc) — [upstream](https://github.com/Alhadis/language-fontforge) — needs: `source.xlfd` * [ ] [`source.befunge`](lang/source.befunge.js) (mit) * [ ] [`source.berry`](lang/source.berry.js) (mit) — [upstream](https://github.com/berry-lang/berry-grammar) * [ ] [`source.bf`](lang/source.bf.js) (mit) — [upstream](https://github.com/Drako/SublimeBrainfuck) +* [ ] [`source.bh`](lang/source.bh.js) (bsd-3-clause) — [upstream](https://github.com/B-Lang-org/language-bh) * [ ] [`source.bicep`](lang/source.bicep.js) (mit) — [upstream](https://github.com/azure/bicep) * [ ] [`source.blitzmax`](lang/source.blitzmax.js) * [ ] [`source.boo`](lang/source.boo.js) (mit) — [upstream](https://github.com/drslump/sublime-boo) @@ -1153,6 +1156,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.cmake`](lang/source.cmake.js) * [ ] [`source.cobol`](lang/source.cobol.js) (mit) — [upstream](https://github.com/spgennard/vscode_cobol) * [ ] [`source.coffee`](lang/source.coffee.js) (mit) — [upstream](https://github.com/atom/language-coffee-script) — needs: `source.js` +* [ ] [`source.commonlisp`](lang/source.commonlisp.js) (mit) — [upstream](https://github.com/qingpeng9802/common-lisp-tmlanguage) * [ ] [`source.cool`](lang/source.cool.js) (mit) * [ ] [`source.coq`](lang/source.coq.js) (mit) * [ ] [`source.crystal`](lang/source.crystal.js) (mit) — [upstream](https://github.com/atom-crystal/language-crystal) — needs: `text.html.basic` @@ -1244,6 +1248,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.groovy`](lang/source.groovy.js) * [ ] [`source.groovy.gradle`](lang/source.groovy.gradle.js) (apache-2.0) — needs: `source.groovy` * [ ] [`source.gsc`](lang/source.gsc.js) (unlicense) — [upstream](https://github.com/Jake-NotTheMuss/CoDT7-Sublime) +* [ ] [`source.gts`](lang/source.gts.js) (mit) — [upstream](https://github.com/lifeart/vsc-ember-syntax) — needs: `source.ts` * [ ] [`source.hack`](lang/source.hack.js) (mit) — [upstream](https://github.com/slackhq/vscode-hack) — needs: `text.html.basic` * [ ] [`source.haproxy-config`](lang/source.haproxy-config.js) (mit) * [ ] [`source.harbour`](lang/source.harbour.js) (mit) @@ -1259,6 +1264,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.hx`](lang/source.hx.js) (mit) — [upstream](https://github.com/vshaxe/haxe-TmLanguage) * [ ] [`source.hxml`](lang/source.hxml.js) (mit) — [upstream](https://github.com/vshaxe/haxe-TmLanguage) — needs: `source.hx` * [ ] [`source.hy`](lang/source.hy.js) (mit) — [upstream](https://github.com/tshakalekholoane/vscode-hy) +* [ ] [`source.ice`](lang/source.ice.js) (bsd-3-clause) — [upstream](https://github.com/zeroc-ice/vscode-slice) * [ ] [`source.ideal`](lang/source.ideal.js) (isc) — [upstream](https://github.com/Alhadis/language-roff) — needs: `source.pic`, `text.roff` * [ ] [`source.idl`](lang/source.idl.js) (bsd-3-clause) — [upstream](https://github.com/mgalloy/idl.tmbundle) * [ ] [`source.idris`](lang/source.idris.js) (mit) — [upstream](https://github.com/idris-hackers/idris-sublime) @@ -1345,6 +1351,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.modelica`](lang/source.modelica.js) (mit) — [upstream](https://github.com/BorisChumichev/modelicaSublimeTextPackage) * [ ] [`source.modula-3`](lang/source.modula-3.js) (bsd-3-clause) — [upstream](https://github.com/newgrammars/m3) * [ ] [`source.modula2`](lang/source.modula2.js) (mit) — [upstream](https://github.com/harogaston/Sublime-Modula-2) +* [ ] [`source.mojo`](lang/source.mojo.js) (mit) — [upstream](https://github.com/modularml/mojo-syntax) * [ ] [`source.monkey`](lang/source.monkey.js) (mit) * [ ] [`source.moonscript`](lang/source.moonscript.js) (mit) * [ ] [`source.move`](lang/source.move.js) (mit) — [upstream](https://github.com/damirka/vscode-move-syntax) @@ -1403,6 +1410,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.pic`](lang/source.pic.js) (isc) — [upstream](https://github.com/Alhadis/language-roff) — needs: `source.shell`, `text.html.basic`, `text.roff` * [ ] [`source.pig_latin`](lang/source.pig_latin.js) (mit) * [ ] [`source.pike`](lang/source.pike.js) (unlicense) +* [ ] [`source.pip-requirements`](lang/source.pip-requirements.js) (mit) — [upstream](https://github.com/microsoft/vscode-python) * [ ] [`source.plist`](lang/source.plist.js) (mit) — [upstream](https://github.com/atom/language-property-list) * [ ] [`source.po`](lang/source.po.js) * [ ] [`source.pogoscript`](lang/source.pogoscript.js) (mit) @@ -1453,6 +1461,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.rexx`](lang/source.rexx.js) (mit) — [upstream](https://github.com/mblocker/rexx-sublime) * [ ] [`source.rez`](lang/source.rez.js) — [upstream](https://github.com/textmate/rez.tmbundle) * [ ] [`source.ring`](lang/source.ring.js) (mit) +* [ ] [`source.roc`](lang/source.roc.js) (mit) — [upstream](https://github.com/ivan-demchenko/roc-vscode-unofficial) * [ ] [`source.rpgle`](lang/source.rpgle.js) (mit) — [upstream](https://github.com/barrettotte/vscode-ibmi-languages) — needs: `source.sql` * [ ] [`source.rpm-spec`](lang/source.rpm-spec.js) (mit) — needs: `source.changelogs.rpm-spec`, `source.shell` * [ ] [`source.sas`](lang/source.sas.js) (mit) — [upstream](https://github.com/rpardee/sas.tmbundle) @@ -1472,7 +1481,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.shen`](lang/source.shen.js) (bsd-3-clause) * [ ] [`source.sieve`](lang/source.sieve.js) (isc) — [upstream](https://github.com/Alhadis/language-etc) * [ ] [`source.singularity`](lang/source.singularity.js) (mit) — [upstream](https://github.com/onnovalkering/vscode-singularity) -* [ ] [`source.slice`](lang/source.slice.js) (bsd-3-clause) — [upstream](https://github.com/zeroc-ice/vscode-slice) +* [ ] [`source.slint`](lang/source.slint.js) (mit) — [upstream](https://github.com/slint-ui/slint-tmLanguage) * [ ] [`source.smali`](lang/source.smali.js) (mit) — [upstream](https://github.com/ShaneWilton/sublime-smali) * [ ] [`source.smalltalk`](lang/source.smalltalk.js) (mit) * [ ] [`source.smithy`](lang/source.smithy.js) (apache-2.0) — [upstream](https://github.com/awslabs/smithy-vscode) @@ -1480,7 +1489,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.smt`](lang/source.smt.js) (unlicense) * [ ] [`source.solidity`](lang/source.solidity.js) (mit) — [upstream](https://github.com/davidhq/SublimeEthereum) * [ ] [`source.solution`](lang/source.solution.js) (isc) — [upstream](https://github.com/Nixinova/NovaGrammars) -* [ ] [`source.sourcepawn`](lang/source.sourcepawn.js) (mit) — [upstream](https://github.com/Dreae/sourcepawn-vscode) +* [ ] [`source.sourcepawn`](lang/source.sourcepawn.js) (mit) — [upstream](https://github.com/Sarrus1/sourcepawn-vscode) * [ ] [`source.sparql`](lang/source.sparql.js) (mit) — [upstream](https://github.com/peta/turtle.tmbundle) — needs: `source.turtle` * [ ] [`source.spin`](lang/source.spin.js) (zlib) — [upstream](https://github.com/bitbased/sublime-spintools) * [ ] [`source.sqf`](lang/source.sqf.js) (apache-2.0) — [upstream](https://github.com/JonBons/Sublime-SQF-Language) @@ -1501,6 +1510,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`source.tea`](lang/source.tea.js) (apache-2.0) — needs: `source.js`, `text.html.basic`, `text.xml` * [ ] [`source.terra`](lang/source.terra.js) (bsd-3-clause) * [ ] [`source.terraform`](lang/source.terraform.js) (mit) — [upstream](https://github.com/alexlouden/Terraform.tmLanguage) +* [ ] [`source.textgrid`](lang/source.textgrid.js) (mit) — [upstream](https://github.com/orhunulusahin/praatvscode) * [ ] [`source.textproto`](lang/source.textproto.js) (mit) — [upstream](https://github.com/thejustinwalsh/textproto-grammar) * [ ] [`source.thrift`](lang/source.thrift.js) * [ ] [`source.tl`](lang/source.tl.js) (mit) @@ -1581,6 +1591,7 @@ Changes should go to upstream repos and [`languages.yml`][languages-yml] in * [ ] [`text.html.django`](lang/text.html.django.js) — needs: `text.html.basic` * [ ] [`text.html.ecmarkup`](lang/text.html.ecmarkup.js) (isc) — [upstream](https://github.com/Alhadis/language-etc) — needs: `etc`, `source.yaml`, `text.grammarkdown`, `text.html.basic` * [ ] [`text.html.ecr`](lang/text.html.ecr.js) (mit) — [upstream](https://github.com/atom-crystal/language-crystal) — needs: `source.crystal`, `text.html.basic` +* [ ] [`text.html.edge`](lang/text.html.edge.js) (mit) — [upstream](https://github.com/edge-js/edge-vscode) * [ ] [`text.html.elixir`](lang/text.html.elixir.js) (apache-2.0) — [upstream](https://github.com/elixir-lang/elixir-tmbundle) — needs: `text.elixir`, `text.html.basic` * [ ] [`text.html.erb`](lang/text.html.erb.js) (mit) — [upstream](https://github.com/atom/language-ruby) — needs: `source.ruby`, `text.html.basic` * [ ] [`text.html.ftl`](lang/text.html.ftl.js) (mit) — needs: `text.html.basic` diff --git a/script/build.js b/script/build.js index c06eedd..f4f75fa 100644 --- a/script/build.js +++ b/script/build.js @@ -36,7 +36,8 @@ import {common} from './common.js' */ const aliases = { // Old names to new names. - // Example: 'source.brightscript': 'source.brs' + // Example: 'source.brightscript': 'source.brs', + 'source.slice': 'source.ice' } const gemsBase = new URL('../gems/gems/', import.meta.url) diff --git a/script/graph.yml b/script/graph.yml index 662c265..c5f7d19 100644 --- a/script/graph.yml +++ b/script/graph.yml @@ -186,7 +186,15 @@ source.gitconfig: source.gitignore: etc: true source.gjs: + source.css: false source.js: true + source.ts: false + text.html.basic: false +source.gts: + source.css: false + source.js: false + source.ts: true + text.html.basic: false source.graphql: source.js: false source.ts: false @@ -240,6 +248,7 @@ source.jsdoc: source.jsoniq: source.xq: false source.julia: + source.c++: false source.js: false source.python: false source.r: false @@ -717,6 +726,9 @@ text.html.ecmarkup: text.html.ecr: source.crystal: true text.html.basic: true +text.html.edge: + source.ts: false + text.html.basic: false text.html.elixir: text.elixir: true text.html.basic: true diff --git a/script/info.js b/script/info.js index 39610af..5db8a56 100644 --- a/script/info.js +++ b/script/info.js @@ -575,6 +575,10 @@ export const info = { license: 'mit' }, 'source.cmake': {}, + 'source.commonlisp': { + homepage: 'https://github.com/qingpeng9802/common-lisp-tmlanguage', + license: 'mit' + }, 'text.conllu': { license: 'apache-2.0' }, @@ -638,6 +642,10 @@ export const info = { homepage: 'https://github.com/hpcc-systems/ecl-tmLanguage', license: 'apache-2.0' }, + 'text.html.edge': { + homepage: 'https://github.com/edge-js/edge-vscode', + license: 'mit' + }, 'source.edgeql': { homepage: 'https://github.com/edgedb/edgedb-editor-plugin', license: 'mit' @@ -835,6 +843,10 @@ export const info = { homepage: 'https://github.com/mmims/language-batchfile', license: 'mit' }, + 'source.bh': { + homepage: 'https://github.com/B-Lang-org/language-bh', + license: 'bsd-3-clause' + }, 'text.html.php.blade': { dependencies: ['text.html.basic'], license: 'mit' @@ -1550,6 +1562,10 @@ export const info = { homepage: 'https://github.com/Alhadis/language-texinfo', license: 'isc' }, + 'source.8xp': { + homepage: 'https://github.com/TIny-Hacker/language-ti-basic', + license: 'bsd-3-clause' + }, 'source.toc': { homepage: 'https://github.com/nebularg/language-toc-wow', license: 'unlicense' @@ -1635,7 +1651,10 @@ export const info = { license: 'mit' }, 'source.logtalk': {}, - 'source.lua': {}, + 'source.lua': { + homepage: 'https://github.com/LuaLS/lua.tmbundle', + license: 'mit' + }, 'source.modula-3': { homepage: 'https://github.com/newgrammars/m3', license: 'bsd-3-clause' @@ -1682,6 +1701,10 @@ export const info = { homepage: 'https://github.com/jpienaar/mlir-grammar', license: 'apache-2.0' }, + 'source.mojo': { + homepage: 'https://github.com/modularml/mojo-syntax', + license: 'mit' + }, 'source.monkey': { license: 'mit' }, @@ -1771,6 +1794,10 @@ export const info = { homepage: 'https://github.com/orhunulusahin/praatvscode', license: 'mit' }, + 'source.textgrid': { + homepage: 'https://github.com/orhunulusahin/praatvscode', + license: 'mit' + }, 'source.processing': {}, 'text.html.django': { dependencies: ['text.html.basic'] @@ -1802,6 +1829,10 @@ export const info = { 'text.html.riot': { license: 'mit' }, + 'source.roc': { + homepage: 'https://github.com/ivan-demchenko/roc-vscode-unofficial', + license: 'mit' + }, 'text.slim': { dependencies: ['text.html.basic'], license: 'mit' @@ -1831,6 +1862,10 @@ export const info = { 'source.shaderlab': { license: 'mit' }, + 'source.slint': { + homepage: 'https://github.com/slint-ui/slint-tmLanguage', + license: 'mit' + }, 'source.smali': { homepage: 'https://github.com/ShaneWilton/sublime-smali', license: 'mit' @@ -1843,7 +1878,7 @@ export const info = { license: 'apache-2.0' }, 'source.sourcepawn': { - homepage: 'https://github.com/Dreae/sourcepawn-vscode', + homepage: 'https://github.com/Sarrus1/sourcepawn-vscode', license: 'mit' }, 'source.sql': {}, @@ -2052,6 +2087,11 @@ export const info = { homepage: 'https://github.com/lifeart/vsc-ember-syntax', license: 'mit' }, + 'source.gts': { + dependencies: ['source.ts'], + homepage: 'https://github.com/lifeart/vsc-ember-syntax', + license: 'mit' + }, 'source.fnl': { homepage: 'https://github.com/kongeor/vsc-fennel', license: 'mit' @@ -2065,6 +2105,10 @@ export const info = { homepage: 'https://github.com/Stillat/vscode-antlers-language-server', license: 'mit' }, + 'source.bb': { + homepage: 'https://github.com/yoctoproject/vscode-bitbake', + license: 'mit' + }, 'source.brs': { homepage: 'https://github.com/rokucommunity/vscode-brightscript-language', license: 'mit' @@ -2181,6 +2225,10 @@ export const info = { homepage: 'https://github.com/zxh0/vscode-proto3', license: 'mit' }, + 'source.pip-requirements': { + homepage: 'https://github.com/microsoft/vscode-python', + license: 'mit' + }, 'source.rbs': { homepage: 'https://github.com/soutaro/vscode-rbs-syntax', license: 'mit' @@ -2192,7 +2240,7 @@ export const info = { homepage: 'https://github.com/onnovalkering/vscode-singularity', license: 'mit' }, - 'source.slice': { + 'source.ice': { homepage: 'https://github.com/zeroc-ice/vscode-slice', license: 'bsd-3-clause' }, From a10a88dccf7bdc453977eefd2822816b23f1a53a Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 13 Mar 2024 15:01:16 +0100 Subject: [PATCH 4/7] Update dev-dependencies --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fcbcba5..d9061d3 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "type-coverage": "^2.0.0", "typescript": "^5.0.0", "unist-builder": "^4.0.0", - "xo": "^0.57.0", + "xo": "^0.58.0", "yaml": "^2.0.0" }, "scripts": { From 77d60a297617c0256fbe4905ac6e3bb7cd4de9eb Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 13 Mar 2024 15:04:26 +0100 Subject: [PATCH 5/7] Regenerate CSS Removes some duplicated CSS variables and changes the color of `comment` tokens. --- package.json | 3 +-- style/both.css | 32 +------------------------------- style/colorblind-light.css | 2 +- style/colorblind.css | 2 +- style/dimmed.css | 32 +------------------------------- style/high-contrast-light.css | 2 +- style/high-contrast.css | 2 +- style/light.css | 32 +------------------------------- style/tritanopia-light.css | 2 +- style/tritanopia.css | 2 +- 10 files changed, 10 insertions(+), 101 deletions(-) diff --git a/package.json b/package.json index d9061d3..f2fa7a1 100644 --- a/package.json +++ b/package.json @@ -84,8 +84,7 @@ "generate-css": "node --conditions development script/css.js", "generate-crawl": "gem install github-linguist -i gems", "generate-list": "node --conditions development script/list.js", - "#": " && npm run generate-css", - "generate": "npm run generate-build && npm run generate-list", + "generate": "npm run generate-build && npm run generate-list && npm run generate-css", "prepack": "npm run build && npm run format", "format": "remark . --frail --output --quiet && prettier . --log-level warn --write && xo --fix", "test": "npm run generate && npm run build && npm run format && npm run test-coverage", diff --git a/style/both.css b/style/both.css index 01fe4fe..0cb8092 100644 --- a/style/both.css +++ b/style/both.css @@ -2,37 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #6e7781; - --color-prettylights-syntax-constant: #0550ae; - --color-prettylights-syntax-entity: #6639ba; - --color-prettylights-syntax-storage-modifier-import: #24292f; - --color-prettylights-syntax-entity-tag: #116329; - --color-prettylights-syntax-keyword: #cf222e; - --color-prettylights-syntax-string: #0a3069; - --color-prettylights-syntax-variable: #953800; - --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; - --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; - --color-prettylights-syntax-invalid-illegal-bg: #82071e; - --color-prettylights-syntax-carriage-return-text: #f6f8fa; - --color-prettylights-syntax-carriage-return-bg: #cf222e; - --color-prettylights-syntax-string-regexp: #116329; - --color-prettylights-syntax-markup-list: #3b2300; - --color-prettylights-syntax-markup-heading: #0550ae; - --color-prettylights-syntax-markup-italic: #24292f; - --color-prettylights-syntax-markup-bold: #24292f; - --color-prettylights-syntax-markup-deleted-text: #82071e; - --color-prettylights-syntax-markup-deleted-bg: #ffebe9; - --color-prettylights-syntax-markup-inserted-text: #116329; - --color-prettylights-syntax-markup-inserted-bg: #dafbe1; - --color-prettylights-syntax-markup-changed-text: #953800; - --color-prettylights-syntax-markup-changed-bg: #ffd8b5; - --color-prettylights-syntax-markup-ignored-text: #eaeef2; - --color-prettylights-syntax-markup-ignored-bg: #0550ae; - --color-prettylights-syntax-meta-diff-range: #8250df; - --color-prettylights-syntax-brackethighlighter-angle: #57606a; - --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; - --color-prettylights-syntax-constant-other-reference-link: #0a3069; - --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-comment: #57606a; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #6639ba; --color-prettylights-syntax-storage-modifier-import: #24292f; diff --git a/style/colorblind-light.css b/style/colorblind-light.css index fe37635..c26cb65 100644 --- a/style/colorblind-light.css +++ b/style/colorblind-light.css @@ -2,7 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-comment: #57606a; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #6639ba; --color-prettylights-syntax-storage-modifier-import: #24292f; diff --git a/style/colorblind.css b/style/colorblind.css index 0d3cf1d..7f1b69a 100644 --- a/style/colorblind.css +++ b/style/colorblind.css @@ -2,7 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-comment: #57606a; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #6639ba; --color-prettylights-syntax-storage-modifier-import: #24292f; diff --git a/style/dimmed.css b/style/dimmed.css index d65e6af..c60d86a 100644 --- a/style/dimmed.css +++ b/style/dimmed.css @@ -2,37 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #6e7781; - --color-prettylights-syntax-constant: #0550ae; - --color-prettylights-syntax-entity: #6639ba; - --color-prettylights-syntax-storage-modifier-import: #24292f; - --color-prettylights-syntax-entity-tag: #116329; - --color-prettylights-syntax-keyword: #cf222e; - --color-prettylights-syntax-string: #0a3069; - --color-prettylights-syntax-variable: #953800; - --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; - --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; - --color-prettylights-syntax-invalid-illegal-bg: #82071e; - --color-prettylights-syntax-carriage-return-text: #f6f8fa; - --color-prettylights-syntax-carriage-return-bg: #cf222e; - --color-prettylights-syntax-string-regexp: #116329; - --color-prettylights-syntax-markup-list: #3b2300; - --color-prettylights-syntax-markup-heading: #0550ae; - --color-prettylights-syntax-markup-italic: #24292f; - --color-prettylights-syntax-markup-bold: #24292f; - --color-prettylights-syntax-markup-deleted-text: #82071e; - --color-prettylights-syntax-markup-deleted-bg: #ffebe9; - --color-prettylights-syntax-markup-inserted-text: #116329; - --color-prettylights-syntax-markup-inserted-bg: #dafbe1; - --color-prettylights-syntax-markup-changed-text: #953800; - --color-prettylights-syntax-markup-changed-bg: #ffd8b5; - --color-prettylights-syntax-markup-ignored-text: #eaeef2; - --color-prettylights-syntax-markup-ignored-bg: #0550ae; - --color-prettylights-syntax-meta-diff-range: #8250df; - --color-prettylights-syntax-brackethighlighter-angle: #57606a; - --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; - --color-prettylights-syntax-constant-other-reference-link: #0a3069; - --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-comment: #57606a; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #6639ba; --color-prettylights-syntax-storage-modifier-import: #24292f; diff --git a/style/high-contrast-light.css b/style/high-contrast-light.css index ac0bb56..a161a8e 100644 --- a/style/high-contrast-light.css +++ b/style/high-contrast-light.css @@ -2,7 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #66707b; + --color-prettylights-syntax-comment: #4b535d; --color-prettylights-syntax-constant: #023b95; --color-prettylights-syntax-entity: #512598; --color-prettylights-syntax-storage-modifier-import: #0e1116; diff --git a/style/high-contrast.css b/style/high-contrast.css index b11eb86..0b3b5ce 100644 --- a/style/high-contrast.css +++ b/style/high-contrast.css @@ -2,7 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #66707b; + --color-prettylights-syntax-comment: #4b535d; --color-prettylights-syntax-constant: #023b95; --color-prettylights-syntax-entity: #512598; --color-prettylights-syntax-storage-modifier-import: #0e1116; diff --git a/style/light.css b/style/light.css index 13f25f0..66993d8 100644 --- a/style/light.css +++ b/style/light.css @@ -2,37 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #6e7781; - --color-prettylights-syntax-constant: #0550ae; - --color-prettylights-syntax-entity: #6639ba; - --color-prettylights-syntax-storage-modifier-import: #24292f; - --color-prettylights-syntax-entity-tag: #116329; - --color-prettylights-syntax-keyword: #cf222e; - --color-prettylights-syntax-string: #0a3069; - --color-prettylights-syntax-variable: #953800; - --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; - --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; - --color-prettylights-syntax-invalid-illegal-bg: #82071e; - --color-prettylights-syntax-carriage-return-text: #f6f8fa; - --color-prettylights-syntax-carriage-return-bg: #cf222e; - --color-prettylights-syntax-string-regexp: #116329; - --color-prettylights-syntax-markup-list: #3b2300; - --color-prettylights-syntax-markup-heading: #0550ae; - --color-prettylights-syntax-markup-italic: #24292f; - --color-prettylights-syntax-markup-bold: #24292f; - --color-prettylights-syntax-markup-deleted-text: #82071e; - --color-prettylights-syntax-markup-deleted-bg: #ffebe9; - --color-prettylights-syntax-markup-inserted-text: #116329; - --color-prettylights-syntax-markup-inserted-bg: #dafbe1; - --color-prettylights-syntax-markup-changed-text: #953800; - --color-prettylights-syntax-markup-changed-bg: #ffd8b5; - --color-prettylights-syntax-markup-ignored-text: #eaeef2; - --color-prettylights-syntax-markup-ignored-bg: #0550ae; - --color-prettylights-syntax-meta-diff-range: #8250df; - --color-prettylights-syntax-brackethighlighter-angle: #57606a; - --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; - --color-prettylights-syntax-constant-other-reference-link: #0a3069; - --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-comment: #57606a; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #6639ba; --color-prettylights-syntax-storage-modifier-import: #24292f; diff --git a/style/tritanopia-light.css b/style/tritanopia-light.css index bbdb1a8..ff22d5b 100644 --- a/style/tritanopia-light.css +++ b/style/tritanopia-light.css @@ -2,7 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-comment: #57606a; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #6639ba; --color-prettylights-syntax-storage-modifier-import: #24292f; diff --git a/style/tritanopia.css b/style/tritanopia.css index 998b56e..da228f3 100644 --- a/style/tritanopia.css +++ b/style/tritanopia.css @@ -2,7 +2,7 @@ * It’s based on what GitHub uses on their site. * See for more info. */ :root { - --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-comment: #57606a; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #6639ba; --color-prettylights-syntax-storage-modifier-import: #24292f; From da0ffce14a1b57f454bcded6dd713b4a21794fd1 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 13 Mar 2024 15:06:41 +0100 Subject: [PATCH 6/7] Update count in readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 350b439..ba1eb8e 100644 --- a/readme.md +++ b/readme.md @@ -55,7 +55,7 @@ source and JavaScript! This package is an open source version of GitHub’s closed-source `PrettyLights` project (more on that later). -It supports **580+ grammars** and its **extremely high quality**. +It supports **600+ grammars** and its **extremely high quality**. It uses TextMate grammars which are also used in popular editors (SublimeText, Atom, VS Code, \&c). They’re heavy but high quality. From b9f6facc77fe6091cca91c4b06fb124c4c4e8075 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 13 Mar 2024 15:07:07 +0100 Subject: [PATCH 7/7] 3.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f2fa7a1..a295f86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@wooorm/starry-night", - "version": "3.2.0", + "version": "3.3.0", "description": "Syntax highlighting, like GitHub", "license": "MIT", "keywords": [